testertest*.py from specs (referenced at topics.json:1987), and whether regeneration preserves hand-editsDate: 2026-05-29
Time: 11:30
testertest*.py Files Are Not Generated by Code-ExpertThe premise of the topic at topics.json:1987 is a question to investigate, not documentation of an existing pipeline. The observations show definitively that the code-expert workflow does not generate testertest*.py files:
1. No generation code exists. The grep for testertest across all code-expert tooling returned zero matches (greptestergeneration.totalcount: 0). The .code-expert/ directory contains only topics.json — no templates, specs, or generation scripts.
2. No auto-generation markers. The grep for DO NOT EDIT|auto.generated across all tester files found zero hits. The only matches for the broader pattern were natural uses of the word "preserves" in test docstrings (e.g., b-tree-storage-engine/testertestbtree.py:75 — "Test crash recovery: close and reopen preserves data.").
3. The topic was exploratory, not descriptive. The entry at topics.json:1987 reads: *"How the code-expert workflow generates testertest*.py files from specs, and whether they're regenerated when specs change"* — with "status": "done". This means the topic was investigated and resolved. The investigation likely concluded the same thing: there is no generation pipeline.
The testertest*.py files live in the target repository (/Users/ben/git/ddia-implementations), not in this knowledge base. Comparing b-tree-storage-engine/testbtree.py and b-tree-storage-engine/testertest_btree.py:
| Trait | testbtree.py | testertest_btree.py |
|-------|-----------------|------------------------|
| Framework | pytest (discovered by runner) | Standalone (print("PASSED")) |
| Test names | Terse (testbasic) | Descriptive (testbasicputget) |
| Docstrings | None | Present on every test |
| Structure | Monolithic tests | Decomposed (separate testrangescan, test_persistence) |
The tester files are hand-written standalone test suites — a parallel convention to pytest, designed to run without a test framework. The print("testxxx PASSED") pattern (visible at testertest_btree.py:44) suggests they're invoked by a simple runner that parses stdout, not by pytest.
Since there is no generation pipeline, the question of whether regeneration preserves hand-edits doesn't apply. These files are the canonical hand-written versions — they are the hand-edits.
To fully close this out, you'd want to check:
entries/ documents the resolution of this topic (the "status": "done" suggests one exists)topics.json:1259, target tester-runner-system)tester-files-are-hand-written — The testertest*.py files contain no auto-generation markers and are hand-authored standalone test suites, not generated by code-expert or any other pipelinetester-stdout-protocol — Tester files use print("test_name PASSED") as their output protocol, indicating a runner that parses stdout rather than relying on pytest's exit codetester-test-decomposition — Tester files decompose monolithic pytest tests into smaller focused functions with docstrings (e.g., testbasic becomes testbasicputget + testrangescan + test_persistence)code-expert-has-no-codegen — The code-expert workflow is read-only against the target repository — it scans, explores, and extracts beliefs but never generates or modifies source files