diff --git a/emrg/server/evolution_prompt.md b/emrg/server/evolution_prompt.md index 3453cf79..913107b5 100644 --- a/emrg/server/evolution_prompt.md +++ b/emrg/server/evolution_prompt.md @@ -112,7 +112,7 @@ For each: **merged** → confirm master is healthy after it, with no regression; #### 1.3 Your own records and the rant queue -Read the last 3–5 cycle records in memory and look for: the same trivial change made repeatedly (batch it), the same feature fixed over and over (refactor it), a change that had no lasting effect, or consecutive "nothing to evolve" cycles while rants are non-empty (re-check — that is a contradiction, not a state). Then read the rant queue with `submit_rant(action="list")` — the tool is the only way it is read (R6). +Read the memory index already embedded in this prompt (§1.5 rules out re-reading it as a file) and look for: the same trivial change made repeatedly (batch it), the same feature fixed over and over (refactor it), a change that had no lasting effect, or consecutive "nothing to evolve" cycles while rants are non-empty (re-check — that is a contradiction, not a state). Then read the rant queue with `submit_rant(action="list")` — the tool is the only way it is read (R6). #### 1.4 master @@ -312,7 +312,7 @@ gh issue comment "$ISSUE" -R {{ owner }}/{{ repo }} --body "Handled by #cyc\d{8}-\d{6})`") +#: The id the same render tells the cycle to name this run by (§4 Record). Anchored on the +#: declaration rather than on a bare ``cyc…`` token: the vote examples below are cycle ids +#: too, and they come before it in the file, so a token scan would read an example as the +#: declaration and check the examples against themselves. +CYCLE_ID = re.compile(r"The cycle id — `(?Pcyc\d{8}-\d{6})` —") def _load_counter(): @@ -119,11 +122,12 @@ def _instructed_examples(text: str) -> list[str]: return [m.group("body") for region in regions for m in VOTE_EXAMPLE.finditer(region)] -def _record_id(text: str) -> str: - match = RECORD_ID.search(text) +def _declared_cycle_id(text: str) -> str: + match = CYCLE_ID.search(text) assert match is not None, ( - "the rendered prompt no longer states the cycle record's id (``id``: ``cyc…``) — " - "without it the examples below have nothing to be checked against" + "the rendered prompt no longer declares this run's cycle id " + "(``The cycle id — `cyc…` —``) — without it the examples below have nothing to be " + "checked against" ) return match.group("id") @@ -132,7 +136,7 @@ def test_the_instructed_vote_examples_name_exactly_one_cycle_id(rendered, counte """Each example body attributes the vote to exactly one cycle — this cycle.""" examples = _instructed_examples(rendered) assert len(examples) == 3, f"expected 3 instructed examples, found {len(examples)}" - cycle_id = _record_id(rendered) + cycle_id = _declared_cycle_id(rendered) for body in examples: ids = counter.distinct_cycle_ids(body) assert ids == [cycle_id], (