LSC1-05 v2: Lean ↔ authored-RTL common relation with explicit adversarial regressions - #88
Merged
Merged
Conversation
…asses This commit adds focused adversarial regressions that explicitly demonstrate each failure mode from PR #73 (blocked certifier verdict) is structurally impossible in the current trace→observation pipeline: - Defect Class 1: Python gates must DERIVE observations from real RTL traces - Defect Class 2: RX stall witnesses require rx_valid && !rx_ready - Defect Class 3: Operation identity must not be Python-injected - Defect Class 4: RETIRE must not be mere co-occurrence Changes: - test/test_lsc1_05_v2_adversarial_regressions.py: 10 new tests covering 4 defect classes - evidence/lsc1-05-v2/: validation receipts from real runs - .github/workflows/ci.yml: added adversarial regression test to CI - SHA256SUMS: regenerated with new files The authored RTL contract gate still produces exactly 30 RTL-trace-derived observations. This is a bounded-pass relation only; no universal cycle-by-cycle refinement or whole-design equivalence is claimed. Base: 53a852e
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Mechanically regenerates SHA256SUMS to include: - evidence/lsc1-05-v2/adversarial-regressions.txt - evidence/lsc1-05-v2/authored-rtl-contract.txt - evidence/lsc1-05-v2/checksum-check.txt - evidence/lsc1-05-v2/lean-build.txt - evidence/lsc1-05-v2/sim-output.txt - test/test_lsc1_05_v2_adversarial_regressions.py Fixes: executable-models CI job failure (SHA256SUMS staleness)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LSC1-05 v2: Lean ↔ authored-RTL common relation
Summary
This PR establishes a common, verifiable Lean ↔ authored-RTL relation covering SET, XOR, MUL, DEREF, JUMP, BLAKE3 request/response service lifecycle, fault paths, stall behavior, reset/abort, and RETIRE.
Key Changes from PR #73 (BLOCKED)
This PR explicitly addresses the three BLOCKED certifier verdicts from PR #73 by adding focused adversarial regressions that demonstrate each failure mode is structurally impossible:
Defect Class 1: Python gates must DERIVE observations from real RTL traces
test_python_injected_label_set_is_rejected: Rejects pre-declared label setstest_missing_rtl_transaction_record_is_rejected: Requires RTL_TRANSACTION recordsDefect Class 2: RX stall witnesses require
rx_valid && !rx_readytest_rx_stall_requires_valid_and_not_ready: Idle cycles excludedDefect Class 3: Operation identity must not be Python-injected
test_relabeling_set_as_blake3_is_rejected: RTL origin_opcode is authoritativetest_done_cannot_be_borrowed_across_transactions: Transaction-scoped stalls/donetest_stalls_remain_transaction_local: Stall observations scoped per transactionDefect Class 4: RETIRE must not be mere co-occurrence
test_retire_requires_exactly_one_cooccurring_done: Status 0x02 + opcode 0x12 + done=1test_retire_requires_retire_request_opcode: Decoded RETIRE request requiredtest_done_without_retire_status_is_rejected: Done pulses only with RETIREtest_lean_contract_requires_explicit_semantic_premises: ContractEvidence requires genuine theoremsValidation Summary (all real runs)
make checksum-check: PASSmake -C test sim: PASS (18+1 differentials)make lsc1-authored-rtl-contract: PASS (30 RTL-trace-derived observations)python3 test/test_lsc1_05_v2_adversarial_regressions.py: PASS (10 tests, 4 defect classes)lake build LeanVMBMinCore.AuthoredRTLContract: PASSBounded Claims (honesty required)
Evidence
All validation receipts are stored in
evidence/lsc1-05-v2/.Files Added/Modified
test/test_lsc1_05_v2_adversarial_regressions.py: New adversarial regression testsevidence/lsc1-05-v2/: Validation receipts.github/workflows/ci.yml: Added adversarial regression test to CISHA256SUMS: Regenerated with new filesBase:
53a852e5cb638fd222eace19e72d9f1b31be5f15Head:
cfcf2b7(this commit)