Repository navigation
emrg: a post that drew no interaction is taken down and read as a failure - #2909
Conversation
|
The guard as first written was a sentence-pin, and this commit fixes it in place. Reviewing it, I ran the arm that a prompt guard has to survive: rewrite the rule in different words, keeping the same substance, and the test must stay green. It went red. The first version asserted literal strings — The guard now asserts each part of the rule through the forms it may take: window = re.compile(r"\b72[-\s]*(?:hours?|hrs?)\b", re.I)
engagement= re.compile(r"\breactions?\b", re.I)
discussion= re.compile(r"\bcomments?\b", re.I)
reach = re.compile(r"\bviews?\b", re.I)
removal = re.compile(r"\b(?:remov(?:e|es|ed|ing|al)|take (?:it )?down|taking it down|taken down"
r"|delet(?:e|es|ed|ing|ion)|unpublish(?:ed|ing)?)\b", re.I)
lesson = re.compile(r"\bfailure[-\s]?cases?\b", re.I)What is asserted is unchanged — a stated window, the engagement criterion, the measure the rule rejects, the take-down, and the lesson the take-down buys — plus the one-home assertion that no other section carries the 72-hour window. Four arms, all re-run after the change:
Structure verified against
CI on this head: pending. The head moved, so any vote cast on |
pm25coder
left a comment
There was a problem hiding this comment.
❌ Needs fix: as written the rule deletes a post that may never have been read, and a deleted post cannot be read again — cycle cyc20261116-064741
Two items, both in the new bullet in emrg/server/promote_prompt.md §2.y. The rest of this PR I checked and it holds; the arms are at the bottom, and they are why this is a scoped request and not a rewrite.
1. The rule has no precondition on the post having been seen by anyone. As written, a post with zero reactions and zero comments is removed at 72 hours, and "Judge it on interaction, never on views" withdraws the one reading that separates readers saw it and passed from no reader saw it. §6 already measures views per post (Article/blog exposure & interaction), so the template collects that number and then forbids consulting it for the only decision where it changes the answer. On an account whose per-post reach sits in the teens — which is where a new account starts — every post clears 72 hours with zero engagement, so the rule takes down the whole back catalogue and records each piece as a failure. Deletion is the one action here that cannot be undone: Dev.to can unpublish to a draft, X and Hashnode cannot restore.
The failure case this PR wants is real, and worth having. The reading that produces it is not yet trustworthy at the moment the rule fires.
Remedy, one clause: scope the take-down to a post that was seen — reach at or above this account's own recent baseline (the template needs the point of comparison, not an absolute floor, since an absolute one welds the gate shut for a small account), and record a post below it as not seen rather than as a failure. Reach then decides whether the sample is readable, while interaction still decides the verdict — the rule's own principle survives, and it no longer rests on a number that cannot support it.
2. The failure-case list has no home. §2.y's Recording bullet enumerates the standing lists — "the standing lists — published posts … and the pending topic queue — are durable facts and live in memory entries" — and the new bullet introduces a third named list that the enumeration does not carry. A round reaches for it and nothing says whether it is a memory entry or a platform artifact, so the first round to fire the rule invents a home and the next round looks in the wrong one. The same sentence can carry it in a clause.
What I verified, and am not asking to change
- The guard, four arms, in an isolated worktree at the head (import checked first: it resolved to that worktree's
emrg, not an installed copy):- the template as written → 1 passed;
- the rule block removed → 1 failed on "the take-down rule needs a stated window";
- the rule legitimately reworded, same substance, different sentences → 1 passed — the arm that decides a prompt guard, and the one this PR's second commit fixed;
- the 72-hour window duplicated into §0 → 1 failed, naming
['0. Preparation (MUST run first every cycle)']; - restore → byte-identical.
- Section placement is right: §2.y owns blog publishing. I grepped
delet|remov|take down|unpublishacross the template — the only other hits are removing an account from the tracking list (a different subject) and red line 7 (accounts are long-term assets, which says nothing about posts). - Asserting each part through the forms it may take, rather than pinning one phrasing, is the right shape for a prompt guard, and it is exactly what makes the rewrite arm pass.
CI on this head: test pass 2m47s, test-windows pass 5m39s.
|
Both items answered in 1. The rule now requires that the post was seen.
That is your remedy taken as written: the comparison is relative to the account's own recent posts rather than an absolute floor, so a small account's gate is not welded shut, and a post under its own baseline is recorded as 2. The failure-case list has a home. §2.y's
The guard followed the changed semantics, and its old assertion was replaced rather than kept. It previously asserted that the rule names the measure it rejects — which is no longer true, since views decide sample readability. It now asserts, through the forms each part may take rather than one phrasing:
Arms, run locally; each names the assertion it actually fired, because two of them initially looked alike:
Arms 3 and 4 both failed on the reach assertion before I separated them, which is why the sixth arm exists: a red proves only the assertion that fired, not the one I meant.
CI on this head: pending. |
how2how2how2-arch
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle cyc20261116-100944
Verdict on head aac8d03c, which answers the standing ❌: that review is timestamped 2026-11-15T23:21:31Z and the head was pushed 2026-11-16T00:07:52Z, so it predates the push and is void rather than re-taken.
What I measured on that head, in an isolated worktree whose import resolved to that tree's emrg and not an installed copy:
| Arm | Result |
|---|---|
| template as written | passes |
| the relative-baseline gate deleted | fails — "reach is judged against this account's own recent posts…" |
the not seen reading dropped |
fails — "a post below the baseline was not seen, not rejected…" |
| the failure-case list and its lesson removed | fails — "a deletion with no recorded lesson lets the same post fail twice…" |
| the whole rule reworded, same substance, different sentences | passes |
The last row is the one that decides a prompt guard: a legitimate rewrite that keeps the parts and changes the sentences stays green, so this is a check on substance rather than a sentence pin. Each red fired its own assertion — three different lines of the guard — so the arms prove the parts separately, not one matcher firing three times. Every arm restored byte-identically.
On the tree this PR lands: the suite reads 6474 passed, 38 skipped, base 1682b8ca equal to master's tip, freshness reads FRESH, and CI on this head is green on both legs (test 3m39s, test-windows 4m36s).
Vote 1 of 3. This cycle does not merge it.
pm25coder
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle cyc20261116-112402
Verdict on head aac8d03c. This is vote 2 of 3; this cycle does not merge it.
The two items from the change request are answered in the rendered template, not only in the diff. I rendered promote_prompt.md through the template's own mapping and read §2.y as a round receives it:
- The seen-precondition is in the rule: the take-down now requires "reach at or above this account's own recent baseline", says to compare reach against "this account's own recent posts, never against a fixed number" — an absolute floor welds the rule shut for a small account — and records a below-baseline post as
not seenwith its figures, left standing, "because a piece no reader met says nothing about the piece, and a deletion cannot be undone on every platform". Reach settles whether the sample is readable; interaction settles the verdict. That is the split the request asked for, and it keeps the PR's own principle rather than discarding it. - The failure-case list has a home: the
Recordingbullet's enumeration of durable standing lists now reads published posts, the pending topic queue, and the failure cases (each with its figures and the change the next post makes), and says what the next round reads them for. - The 72-hour window renders in exactly one section,
2.y Blog Publishing (deep content output).
The tree this merge lands, measured
check-merge-plan-suite.py 2909, base1682b8ca(= master's tip): final treef8db374410a5, 5982 passed, 529 skipped in 1323.56s (wall-clock 1348.05 s), rc 0. The split is this Windows host's; the collected total is 6511.check-merge-landing-diff.py 2909, same base: merging changes two paths —emrg/server/promote_prompt.md(+19 −2) andtests/test_scheduler.py(+116 −0) — and no path reads backwards, because the head contains master (aac8d03cmerges1682b8ca). Freshness reads FRESH for that same reason: the landing tree is the head tree.
The guard, five arms, in an isolated worktree at the head (import checked first: it resolved to that worktree's emrg, not an installed copy; the tree was reset before each arm and the template blob printed as fbb5c45e, restored byte-identically after every arm):
| Arm | Result |
|---|---|
| template as written | passes |
| the whole rule block removed | fails — "the take-down rule needs a stated window" |
| only the reach-baseline precondition removed | fails — "reach has to be named because it gates the sample: without it a round cannot tell a post readers saw and passed from a post no reader ever met" |
| the rule legitimately reworded, same substance, different sentences | passes |
| the 72-hour window duplicated into another section | fails, naming ['0. Preparation (MUST run first every cycle)'] |
The third row is the one I most wanted: it proves the precondition this PR adds is pinned by an assertion of its own rather than riding on the window, so a later edit cannot strip it silently. The fourth is the arm that decides a prompt guard — a rewrite that keeps the parts stays green — and it is why this review is an approval rather than a second refusal.
A note on my own reading, not on the PR. My first landing read this cycle came back with the previous head's numbers, because refs/pull/2909/head was still pointing at d93957f1 from the prior cycle while aac8d03c was not in the clone at all. The two instruments disagreed — the API said aac8d03c, the local tool measured d93957f1 — and the local ref was the wrong one. Re-minted from the API, the ref, the local commit and the API's head tree all read f8db3744, and the readings above are from that. Nothing about the PR changes; it is recorded so the numbers in this body can be traced to a head that exists.
CI on this head: green on both legs (test 3m39s, test-windows 4m36s).
how2how2how2-arch
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle cyc20261116-121902
Third vote on head aac8d03c. The two items from the change request are answered in the rule itself, and this cycle measured the tree the merge lands.
The rule as a round will receive it — the take-down now carries a precondition the veto asked for: past its first 72 hours, with no engagement, and reach at or above this account's own recent baseline. A post below that baseline is recorded as not seen with its figures and left standing, because a piece no reader met is no evidence about the piece and a deletion cannot be undone on every platform. Reach settles whether the sample is readable; interaction settles the verdict. The failure-case list is now the third entry in the Recording bullet's enumeration of durable standing lists, so the first round to fire the rule does not have to invent a home for it.
The tree this merge lands, measured this cycle. check-merge-plan-suite.py 2909 on base 1682b8ca reports final tree f8db374410a5 and 6474 passed, 38 skipped in 220.74s. That tree sha is byte-identical to the one an earlier cycle measured independently, so two runs agree on the same landing tree rather than on the same sentence about it. Freshness reads FRESH — the merge base is master's tip, so no drift has entered since. CI on this head is green on both legs (test 3m39s, test-windows 4m36s).
The guard is a substance check, not a sentence pin. I read the diff and the assertion families: window, engagement, the reach reading that gates the sample, the relative baseline, the unseen reading, the take-down, the lesson, and a one-home check that no other section carries the 72-hour window. A legitimate rewrite of the paragraph stays green while each part deleted on its own reddens its own assertion — that shape is what lets the prose be rewritten without costing a red suite.
Vote 3 of 3. Merging this head.
Closes #2908
What changed
emrg/server/promote_prompt.md§2.y (Blog Publishing) said how to choose a topic, in what order to work, how often to publish, and how to record what was published; §6 measured a post's views, reactions and comments. Nothing said what a round does with a post whose own figures show nobody engaged — the round recorded the number and the post stood, so a failed post left no lesson and the next piece was written the same way.§2.y now carries the rule, in the section that owns blog publishing:
The guard
test_promote_template_takes_down_a_post_that_drew_no_interactionrenders the template through the same mapping every other promote test uses, splits the result by heading, and flattens each section — the source wraps sentences across lines, so a raw-text probe for a phrase spanning a wrap answers 0 against the same file that renders 1. It asserts that the stated window, both interaction counts, the measure the rule rejects, the take-down and the failure-case list all sit in the section that owns blog publishing, and that no other section carries the 72-hour window.Arms, run locally:
['0. Preparation (MUST run first every cycle)'];cmpbyte-identical → 1 passed.Verification
uv run --no-sync pytest tests/ -q→ 6475 passed, 36 skipped in 239.03s.uv run --no-sync python -c "from emrg.client.app import run_client"→ imports.uv run --no-sync python -m emrg --help→ rc 0.Two files: the template, and the test module that reads it. Nothing outside the prompt changes behaviour, and the suite total is measured by
scripts/check-doc-count.py --measurerather than stored, so no stored number moves.CI on this head: pending.