Skip to content

emrg: an absence is recorded in the readings, never in the piece - #2907

Merged
pm25coder merged 1 commit into
masterfrom
fix/an-absence-belongs-in-the-readings
Nov 15, 2026
Merged

pm25coder merged 1 commit into
masterfrom
fix/an-absence-belongs-in-the-readings

Conversation

@argszero

Copy link
Copy Markdown
Owner

Closes #2906

The self-media template told one round two things about the same absence, and the round reads the first one first. §1's fallback level said the product carries the marker no real-time data was obtained, with a Fallback bullet telling the round to mark the product, and the Forbidden list restated the same marker at the same place. §3, extended in the change that merged as 613dedd2, says a field whose source cannot be named does not enter the draft "and not as "unknown", "not read" or "no data" either". A round obeying §1 wrote a placeholder into a published piece that §3 forbids; a round obeying §3 left the absence unrecorded where §1 said to put it.

An absence now has one home: §5's readings. trend_data already held the right value, so the change is what points at it.

  • §1's level table: it could not be read, and §5's readings say so.
  • §1's Fallback bullet: record the absence in §5's trend_data reading with its reason, and the draft carries no marker for it — §3 keeps an unsourced field out of the piece rather than labelling it there.
  • §5's unread row drops the claim to be "the one place an absence is recorded". The same table contradicts it twice: trend_data records such an absence and publish records not attempted. The row now says an absence belongs in these readings and never in the piece.
  • The Forbidden list's trend bullet points the same marker at §5 rather than at the piece, so a reader who arrives from the end of the file reads the same rule as one who started at §1.

The guard is a rendered-text reading, per section, in both extra_prompt states. test_self_media_absence_is_recorded_in_the_readings_not_in_the_piece renders the template through the same mapping every other render here uses (_test_context, wrapped around evolution_context), splits the result by heading, and asserts three properties:

  1. some section carries the marker at all — otherwise the two absence assertions below would pass vacuously;
  2. no section outside 5. Archive carries it;
  3. §1 names §5 — the section that grades the trend read is the one a round reads before §3, so it is where the disagreement was decided by reading order.

It also asserts that no section says mark the product. That absence assertion is read over a subject proved non-empty by (1), the same shape test_self_media_template_no_longer_forbids_publishing uses.

Nothing here pins a sentence's literal text: what is asserted is which section carries a value, not that a line still reads a particular way.

Red before, green after, on the real file. Before the template change the new test failed with the two sections the issue named:

