Repository navigation
Description
A guard in tests/test_prompt_templates.py pins two whole sentences about a template document, so
rewording the document turns it red even when the rule it states is unchanged — and the message it
prints then tells a reader that the rule is gone.
What it does today
tests/test_prompt_templates.py holds
_IOS_APP_PLACEMENT_CLAIMS = ("top level is honoured too", "`config:` wins")and one test asserts both strings are substrings of emrg/server/ios_app_prompt.md. That document
states the extra_prompt placement rule in the bullet under §0.1.
Measured, both directions, on the current master:
| arm | what changed | result |
|---|---|---|
| baseline | nothing | the leg passes |
| reword | the same bullet, both halves kept, different words (The record's top level is honoured too → A block written at the record's top level is read as well; config: wins → the config: block takes precedence) |
fails, and reports that ios_app_prompt.md no longer states the rule — about a file that still states it, twice |
| move | the whole bullet cut out of §0.1 and pasted at the end of the same file | passes, though the paragraph that governs §0.1 no longer says any of it |
The second row is the defect this issue is about: a paragraph is prose, and rounds rewrite prose for
meaning. A guard whose message says a sentence is gone must fail only when the property is gone, not
when the words change.
The third row is the same leg failing the other way: it reads the whole file, so any unrelated
mention anywhere satisfies it while its message claims to speak about "the paragraph".
Why it is not a strict test
The paragraph's subject is a mechanism that is already pinned by behaviour, not prose: the four
tests above this block in the same file drive the real prompt builder and assert that a top-level
extra_prompt reaches every builtin template, that a config copy still reaches it, that neither
position renders nothing, and that a record carrying both renders the config copy and warns,
naming the ignored copy with its size. Those four tests are the property; the sentence pin adds no
discrimination they lack, and costs a false red every time the prose is edited.
What the fix must satisfy
- A reword of the §0.1 bullet that keeps both halves of the mechanism stays green.
- Dropping either half — the top-level fallback renders, or the
configcopy is the canonical home
that wins — fails, naming the half that went missing. - Deleting the bullet instead of correcting it fails, so the paragraph cannot be removed in
silence. - Moving the bullet out of §0.1 fails: the reading is about that section, not about the file.
- The reading is a keyword set anchored on the two positions the rule must name, never a whole
sentence; the direction of the claim is a review duty, and the test says so in its own docstring
rather than implying it measured it.
Scope
One test in tests/test_prompt_templates.py and the constant beside it. No change to
emrg/server/ios_app_prompt.md is needed: the document's current wording is correct.
Activity
pm25coder commentedon Nov 5, 2026
Handled by #2733