Repository navigation
Conversation
abu-aska
left a comment
There was a problem hiding this comment.
The isolated gameplay-evidence commit ee2c2439 (4 files, +1,163/-0) is clean, zero-dependency, and passes 32/32 OK in tests/test_gameplay_evidence.py across -I -B, -I -O -B, and -I -B -W error (with zero bare asserts; rejects float 1.0/-0.0, NaN/Inf, duplicate JSON keys, int64 overflow, passed=1, cyclic objects, and enforces the mixed PASS+FAIL veto).
However, four concrete blocking issues (branch stacking, failing CI, recursion DoS, and surrogate/cross-repo parity bugs) should be resolved before merge:
- Branch stacked on an older commit of PR
#16(463files+137,882/-5/48commits vs.main @ 575286f0):ee2c2439's parent isd8e92d84201a(one commit behind open PR#16 @ 8695c9e9, which itself builds on#6/#7/#15), pulling459unrelated files (47commits, including+110lines in.github/workflows/ci.yml) into PR#17.- Please rebase/cherry-pick
ee2c2439cleanly ontomain(or hold until#6/#16land) so the PR diff contains only the4gameplay-evidence files.
- Failing CI (
standalone (ubuntu-24.04)&standalone (windows-2022)in run45046280747):- Both runners fail
python -m mcproof.prose_gatewith3findings ondocs/GAMEPLAY_EVIDENCE.md(reproduced locally,rc=1):docs/GAMEPLAY_EVIDENCE.md:28: em dash (T2) (envelope—not)docs/GAMEPLAY_EVIDENCE.md:30: semicolon stitching clauses (T2)docs/GAMEPLAY_EVIDENCE.md: paragraph over 420 chars on lines[16, 28].
- (Confirmed locally:
verification/leak_audit.pypasses286files andverification/build_final_receipt.pyleavesverification/VERIFICATION_RECEIPT.jsonclean.)
- Both runners fail
- Uncaught
RecursionErrorDoS crash on deeply nested JSON (src/mcproof/gameplay_evidence.py:64-91, 203-233):_strict_json_treeand_validate_canonical_valuerecurse with no depth or size limit.- Reproduced live: a
1,200-deep nested array inpayload.outcomepassesload_gameplay_artifactand then crashesverify_gameplay_artifactwith an unhandledRecursionError: maximum recursion depth exceeded(contrastwarp-drive#36, which validates iteratively withGateLimits(max_depth=32)and returnsenvelope_valid=False). Convert traversal to an explicit stack with depth/size ceilings.
- Unpaired UTF-16 surrogates silently accepted in envelope fields (
src/mcproof/gameplay_evidence.py:66, 101, 205):- UTF-8 encodability is checked only on
source["raw"](L366), whilecanonical_json_bytesusesjson.dumps(..., ensure_ascii=True)(L101), silently escaping unpaired surrogates ("\ud800"->\ud800). - Reproduced live: an artifact with
"claim.statement": "bad \ud800 surrogate"returnsvalid=True, source_badges=['OBSERVED', 'REPLAYED']here, whilewarp-drive#36rejects it (INVALID_UNICODE). Validate.encode("utf-8")on every string and object key in_strict_json_treeand_validate_canonical_value.
- UTF-8 encodability is checked only on
Cross-Repo Parity & Minor Hygiene Notes
- Cross-repo
gameplay-evidence/v0.1contract reconciliation withMoissanite-Labs/warp-drive#36:payload.modelandpayload.initial_state:mcproof#17(L274-284,schema:68,70) accept anyjsonValue([1,2,3]), whilewarp-drive#36(L397-399) requiresdict.source.raw == "": accepted here (L336,schema:115), rejected inwarp-drive#36(L450).mechanics[*].path: accepted here forCORE.YAML(rejected inwarp-drive#36); also both validators currently accept bare".yaml", newlines ("mechanics/a\nb.yaml"), and Windows drive prefixes ("C:foo.yaml").negative_controls[*].mutation/.observedandidentifierregex (^[A-Za-z0-9_.:-]+$): properly enforced here, currently missing/looser inwarp-drive#36.
- Minor input & fixture precision:
REPOSITORY_RE(L58) matches"../..",COMMIT_RE(L56) accepts"0" * 40, raw JSON-0parses asint(0)viajson.loads(L130), and the PR body states the two pinned acceptance fixture digests (c852b43bfa6c...,0a310102c655...) "are recorded in the accompanying implementation commit and documentation", but neither digest appears in the4committed files ofee2c2439.
Independent clean-room review by agentic team with human oversight (aletheia v2.0.0, live CI & adversarial repro).
abu-aska
left a comment
There was a problem hiding this comment.
Clean-room re-verification of 51d241333194 (base feat/formal-verification-loop-v0.2 @ c2ed9ca5, 4 files +1,167/-0, 0 workflow changes, 6/6 CI green).
Blockers Closed Since ee2c2439
- Blocker #1 (branch stacking) — CLOSED: PR diff is now cleanly scoped to the
4gameplay-evidence files (docs/GAMEPLAY_EVIDENCE.md,schema/gameplay-evidence-v0.1.schema.json,src/mcproof/gameplay_evidence.py,tests/test_gameplay_evidence.py,+1,167/-0,0.github/changes). - Blocker #2 (CI /
mcproof.prose_gate) — CLOSED: Confirmed locally across-B,-O -B, and-B -W error:python3 -m mcproof.prose_gate docs/GAMEPLAY_EVIDENCE.mdprintscheck-prose: clean (1 file(s), 34 lines).tests/test_gameplay_evidence.pypasses32/32 OKacross all 3 standard modes (-B,-O -B,-B -W error) and all 3 isolated modes (-I -B,-I -O -B,-I -B -W error), andaletheia v2.0.0 audit-check --strict-ancestors --safety-scanpasses on all4/4files (0findings).
Remaining Open Blockers (Unchanged Since ee2c2439, src/mcproof/gameplay_evidence.py Untouched)
Commit 51d24133 updated only docs/GAMEPLAY_EVIDENCE.md, so both runtime fail-closed blockers in src/mcproof/gameplay_evidence.py still reproduce live:
- Uncaught
RecursionErrorDoS on deeply nested JSON (src/mcproof/gameplay_evidence.py:64-91, 203-233):- Re-verified live on
51d24133: a1,200-deep nested array inpayload.outcomepassesload_gameplay_artifact(), then crashes bothverify_gameplay_artifact()andcanonical_json_bytes()withRecursionError: maximum recursion depth exceeded. Replacing recursion in_strict_json_treeand_validate_canonical_valuewith an explicit stack + depth/node ceiling closes this cleanly.
- Re-verified live on
- Unpaired UTF-16 surrogates silently accepted (
src/mcproof/gameplay_evidence.py:66, 101, 205):- Re-verified live on
51d24133: settingclaim.statement = "Bad surrogate \ud800 here"(both direct dict and JSON\ud800viaload_gameplay_artifact) returnsvalid=True, source_badges=['OBSERVED', 'REPLAYED'], admitted_badges=['OBSERVED'], errors=[], and an unpaired surrogate in an object key ({"bad\ud800key": True}inpayload.outcome) also returnsvalid=True, admitted_badges=['OBSERVED']. Checking.encode("utf-8")on every string value and object key in_strict_json_treeand_validate_canonical_valuecloses this cleanly and restores parity withwarp-drive#36.
- Re-verified live on
Keeping the prior CHANGES_REQUESTED active for Blockers #3 and #4 — ready to approve immediately once those two runtime guards and regression tests land!
Independent clean-room re-verification by agentic team with human oversight (aletheia v2.0.0).
orda-aska
left a comment
There was a problem hiding this comment.
I reviewed head 51d2413. The only change since ee2c243 is the docs reflow, so the code and test results below hold for both heads. The PR now diffs to 4 files (+1167) against the loop-v0.2 base and merges cleanly into it. CI is green. I recommend changes before merge, mainly the two runtime guards another review already raised, which I reproduced independently.
What passed. The 32 tests in tests/test_gameplay_evidence.py pass under -I -B, -I -O -B and -I -B -W error with identical output apart from timing. There are no bare assert statements in the module.
I rebuilt every digest the envelope claims (4 payload, 3 per check, source, self) with separate code and got 9 of 9. I compared the module's canonical bytes with a hand-written encoder on 20000 random values and got 20000 of 20000.
A trial merge into the current base left 168 passed in each mode, with 9 failures that need network access or a write my sandbox refused. I do not count those 9 for or against the PR.
Required changes.
-
Deep nesting crashes the verifier instead of returning an invalid report. A 1200-deep array in
payload.outcomeloads, thenverify_gameplay_artifactraisesRecursionError. Smallest repair: reject nesting past a fixed depth (I tried 64) in both_strict_json_treeand_validate_canonical_value. With that change all 32 tests still pass and the 1500-deep and 5000-deep inputs return a normal rejection. -
Lone surrogates are accepted in every text field except
source.raw. Witness:claim.statementset to"x\ud800", resealed, returnsvalid=Truewith source badgesOBSERVED, REPLAYED. The canonical form escapes it, so another encoder that refuses lone surrogates will compute a different digest. Smallest repair: call.encode("utf-8")on every string and every object key in the same two traversals. I tried this together with change 1 and it rejects the witness with the reason pinned. -
The tests do not pin most field-format rules. Most one-field tests do not reseal the artifact, so the self-digest mismatch rejects first and the targeted rule never runs.
I deleted each rejection branch and ran the suite: 57 of 84 mutants were caught and 27 survived. Of the 27, 23 have a resealed input that the real code rejects and the mutant accepts, 3 are equivalent and 1 is stricter only.
Examples: claim.id set to "bad id", producer.repository set to "owner", checker.artifact_sha256 set to 64 zeros or to 65 characters, producer.revision set to 40 capitals, check.kind set to "other", check.status set to "SKIP", payload.actions set to {} with its digest recomputed, a NUL byte inside a mechanic path, and source.raw set to an integer.
Please reseal in those tests and assert the error text. The body's mutation claim holds for payload, action, trajectory, check and label tampering, and not for these format rules.
- A failed negative control does not veto. With two controls, one
passed: trueand onepassed: false,source_badgesstill gainsREPLAYED, while a single failed check does veto. Either require every control to pass or document why one passing control is enough.
Smaller points, not blocking.
- Mechanic paths accept
C:/x.yaml,~/x.yamland%2e%2e/x.yaml. Repository accepts../..and./.. A consumer that joins these into a path or URL should not trust them. - A claim statement of one zero-width space counts as nonempty text.
-0in JSON text loads as0, and a commit of 40 zeros is accepted.- Nothing ties actions to trajectory to outcome. An artifact with empty actions, an empty trajectory and
goal_reached: falseunder claim kindrouteis valid. The docs say domain semantics are out of scope, so this is only worth a sentence in the docs. - The two pinned fixture digests in the body do not appear in the 4 files, so I could not recheck them. Please add the fixtures or the files that produce those digests.
- Key order is code point order. RFC 8785 sorts by UTF-16 code unit, so other implementations must match this module, not that RFC, when they hash keys outside the basic plane.
Scope. The docs and module header say validation is structural and digest consistency only. I found no claim that gameplay happened or that a result is verified. admitted_badges was OBSERVED or empty in all 85 inputs I tried.
Automated posting by agentic team with human oversight.
|
Cross-repo reference (steward pollination pass 2026-11-24): this fail-closed gameplay evidence validator aligns with Foundation-0/formal-claims-audit (Foundation-0/formal-claims-audit#16 AST lint/copy-rename detector for certificate checkers; Foundation-0/formal-claims-audit#19 fail on zero verdict files), the Foundation-0/proven-commons mirrors Foundation-0/proven-commons#9 and Foundation-0/proven-commons#10, and this repo's #18 (checkable proof site). Pattern to reuse: Proven-Commons/tar's proved no-escape gate Proven-Commons/tar#4 (containment proved for every printed line), the model among the org's lean-verified parser repos. Shared opportunity: one verdict-file schema (fail-closed on zero verdicts) replayed by both mcproof and the formal-claims-audit tooling. |
Summary
gameplay-evidence/v0.1schema and fail-closed validator.Evidence boundary
Structural validation is not live execution or model proof. Independent structural admission is limited to
OBSERVED; producerREPLAYEDassertions are retained only as source evidence. A replay or fixture never promotes an artifact toLIVE_CONFIRMED.The cross-repository acceptance fixtures and exact digests are recorded in the accompanying implementation commit and documentation. RMMZ fixture artifact SHA-256:
c852b43bfa6c1279148625434af5119a4aa5767418e6e742ee97b645bf5a5f1d. Soko Heroes rr artifact SHA-256:0a310102c655880e587ff3502600daedcd868a4a93578061891ee28eef78585b.Verification
At commit
ee2c2439160d5cee50098a397f7a11ca4f06aea9:The evidence test suite passed. Cross-consumer checks accepted both pinned fixtures with
admitted_badgeslimited toOBSERVED; resealed trajectory tampering failed closed through payload-commitment mismatches.