diff --git a/emrg/server/competition_prompt.md b/emrg/server/competition_prompt.md index f8be1061..2cb2a00e 100644 --- a/emrg/server/competition_prompt.md +++ b/emrg/server/competition_prompt.md @@ -92,7 +92,8 @@ Read the session history and memory. **The round's unit of work is the set of AC - **Every round must traverse ALL active competitions**, each walked through `prepare → assess → execute one phase → record`. **"One phase per round" means one phase PER COMPETITION** (each competition advances at most one phase this round) — it is **not** a licence to work on only one competition, and §0.0 item 2 already requires the full traversal. - **Every competition must show an increment each round**, however small: a pending submission re-checked, a candidate gated, an artefact built, a decision recorded. A competition with genuinely nothing to do must be recorded as such **with a specific reason** — "I was busy with another competition", "it was waiting" and "it was already submitted" are **not** reasons. - **Open the round with a per-competition submission-quota ledger**: for every competition with quota remaining, either submit, or state a **specific** reason not to today. "Waiting for evidence", "no point submitting" and "did not get to it" do **not** count as reasons. -- **A quota that resets is spent across its period, not at the start of it.** A daily allowance is a supply of readings, and a batch spent in the first hour can only answer questions the round could already pose. Attempts kept for later, made once the earlier batch's result is readable, answer questions it could not — which is what the interval between batches buys, and why spending the whole allowance at once gives up more than it saves. The ledger therefore states the share it is taking now as a fraction of the allowance rather than the whole of it, the most one batch may carry, and the gap it will leave before the next; the last batch is placed so its result can still be read before the next reset. The fraction, the batch bound and the gap are calibrated from the platform's own reset time and allowance — what the ledger may not do is omit them. +- **A quota that resets is spent across its period, not at the start of it.** A daily allowance is a supply of readings, and a batch spent in the first hour can only answer questions the round could already pose. Attempts kept for later, made once the earlier batch's result is readable, answer questions it could not — which is what the interval between batches buys, and why spending the whole allowance at once gives up more than it saves. The ledger therefore states the share it is taking now as a fraction of the allowance rather than the whole of it, the most one batch may carry, and the gap it will leave before the next; the last batch is placed so its result can still be read before the next reset. The fraction, the batch bound and the gap are calibrated from the platform's own reset time and allowance — what the ledger may not do is omit them. Stated as a number, the gap is `86400 ÷ (n + 1)` seconds for an allowance of `n` submissions per day: `n` spends divide the day and the extra interval is the reading window the last of them needs, so one submission per day is paced at `43200` and two at `28800`. Where the day does not divide evenly the interval is rounded **up**, since a gap shorter than the division allows spends the attempt the ledger is trying to keep. A competition whose allowance is not daily, or that has none left to spend, states its gap as `86400` and the reason it is a day. +- **The allowance is a reading, not an inference from the counter.** After its last spend a platform reports that no submissions remain whatever `n` is, so "zero remaining today" is consistent with one per day and with five and cannot tell them apart — a pace set from it is off by whatever the round guessed, and a single-per-day competition reads as six. `n` comes from the platform's own stated allowance; where it states none, from the largest number of accepted submissions across the competition's own days of history. The ledger names which of the two it used, and when the configured allowance and the platform's disagree the platform's governs and the difference is recorded as its own reading. Priority when several competitions are live: @@ -339,6 +340,9 @@ Rules: - **Verbatim quotes only** in the `online-only` and `rejected because` fields — the whole point of the gate is that the evidence can be re-checked. - Keep the record convergent: an active entry is updated in place; a competition that ends (deadline passed, abandoned) moves to an archive entry with its round range, not deleted silently. +- **"Ended" is a reading about the competition, not a judgement about the work.** It is established by one of four things, each written with the field, quote or timestamp that carries it: the platform's own start/end fields show the end has passed; its prize or leaderboard page shows the award settled; its rules page shows a stage gate that closes what the round could still submit; or a hard constraint of §3 appears in evidence that did not exist before. A progress word is not one of them. +- **A competition archived this way leaves the traversal set.** §1 asks every *active* competition for an increment each round; an archived one is no longer active, so it is not traversed and the closing summary lists it with its final standing rather than among the live ones. What does **not** end a competition is difficulty — a wide gap to the payout line, a strong field, a slow lever or a long wait are `assess` material, and reaching for one of them as a reason to stop is the recommendation §0.0 already forbids. +- **When nothing in the set is live**, the round says exactly that in the closing summary: which competitions ended, the reading that ended each, and that the task now has no work to do. It does not manufacture an increment to keep itself running, and it does not switch itself off — the task's own configuration is the host's to change, so the summary hands the decision over as the question it is. - An entry marked rejected is never re-evaluated; a "needs a human read" entry is re-checked. --- diff --git a/tests/test_competition_prompt.py b/tests/test_competition_prompt.py index 36e22df2..d909e807 100644 --- a/tests/test_competition_prompt.py +++ b/tests/test_competition_prompt.py @@ -1833,3 +1833,125 @@ def test_the_rules_are_re_read_because_they_are_amended_after_publication(render "the thread is allowed to override the page, which inverts the authority the section exists " "to place — the page is the rule and the thread is where it was corrected" ) + + +# --- what paces a round's submissions, and what ends a competition ---------------------------- +# +# Two general rules the template left to each installation, found in three competition tasks' +# own memory, which had each derived the same arithmetic for its own allowance and each written +# down its own version of the end condition. Neither is a fact about one installation: the pace +# follows from the allowance and the day, and the end condition follows from what the platform +# says about the competition. Asserted against the sections that own the subjects, for the reason +# the guards above give — this file discusses allowances and archiving in several places, so a +# whole-document substring check stays green after the section itself is deleted. + + +def _cross_round(text: str) -> str: + return _section(text, "### 4. Cross-round state lives in the session and its memory", "### 5.") + + +def test_the_gap_between_batches_is_stated_as_arithmetic(rendered): + """§1: the ledger states the gap, so the gap has to be computable. + + The rule that a quota is spent across its period was already here; what was missing is the + number, so every installation recomputed it and three competitions derived the same form — + `86400 ÷ (n + 1)`, giving 43200 for one submission a day, 7854 for ten, 28800 for two. A rule + that says "state the gap" without saying how the gap is computed is a rule each round answers + differently. + """ + body = _flat(_assess(rendered)) + assert "86400 ÷ (n + 1)" in body, ( + "§1 no longer states the gap as arithmetic, so each round is free to invent its own interval" + ) + assert "43200" in body and "28800" in body, ( + "the form is stated without a worked value for either end of the range, so a round cannot " + "check its own substitution against anything" + ) + assert "rounded **up**" in body, ( + "an allowance that does not divide the day evenly has no stated rounding direction, and the " + "two directions differ by whether the round spends an attempt it meant to keep" + ) + assert "day" in body and "n + 1" in body, ( + "the reason the divisor is n + 1 rather than n is unstated — the reading window after the " + "last spend is what the extra interval buys" + ) + assert "not daily" in body, ( + "a competition with no daily allowance now has no rule for its gap, which is the case the " + "arithmetic cannot answer" + ) + + +def test_the_allowance_is_read_and_not_inferred_from_the_counter(rendered): + """§1: "zero remaining today" is necessarily true after the last spend, whatever `n` is. + + A counter that answers zero for one submission a day and for five cannot distinguish them, so + an allowance read from it is a guess wearing the clothes of a reading. The rule names the two + admissible sources and keeps the platform's number above the configured one. + """ + body = _flat(_assess(rendered)) + assert "not an inference from the counter" in body, ( + "§1 no longer says the allowance is a reading, so inferring it from the counter is licensed " + "again" + ) + assert "whatever `n` is" in body or "whatever n is" in body, ( + "the tautology is not stated, so the reason the counter is inadmissible is left to be " + "rediscovered" + ) + assert "accepted submissions across the competition's own days of history" in body, ( + "the fallback source for an allowance the platform never states is gone" + ) + assert "the platform's governs" in body, ( + "a configured allowance that disagrees with the platform's is no longer resolved, so both " + "numbers stand and every round picks one" + ) + + +def test_a_competition_ends_on_evidence_and_difficulty_is_not_evidence(rendered): + """§4: the archive rule existed and never said what establishes that a competition ended. + + "Ended" is the one judgement that removes a competition from the set every round has to + traverse, so it is the judgement most worth pinning to a reading — and the one where the wrong + evidence is closest to hand, since a wide gap and a slow lever feel like reasons to stop. + """ + body = _flat(_cross_round(rendered)) + assert "ended" in body.lower() and "four things" in body, ( + "the four evidence forms that establish an end are gone, so any progress word can archive a " + "competition" + ) + assert "a progress word is not one of them" in body.lower(), ( + "nothing excludes the status word the rule exists to keep out" + ) + assert "leaves the traversal set" in body, ( + "§1 still demands an increment from every competition, including one this section archived" + ) + assert "does **not** end a competition is difficulty" in body or "does not end a competition is difficulty" in body, ( + "the reverse guard is gone: difficulty, field strength and waiting can be read as an end " + "again, which is the slowdown §0.0 forbids arriving through another door" + ) + assert "§0.0" in body, ( + "the link back to the no-slowdown rule is missing, so the same recommendation can pass here " + "while being refused there" + ) + + +def test_a_round_hands_the_stopped_task_to_the_host_rather_than_switching_it_off(rendered): + """§4: with every competition ended, the round says so — and does not act on it. + + An empty traversal set has two wrong answers: manufacture an increment to keep the task alive, + or switch the task off. The configuration is the host's file, and a round that edits it is + doing the thing the cycle's own rules forbid, so the decision is handed over in the summary. + """ + body = _flat(_cross_round(rendered)) + assert "nothing in the set is live" in body, ( + "the empty set has no rule, so a round with nothing to do chooses its own answer" + ) + assert "does not manufacture an increment" in body, ( + "the first wrong answer is not excluded" + ) + assert "does not switch itself off" in body, ( + "the second wrong answer is not excluded — the template would licence editing the host's " + "task configuration" + ) + assert "host's to change" in body, ( + "the rule does not say whose decision it is, which is the whole content of the hand-over" + )