Repository navigation
test(#570,#572) + docs(#566): seed layer A, pin the six contracts, reduce the gate to four words - #591
Conversation
…t open The matrix closed every #569 item except 'a complete repository-wide similarity audit remains outstanding'. This runs it as an n-gram containment audit, not a keyword ban: - blocked corpus: SWN Revised + AWN free editions (10-word runs, hashed, no text retained) - attributable corpus: the CC0 CWN + WWN SRDs, so a hit that is SRD wording is classified as attributable instead of being called a violation - 946 text files scanned, 0 first-party hits, 0 blocked-only hits - one finding: docs/archive/RULEBOOK.md has 32 runs that all also occur in the CC0 SRD, and sits inside the archive quarantine -> report, do not delete Honest limit recorded in the doc: the corpus is not shippable, so a CI similarity gate is impossible; the release packaging guard remains the CI gate and this is an operator tool. 9 code tests pin normalisation, detection-vs-paraphrase, attribution and quarantine.
#570 listed the legacy Helsinki/UNSA case as a scenario, but the harness only covered layer B, and layer A could not be replayed: scripts/noopunk_text.py had no seed, so the legacy kernel consumed the global generator and two runs differed on the roll line. - GameEngine gains an optional dice source; the sheet test threads it through (the kernel already accepted rng, the engine did not pass one) - scripts/noopunk_text.py --seed INT; an unseeded run keeps tabletop randomness - two seeded layer-A scenarios (prefall, issue74) in the harness, each with a real check, so stdout equality proves the seed reaches the dice. Saves are excluded from the comparison: simulation_id is minted per process. #572's gate asks for six worked examples; five are reachability/permission/locus, which are decided before any die, so they are pinnable now: physical intrusion needs a body on site; an air-gapped target cannot be entered remotely at any price in any era; the five social-tie path ids are refused outright; natural PSI resolves while the same target is unreachable (so it is not a remote login); a psychotronic device exists in the catalogue but psi.py still gates on the natural capability (a recorded gap, not papered over); a BCI message needs a modelled route and the quarantine route is a containment breach; astral projection has one locus, one realm, and a body nobody controls.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70cce63944
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def test_the_catalog_carries_psychotronic_devices(self) -> None: | ||
| entries = catalog.search_catalog("psychotronic") | ||
| self.assertTrue(entries, "the equipment catalog must name psychotronic devices") |
There was a problem hiding this comment.
Replace the authored-catalog wording assertion with a fixture
This test searches the actual authored rulebook markdown through equipment_catalog_index.SOURCES and requires it to contain “psychotronic”, so an editorial wording change can fail the software suite without any executable behavior changing. The automated tests policy in AGENTS.md explicitly forbids text-matching assertions for lore, canon, or wording. Remove this content assertion or exercise catalog searching against synthetic entries instead.
AGENTS.md reference: AGENTS.md:L14-L14
Useful? React with 👍 / 👎.
| blocked = corpus_from_paths([*args.source, *args.source_text]) | ||
| cc0 = corpus_from_paths(args.cc0_source) | ||
| report = audit(blocked, cc0, Path(args.root), args.words) |
There was a problem hiding this comment.
Use the requested run length when building both corpora
When an operator supplies a nondefault --words value (--help advertises it as “run length”), only the repository scan receives that value; corpus_from_paths() still builds both corpora with the fixed ten-word default. Consequently, even an exact copy is reported as clean: scanning an identical twelve-word source and target returns three hits with --words 10, but zero hits and exit status 0 with either --words 5 or --words 12. Thread the requested size through corpus construction as well as scanning so the audit does not falsely clear copied material.
Useful? React with 👍 / 👎.
What this lands — two of the four issues you named
#570 — the layer-A scenario the harness claimed but did not cover
The issue lists "the legacy Helsinki/UNSA case (layer A)" as a scenario. The merged harness covered six layer-B scenarios; layer A was absent, and could not have been covered as-is:
scripts/noopunk_text.pyhad no seed, so the legacy kernel consumed the global generator and two runs differed on the roll line.GameEnginegains an optional dice source (rng) and the sheet test threads it through — the kernel already acceptedrng, the engine never passed one.scripts/noopunk_text.py --seed INT. Unseeded stays tabletop-random.prefall,issue74), each running a real check, so stdout equality proves the seed actually reaches the dice. Verified by hand too: seed 42 →roll 81 vs 55, seed 42 →81, seed 43 →4.simulation_idis minted per process, so the JSON is deliberately unique even when the play is identical.#572 — the six worked examples, pinned as contracts
The issue's gate asks for a physical intrusion, an air-gapped target, a natural PSI attempt, a psychotronic device, a BCI-mediated message and an astral transition. Five of the six are reachability / permission / locus, which the map says must be decided before any die — so they do not depend on #566 and are pinned now (
strategy_game/tests/test_issue572_extension_contracts.py, 16 tests):local_presencesocial_tie,personal_contact,faction_relationship,influence_edge,network_edgeare refused ids, not pathspsi.pystill gates on natural capability only — pinned as a recorded gap, because the map says a device session "may be used by someone who lacks natural PSI"containment_breach, a crime rather than a checkOnly the numeric half stays gated on #566, and the doc now says which half that is.
Gates
python -m unittest discover -s tests→ 637 OK;discover -s strategy_game/tests→ 1795 OK (1779 + 16 new). One straynoopunk-save.jsonproduced by my manual CLI probing was deleted before the run — the release guard catches exactly that, which is why it appeared.Part of #564. #570 was closed by #577/#584; this closes the scenario gap it left. #572 stays open on #566.