Skip to content

emrg: the promote summary's blocked field states one availability rule - #2584

Closed
pm25coder wants to merge 1 commit into
masterfrom
fix/the-blocked-field-states-one-rule
Closed

pm25coder wants to merge 1 commit into
masterfrom
fix/the-blocked-field-states-one-rule

Conversation

@pm25coder

Copy link
Copy Markdown
Collaborator

Closes #2581

What this changes

emrg/server/promote_prompt.md, two places, one rule:

  • The summary template's blocked field (§4.1) now states one availability rule. It kept the per-channel requirement it was given and lost the clause empty = no blocker, which that requirement makes unreachable: an account holding one channel owes that channel a line in every round, so the field is empty only when there is no channel at all. What replaces it says the same thing the retired clause was trying to say — no blocker is stated per line, never by leaving the field empty.
  • The zone list (§4.4, "C. Channel status") no longer restates the rule. It keeps its own job — naming blocked as the single field that owns channel availability — and points at the form §4.1 gives it. The template's §4.2 states why: a fact written twice will eventually disagree with itself.

The per-channel sentence itself is untouched, deliberately: tests/test_prompt_templates.py::PROMOTE_METHOD_RULES pins that phrase's position and its single occurrence, and a rewrite that reworded it would have moved a guard nobody asked to move.

The guard

Four new tests in tests/test_prompt_templates.py, in the section shape that file already uses:

  • the field carries the per-channel rule;
  • the template states no clause the field cannot satisfy, and says how "no blocker" is recorded instead;
  • the phrase the rule is written in occurs once, in the field that owns it, and not in the zone list. Named limit: this counts that phrase, so a restatement in other words would pass.
  • a discriminating test whose arms are built from the live text with each premise asserted first, so an arm whose edit landed nowhere fails loudly instead of measuring nothing.

Verification, on the tree this PR lands

Measured 2026-10-26 on base ad8f44c (master) with this branch merged in — the head is 4ecaf86 locally, 89f58d7d on the remote, content identical.

  • tests/test_prompt_templates.py: 54 passed (50 before this change + 4 new).
  • Full suite: 5385 passed, 512 skipped (908.92s, exit 0). The suite read 5381 before this change, so the delta is exactly the four new tests.
  • scripts/check-doc-count.py: exit 0 — no tracked file states the Python test count; --measure reads 5893 collected tests at ad8f44c.
  • python -m emrg --help: exit 0. from emrg.client.app import run_client: imports.
  • Five mutation arms, each restored afterwards to a byte-identical file (git hash-object matched the pre-mutation blob every time):
Arm Mutation Guard that failed
A1 put empty = no blocker back into the field test_the_blocked_field_states_no_clause_it_cannot_satisfy
A2 every channel → each channel test_the_blocked_field_carries_the_per_channel_rule
A3 copy the rule back into the zone bullet test_the_per_channel_blocked_rule_has_one_home
A4 drop the replacement clause test_the_blocked_field_states_no_clause_it_cannot_satisfy (second assertion)
A5 remove "not run" from the field the first and third guards, plus the arms test — the rule left its only home

CI on this head: pending as this PR is opened; it is not reported as green.

@pm25coder

Copy link
Copy Markdown
Collaborator Author

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 promote summary's blocked field states two availability rules and can satisfy one

1 participant