Skip to content

test(#570,#572) + docs(#566): seed layer A, pin the six contracts, reduce the gate to four words - #591

Merged
TomiToivio merged 2 commits into
mainfrom
test/570-layer-a-seeded-playthroughs
Oct 25, 2026
Merged

TomiToivio merged 2 commits into
mainfrom
test/570-layer-a-seeded-playthroughs

Conversation

@TomiToivio

Copy link
Copy Markdown
Owner

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.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 (rng) and the sheet test threads it through — the kernel already accepted rng, the engine never passed one.
  • scripts/noopunk_text.py --seed INT. Unseeded stays tabletop-random.
  • Two seeded layer-A scenarios in the harness (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.
  • Saves are excluded from the layer-A comparison, and the reason is in the code: simulation_id is 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):

contract pinned
physical intrusion a local path is a route only with local_presence
air-gapped impossible in all three eras, even with presence + authority; the reason changes, the verdict never does
never a network social_tie, personal_contact, faction_relationship, influence_edge, network_edge are refused ids, not paths
natural PSI capability gate fires before dice; and PSI resolves while the same target is unreachable — it is not a remote login
psychotronic device in the catalogue, but psi.py still 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"
BCI message no route ⇒ no message; the quarantine route is a containment_breach, a crime rather than a check
astral transition one locus, one realm; the body is uncontrollable; a dive cannot become a projection

Only 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 stray noopunk-save.json produced 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.

Ai (愛) added 2 commits October 25, 2026 20:24
…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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T18:30:26.427792Z 70cce63 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +130 to +132
def test_the_catalog_carries_psychotronic_devices(self) -> None:
entries = catalog.search_catalog("psychotronic")
self.assertTrue(entries, "the equipment catalog must name psychotronic devices")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +280 to +282
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@TomiToivio TomiToivio changed the title test(#570,#572): seed layer A, and pin the six extension contracts test(#570,#572) + docs(#566): seed layer A, pin the six contracts, reduce the gate to four words Oct 25, 2026
@TomiToivio
TomiToivio merged commit 5ad180e into main Oct 25, 2026
4 checks passed
@TomiToivio
TomiToivio deleted the test/570-layer-a-seeded-playthroughs branch October 25, 2026 18:30
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.

1 participant