From df36a6c10f0eeab0daa6085bf4ecea59db6e9810 Mon Sep 17 00:00:00 2001 From: argszero Date: Mon, 16 Nov 2026 03:40:03 +0800 Subject: [PATCH 1/3] emrg: a post that drew no interaction is taken down and read as a failure --- emrg/server/promote_prompt.md | 9 ++++ tests/test_scheduler.py | 80 +++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) diff --git a/emrg/server/promote_prompt.md b/emrg/server/promote_prompt.md index a4e9e27c6..6244ff9d2 100644 --- a/emrg/server/promote_prompt.md +++ b/emrg/server/promote_prompt.md @@ -246,6 +246,15 @@ Different from participatory forum replies: this is long-form output on your own whether the words differ. The single exception is a **verbatim** cross-post of the original carrying its source link — a backup copy, which the reader can tell apart from a second article. +- **A post that drew no interaction is taken down, and read as a failure rather than left + standing**: once a published post is past its first **72 hours** and its own figures say nobody + engaged — zero reactions and zero comments from anyone but this account — remove it from the + platform and record it in the failure-case list: the title, the date, the form it took, what the + piece was trying to do, and the one change the next post makes. Judge it on **interaction, never + on views**: reach is the platform's distribution, while engagement is the only evidence a reader + took the piece. Take down nothing that drew any engagement at all, and nothing still inside its + first 72 hours. The removal is not how the round forgets the post — the failure case is what it + buys, and a deletion with no recorded lesson lets the same post fail twice. - **Recording**: this round's closing summary carries the round's `blog posts` and `blog drafts` lines (§4); the standing lists — published posts (title + platform + link + publish time + topic) and the pending topic queue — are durable facts and live in memory diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index da27571d7..329a30276 100644 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -1851,6 +1851,86 @@ def test_promote_template_registration_blog_sections(): assert "Registered accounts are long-term assets" in out, "红线 7 账号长期资产应渲染" +def _promote_rendered_sections() -> dict[str, str]: + """The rendered promote prompt, split by heading, each section flattened. + + Flattened for the same reason the self-media guard flattens: the source wraps a sentence + across lines, so a probe for a phrase that spans a wrap reads **0** against the raw render + and **1** against the same text with its whitespace collapsed. A probe that cannot hit is + not a finding. + """ + import jinja2 + + template_path = ( + Path(__file__).resolve().parent.parent + / "emrg" / "server" / "promote_prompt.md" + ) + env = jinja2.Environment(undefined=jinja2.Undefined) + template = env.from_string(template_path.read_text(encoding="utf-8")) + out = template.render(**_test_context( + instance_id="test", host_name="host", repo_url="https://github.com/x/y.git", + owner="x", repo="y", local_source="/tmp/pm", source_dir="/tmp/pm", + session_id="s1", timestamp="20260815", task={"agent": "aitokenpool"}, + agent={"path": "/tmp/proj", "name": "aitokenpool", "description": "d"}, + )) + + sections: dict[str, str] = {} + name, body = "PREAMBLE", [] + for line in out.splitlines(): + if line.startswith("#"): + sections[name] = " ".join(" ".join(body).split()) + name, body = line.strip("# ").strip(), [] + else: + body.append(line) + sections[name] = " ".join(" ".join(body).split()) + return sections + + +def test_promote_template_takes_down_a_post_that_drew_no_interaction(): + """§2.y owns blog publishing, and owns what becomes of a post that drew nothing. + + The template measures a post's interaction (§6) and stated no action for a post whose own + figures say 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. The section carrying the + rule is asserted, not the file: a rule read after the publishing decision it informs is a + rule the round meets too late. + """ + sections = _promote_rendered_sections() + + owning = [name for name in sections if "Blog Publishing" in name] + assert owning, ( + "no rendered section owns blog publishing, so the readings below have no subject and " + "would pass vacuously" + ) + body = sections[owning[0]] + + assert "72 hours" in body, ( + "the take-down rule needs a stated window: without one a round cannot tell a post that " + "drew nothing from one nobody has had a chance to read yet" + ) + assert "reactions" in body and "comments" in body, ( + "the criterion is what readers did — reactions and comments — and it has to be named " + "in the section a round reads before it publishes" + ) + assert "views" in body, ( + "the rule judges interaction rather than reach, so it has to name the measure it rejects; " + "a round reading only the accepted one cannot tell the two apart" + ) + assert "remove it from the platform" in body, ( + "the action is a take-down, not a note: a post nobody engaged with keeps carrying this " + "account's name on the channel for as long as it stands" + ) + assert "failure-case list" in body, ( + "a deletion with no recorded lesson lets the same post fail twice, so the rule carries " + "what the removal buys: the failure case, with the change the next post makes" + ) + + elsewhere = [name for name, text in sections.items() if "72 hours" in text and name != owning[0]] + assert not elsewhere, ( + f"the take-down window has one home, §2.y, and these sections carry it too: {elsewhere}" + ) + + # ── Evolution workspace self-heal (rant 2026-08-06T20:42:05, 方案 C) ────── From d93957f106b804f3e08f6c54641e451126aae45c Mon Sep 17 00:00:00 2001 From: argszero Date: Mon, 16 Nov 2026 05:55:47 +0800 Subject: [PATCH 2/3] emrg: a prompt guard asserts the rule, not one phrasing of it --- tests/test_scheduler.py | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index 329a30276..71ed7d9d1 100644 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -1904,28 +1904,44 @@ def test_promote_template_takes_down_a_post_that_drew_no_interaction(): ) body = sections[owning[0]] - assert "72 hours" in body, ( + # The rule is asserted through the forms each part may take, never through one sentence: + # a guard that pins a phrasing reddens when the sentence is legitimately rewritten, which + # makes the rewriting of prose — the thing a prompt template exists for — cost a red suite. + # What must not drift is the substance: a stated window, the criterion, the measure it + # rejects, the action, and what the action buys. + 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) + + assert window.search(body), ( "the take-down rule needs a stated window: without one a round cannot tell a post that " "drew nothing from one nobody has had a chance to read yet" ) - assert "reactions" in body and "comments" in body, ( + assert engagement.search(body) and discussion.search(body), ( "the criterion is what readers did — reactions and comments — and it has to be named " "in the section a round reads before it publishes" ) - assert "views" in body, ( + assert reach.search(body), ( "the rule judges interaction rather than reach, so it has to name the measure it rejects; " "a round reading only the accepted one cannot tell the two apart" ) - assert "remove it from the platform" in body, ( + assert removal.search(body), ( "the action is a take-down, not a note: a post nobody engaged with keeps carrying this " "account's name on the channel for as long as it stands" ) - assert "failure-case list" in body, ( + assert lesson.search(body), ( "a deletion with no recorded lesson lets the same post fail twice, so the rule carries " "what the removal buys: the failure case, with the change the next post makes" ) - elsewhere = [name for name, text in sections.items() if "72 hours" in text and name != owning[0]] + elsewhere = [name for name, text in sections.items() if window.search(text) and name != owning[0]] assert not elsewhere, ( f"the take-down window has one home, §2.y, and these sections carry it too: {elsewhere}" ) From 1399ad9564e09028aa66be73dffd1ef1a38eb948 Mon Sep 17 00:00:00 2001 From: argszero Date: Mon, 16 Nov 2026 08:03:26 +0800 Subject: [PATCH 3/3] emrg: a post nobody saw is recorded as unseen, not deleted as a failure --- emrg/server/promote_prompt.md | 28 ++++++++++++++++++---------- tests/test_scheduler.py | 28 ++++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/emrg/server/promote_prompt.md b/emrg/server/promote_prompt.md index 6244ff9d2..fbb5c45e3 100644 --- a/emrg/server/promote_prompt.md +++ b/emrg/server/promote_prompt.md @@ -247,18 +247,26 @@ Different from participatory forum replies: this is long-form output on your own original carrying its source link — a backup copy, which the reader can tell apart from a second article. - **A post that drew no interaction is taken down, and read as a failure rather than left - standing**: once a published post is past its first **72 hours** and its own figures say nobody - engaged — zero reactions and zero comments from anyone but this account — remove it from the - platform and record it in the failure-case list: the title, the date, the form it took, what the - piece was trying to do, and the one change the next post makes. Judge it on **interaction, never - on views**: reach is the platform's distribution, while engagement is the only evidence a reader - took the piece. Take down nothing that drew any engagement at all, and nothing still inside its - first 72 hours. The removal is not how the round forgets the post — the failure case is what it - buys, and a deletion with no recorded lesson lets the same post fail twice. + standing — but only once it was actually seen**: past its first **72 hours**, with **no + engagement** (zero reactions and zero comments from anyone but this account) **and reach at or + above this account's own recent baseline**, remove it from the platform and record it in the + failure-case list: the title, the date, the form it took, what the piece was trying to do, and + the one change the next post makes. Compare reach with **this account's own recent posts**, + never against a fixed number: an absolute floor welds the rule shut for a small account, whose + per-post reach is small by nature. A post whose reach sits **below** that baseline was not seen + rather than rejected — record it as `not seen` with its figures and leave it up, 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 — views are + never the verdict itself, and nothing that drew any engagement at all comes down, nor anything + still inside its first 72 hours. The removal is not how the round forgets the post — the + failure case is what it buys, and a deletion with no recorded lesson lets the same post fail + twice. - **Recording**: this round's closing summary carries the round's `blog posts` and `blog drafts` lines (§4); the standing lists — published posts (title + platform + link + - publish time + topic) and the pending topic queue — are durable facts and live in memory - entries, which is what the next round reads before publishing to avoid a duplicate. + publish time + topic), the pending topic queue, and the failure cases (each with its figures and + the change the next post makes) — are durable facts and live in memory entries, which is what + the next round reads before publishing to avoid a duplicate, and what it reads before writing + the next piece to avoid repeating a failure. Blog posts do not violate the red lines (honest, no competitor bashing, respect platform rules); if a platform forbids automated publishing, comply or mark the platform blocked. diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py index 71ed7d9d1..8b3ad27b8 100644 --- a/tests/test_scheduler.py +++ b/tests/test_scheduler.py @@ -1907,12 +1907,17 @@ def test_promote_template_takes_down_a_post_that_drew_no_interaction(): # The rule is asserted through the forms each part may take, never through one sentence: # a guard that pins a phrasing reddens when the sentence is legitimately rewritten, which # makes the rewriting of prose — the thing a prompt template exists for — cost a red suite. - # What must not drift is the substance: a stated window, the criterion, the measure it - # rejects, the action, and what the action buys. + # What must not drift is the substance: a stated window, the engagement criterion, the + # reach reading that gates the sample, the precondition that the post was seen, the action, + # and what the action buys. 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) + baseline = re.compile( + r"\b(?:baselines?|recent posts?|recent average|own average|its own recent)\b", re.I + ) + unseen = re.compile(r"\bnot[-\s]?seen\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", @@ -1929,8 +1934,18 @@ def test_promote_template_takes_down_a_post_that_drew_no_interaction(): "in the section a round reads before it publishes" ) assert reach.search(body), ( - "the rule judges interaction rather than reach, so it has to name the measure it rejects; " - "a round reading only the accepted one cannot tell the two apart" + "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, and the second is not evidence " + "about the piece" + ) + assert baseline.search(body), ( + "reach is judged against this account's own recent posts, never a fixed number: an " + "absolute floor welds the rule shut for a small account, whose per-post reach is small " + "by nature, and the section has to say what the comparison is" + ) + assert unseen.search(body), ( + "a post below the baseline was not seen, not rejected, and the rule has to record it that " + "way — deleting it marks a piece as a failure on evidence nobody ever met" ) assert removal.search(body), ( "the action is a take-down, not a note: a post nobody engaged with keeps carrying this " @@ -1940,6 +1955,11 @@ def test_promote_template_takes_down_a_post_that_drew_no_interaction(): "a deletion with no recorded lesson lets the same post fail twice, so the rule carries " "what the removal buys: the failure case, with the change the next post makes" ) + listing = sections[owning[0]] + assert re.search(r"standing lists", listing, re.I), ( + "the failure-case list is a standing list, and the enumeration that carries the other " + "standing lists has to carry it: a round reaches for it and nothing says where it lives" + ) elsewhere = [name for name, text in sections.items() if window.search(text) and name != owning[0]] assert not elsewhere, (