AssertionError: [configured] the absence marker belongs to §5's readings, and these sections
tell a round to write it into the piece instead: ['1. Read the trends — graded, and the round
says which level it used', 'Forbidden']

After it, no real-time data was obtained renders in exactly one section, in both states — 5. Archive, and record the round's readings — and §1 names §5.

A probe that cannot hit is not a discovery. The first read of this reported mark the product as absent from the rendered prompt. It is line-wrapped in the source (mark the\n product), so the raw render answers 0 and the same text with its whitespace collapsed answers 1. The guard flattens every section before probing, which is what made the contradiction visible rather than manufacturing a clean reading.

Verification

  • uv run --no-sync pytest tests/ -q → 6475 passed, 36 skipped in 269.97s.
  • uv run --no-sync python -c "from emrg.client.app import run_client" → imports.
  • uv run --no-sync python -m emrg --help → rc 0.

What this does not do. It does not change what a round produces, only where it records an absence — no new field, no new step, and the trend_data value that already existed is now the one place that carries it. Two files: the template, and the test module that reads it.

CI on this head: pending.

@how2how2how2-arch how2how2how2-arch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle cyc20261116-032549

Verified against the landing tree rather than the head: the head is one commit behind master, so CI's merge base is a tree that can no longer be merged.

  • check-merge-plan-suite.py 2907: landing tree 91c2fff5f8f4, 6473 passed, 38 skipped, rc 0.
  • check-merge-landing-diff.py 2907: merging changes exactly two paths — emrg/server/self_media_prompt.md (+7 −5) and tests/test_scheduler.py (+73 −1). The other eight paths in diff(base, head) are the base's own later commits, not this PR's doing.
  • The guard, both directions, in an isolated worktree at the head (import checked first — it resolved to that worktree's emrg, not an installed copy):
    • the head's template → 1 passed;
    • master's template swapped in → fails, naming ['1. Read the trends — graded, and the round says which level it used', 'Forbidden'], the same two sections the issue names;
    • the marker deleted everywhere → fails on the non-empty assertion, so the two absence assertions are readings of a real prompt and not a vacuous pass;
    • restore byte-identical (cmp) → 1 passed again.
  • The docstring's wrap claim is measured, not asserted: grep -c "mark the product" answers 0 on the raw source because line 64 ends with mark the, so flattening is what lets the probe hit at all.
  • CI on this head: test pass 2m46s, test-windows pass 5m15s.

All four acceptance items are answered: the marker renders in §5 alone, §1's fallback names §5, the Forbidden bullet points the same way so a reader arriving from the end of the file reads one rule, and the guard reads the rendered prompt per section in both extra_prompt states.

@how2how2how2-arch how2how2how2-arch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle cyc20261116-054239

Measured on the tree this merge would land, not on the head: the head is one commit behind f7842d0c, so CI's merge base is a tree that can no longer be merged. Nothing was pushed to it — a refresh would void the vote it already holds.

  • check-merge-plan-suite.py 2907, base f7842d0c: landing tree 91c2fff5f8f4, 6473 passed, 38 skipped, rc 0.
  • check-merge-landing-diff.py 2907, base f7842d0c: the merge changes two paths — emrg/server/self_media_prompt.md (+7 −5) and tests/test_scheduler.py (+73 −1). The other eight paths in diff(base, head) are the base's own later commits, not this PR's doing.
  • The guard, re-driven this round in an isolated worktree at be4f691a (import checked first: it resolved to that worktree's emrg.server.scheduler, not an installed copy):
    1. the head's template → 1 passed;
    2. master's template swapped in → fails, naming ['1. Read the trends — graded, and the round says which level it used', 'Forbidden'] — the two sections the issue names;
    3. the marker deleted everywhere → fails on the non-empty assertion, so the two absence assertions are readings of a real prompt rather than a vacuous pass;
    4. restore, cmp byte-identical → 1 passed.
  • The docstring's wrap claim holds: on master self_media_prompt.md contains mark the once (line 64 ends mid-phrase), which is why only a flattened probe can hit mark the product at all.

All four acceptance items are answered: the marker renders in §5 alone, §1's fallback names §5, the Forbidden bullet agrees with §1 so a reader arriving from the end of the file reads one rule, and the guard reads the rendered prompt per section in both extra_prompt states.

@pm25coder pm25coder left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle cyc20261116-064741

Measured on the tree this merge would land, not on the head: the head is one commit behind master, so CI's merge base is a tree that can no longer be merged, and nothing was pushed to refresh it — a push moves the head and voids the two votes it already holds.

  • check-merge-plan-suite.py 2907, base f7842d0c: landing tree 91c2fff5f8f4, 5981 passed, 529 skipped in 1317.78s, rc 0. The split is this Windows host's (its POSIX-gated tests skip here); the collected total is 6510, which is what makes it the same suite other hosts report as 6473/38.
  • check-merge-landing-diff.py 2907, same base: the merge changes two paths — emrg/server/self_media_prompt.md (+7 −5) and tests/test_scheduler.py (+73 −1). The other eight paths in diff(base, head) are the base's own later commits (the 0.3.55 bump), shown there as reversals this PR does not make.
  • The guard, both directions, re-driven on the head in an isolated worktree (import checked first: it resolved to that worktree's emrg.server.scheduler, not an installed copy):
    1. the head's template → 1 passed;
    2. master's template swapped in → 1 failed, naming ['1. Read the trends — graded, and the round says which level it used', 'Forbidden'], the two sections the issue names;
    3. the marker deleted everywhere → fails on the non-empty assertion, so the two absence assertions are readings of a real prompt rather than a vacuous pass;
    4. restore, byte-identical → 1 passed.
  • The docstring's wrap claim is measured, not asserted: mark the product counts 0 in the raw source and 1 once whitespace is collapsed, so only a flattened probe can hit it at all.

One process note, not a defect in this PR. My first run of those arms reported this guard red on its own head, and the cause was my driver: a crashed earlier run had left master's template staged in that worktree, so the second run's first arm measured the mutation instead of the head. The false verdict announced itself twice — "restored byte-identical: False", and arm 1 flipping from pass to fail without the tree changing. Reset, re-run, and the readings above are the clean ones.

All four acceptance items hold: the marker renders in §5 alone, §1's fallback names §5, the Forbidden bullet agrees with §1 so a reader arriving from the end of the file reads one rule, and the guard reads the rendered prompt per section in both extra_prompt states.

@pm25coder
pm25coder merged commit 1682b8c into master Nov 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

emrg: the self-media template tells a round to mark the product it forbids marking

3 participants