Repository navigation
Conversation
This was referenced Oct 13, 2026
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 14, 2026 02:05
511757b to
d9df55b
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 14, 2026 02:05
7156b17 to
c897e96
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 14, 2026 02:34
c897e96 to
2e9de8c
Compare
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 14, 2026 02:34
d9df55b to
0fed56a
Compare
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 14, 2026 02:57
0fed56a to
87f9b7c
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 14, 2026 02:57
2e9de8c to
459ec0e
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 14, 2026 06:43
459ec0e to
f3a300b
Compare
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 14, 2026 06:43
87f9b7c to
0108ce4
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 14, 2026 17:14
f3a300b to
c8ca48f
Compare
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 14, 2026 17:14
0108ce4 to
78bc493
Compare
This was referenced Oct 14, 2026
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 14, 2026 19:35
c8ca48f to
e3808e3
Compare
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 14, 2026 19:35
78bc493 to
5a80f03
Compare
This was referenced Oct 14, 2026
Merged
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 14, 2026 22:47
5a80f03 to
f6767bb
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 14, 2026 22:47
e3808e3 to
de70b73
Compare
This was referenced Oct 14, 2026
Merged
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 17, 2026 23:23
f6767bb to
5a980e0
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 17, 2026 23:23
de70b73 to
1be463d
Compare
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 17, 2026 23:55
5a980e0 to
26832e6
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
2 times, most recently
from
October 18, 2026 00:23
8a47c28 to
c83c5d5
Compare
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 18, 2026 01:46
26832e6 to
f8148cb
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 18, 2026 01:46
c83c5d5 to
6d551a9
Compare
review prepare, record and check, and the CI review check. Evidence is derived every time from a fresh full extraction: prepare writes blind packets named by the hash of their bytes, record files a card for one of them without running Lean, and check, the one judge, refuses stale cards and fails until each Lean-mapped article's review_approved matches its review hash. The approval state is computed in one place, and every current approval reads self-approved; who may write review_approved is repository policy. Part 6 of the split of #75.
Deicyde
force-pushed
the
feat/readback-cards
branch
from
October 18, 2026 06:18
f8148cb to
65d1319
Compare
Deicyde
force-pushed
the
feat/review-commands
branch
from
October 18, 2026 06:19
6d551a9 to
1648bdf
Compare
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.
This PR replaces #75 as the stack's review-commands layer. #75 was split into eight stacked drafts and then simplified; its thread stays as the record of the earlier design and review, and the review of 765f2cb stays on #40. This layer lets a project check that a formalized statement says what its source says:
review preparewrites blind Lean packets for an independent model,review recordfiles the model's read-back of one packet as a card without running Lean, andreview check, the one judge, fails until every Lean-mapped article has current cards and areview_approvedequal to its review hash.What it adds
review prepare blueprint --lean-root . --packets DIR [--timeout](_review_prepare): one full extraction,build_review_bundle's refusals, thenwrite_review_packets: one packet per declaration underblind/, named by the SHA-256 of its bytes, plus anautoform-review-packets/v1manifest for the coordinator.review record blueprint --packets DIR --article-id --declaration --testimony --model [--expected-card-hash](_review_record): no Lean.read_review_packettakes the single manifest entry for the article and declaration and reads the packet its hash names, not the manifest's path; manifest, packet and testimony go throughread_regular_file(non-blocking open, so a FIFO is refused unread); a gonearticle_idis refused (review-article-missing); Add read-back cards and the testimony validator #216'sprepare_readbackchecks packet bytes and testimony, andpublish_readbackfiles the card under its lock and compare-and-swap.review check blueprint --lean-root . [--json] [--timeout](_review_check,_current_review): reads graph and cards, extracts once, and refuses withreview-snapshot-changedif the cards changed, the extraction's blueprint hash does not name the graph, or a Lean-mapped article, read again for its statement, no longer hashes as the graph recorded. It prints each article's hash to approve and labels each current approval.autoform_cli/review.py:build_review_bundle(in-memory evidence: title, statement, cited passage, packets),ReviewState/review_states(incomplete, unverifiable, unapproved, drift, approved; the one place approval is judged),review_findings(adds orphaned cards and approvals),canonical_statement. Lean-mapped articles need anarticle_idand must be declaration-sized leaves; a cited article needs an exact#L<start>-L<end>passage of an in-vault non-Markdown source; no article may cite blank lines.review_approved: sha256:<64 hex>frontmatter (graph.py).approvals.py:approval_statuses(states)labels every current approval self-approved, no network; JSON{label, node_id, review_hash}. Its docstring, the README and both CODEOWNERS examples (# /blueprint/ @OWNER) say authorization is repository policy (code-owner review ofblueprint/, stale approvals dismissed, approval of the latest push).skeleton.py: the blueprint hash covers each article's cited passage (_source_passages,_blueprint_hash(graph, passages), publicblueprint_hash(graph)), so review evidence binds the passage a reviewer reads;source_passage(files=)reads each cited file once, after main's link checks pass, and reports a failed read as that article's problem.OutputTransactionand_stage_output(stages=)own the review packet stages, andlean._OUTPUT_STAGEkeeps a stage a killed writer left from being indexed as project source.blueprint/.autoform-review(autoform-review-policy/v1), committed by new scaffolds. Bothautoform-verify.ymlcopies check its hash, fail if cards or approvals exist without it, and with it runreview check --lean-root .once. Review packet trees are managed output (lean.py; publicskeleton.validate_managed_outputwith an exactschema=, refusing a symlinked manifest). Human Review gains the statement-review steps, Formalize runsreview checkafter integration, the read-back guide gains "Return only testimony". Plainauditanddoctorleavereview_approvedtoreview check.What changed in this revision
Size: +2,683/-77 in 24 files before, +2,665/-70 in 23 files now.
review.canonical_statementreads the article again. The rebuilt Treat every published page as untrusted #215's graph keeps no article bytes (BlueprintSnapshot,graph.snapshotandgraph.article_textare gone; eachNodekeepssource_sha256), so_parsed_textrereads the article throughread_regular_fileand refuses withreview-snapshot-changed(exit 2 fromreview prepareandreview check) unless it still hashes asload_graphrecorded. The previous revision cut the statement from the bytes the graph captured, so a statement edited after the snapshot was judged as the snapshot parsed it.test_check_judges_the_statement_its_snapshot_parsedbecametest_check_refuses_a_statement_edited_after_its_snapshot, which expects exit 2 andreview-snapshot-changedwhere it expected exit 1 andreview-drift, andtest_canonical_statement_is_the_span_the_audit_and_the_box_readreads the article from disk instead ofgraph.article_text. The README'sreview checkparagraph names this third comparison, and_current_review's docstring and the affected test docstrings say the same..MDandurlsplitskips, and the NUL, symlink-loop, directory and unreadable-file reports the previous revision added toskeleton.source_passagenow come from main's link checks (Report malformed Sources and dependency links instead of crashing #337, Finish the Sources-link fixes from #337 #347).source_passagekeeps main's checks, in main's order, and reads the file through thefiles=cache only after they pass. Where they differ, main's rule holds: a Markdown link that names no regular file is reported, and the suffix is judged on the file the link resolves to._LINE_LOCATORis main's\d+again, with main'sint()ValueErrorguard (Report malformed Sources and dependency links instead of crashing #337), in place of the nine-digit bound: a line number with more than nine digits is a locator, as on main, so one past the end of its file is reported as that article's problem ("names no lines of its file") where the bound skipped the link. The README sentence on the bound and the comment above_LINE_LOCATORwent with it.tests/test_skeleton.pyis no longer changed: main's tests already cover the link cases the previous revision added (a directory,%00, a symlink loop,NOTES.MD, an unclosed IPv6 host, and a 5000-digit line number, which main expects to name no lines)._add_probe_timeout_argument, shared byskeleton,review prepareandreview check, carries main's--timeouthelp ("the probe helper's build", not "lookup and build"): the merged Run skeleton probes in parallel and isolate probe failures #214 dropped the helper cache and its lookup.lean.pyadds_IGNORED_OUTPUT_SCHEMASafter Skip rendered sites in every Lean capture #336'sPUBLICATION_*constants;_validate_managed_output's exactschema=sits beside Check that a manifest's schema is a string before looking it up #357's string check; thereviewparser and dispatch followskeletondirectly, since Remove autoform unused-hypotheses in favor of Batteries' unusedArguments linter #352 removedunused-hypotheses._review_declarationpassesstatement_hashasskeleton_hash), so a proof-only change,sorryto a proof included, keeps cards andreview_approvedcurrent (test_an_approval_survives_a_proof_edit_but_not_a_statement_edit).What changed since #75
review prepare -o, noreview check --bundle, noaudit --reviewor--review-bundle. The bundle schema, loader, writer and validators are gone;ReviewBundleis in-memory only, andaudit.py,doctor.pyandreadback.pyare untouched.review recordruns no Lean and re-reads no article: the scoped extraction, the post-Lean reload and the pre-write article re-read are gone. A card filed from stale packets is filed and reportedreadback-invalidby the nextreview check; a stale record that names--expected-card-hashcan replace a current card with an invalid one (Git restores it).canonical_statementis now the site's statement box reading (article_parts(published_page(...))): the old stripper dropped comments in indented code, which Treat every published page as untrusted #215's site shows, so the approval did not bind text the box showed.review_states;current_approvalsand the per-approval attestation fields are gone. Review refusals from prepare and check name the article and code. Rebased on main 8638db9: textual merges with main's elaboration-limit sentence in the README, its module-import-impact imports in__main__.pyand its "renew the complete claim set" step in Formalize. The README's list of what Lean indexing skips now names review packet folders, and Formalize hands every article whose read-backs or approval the result made stale, import-edit repairs included, to Human Review. From ae2db51: one import conflict in__main__.py(Publish blueprint sites transactionally #165), and the statement-box test now builds files with Publish blueprint sites transactionally #165's capture. Main's audit step in the verify workflows (Run the CI audit probe without any project code #190) is kept.Review findings it answers
review checkjudges one snapshot of graph and cards (dd33f01). The record half (d6d8d16, by ArmelRandy) and the audit half are dropped: the record compares nothing with Lean, and audit has no review path.AUTOFORM_REVIEW_ENABLEDgate fails a test (17ad389). d04b976 (card filed while Lean runs) is dropped: there is no Lean window. Item 6: a gonearticle_idis refused, without advice (the advice was old Harden card publication and review record #218's, dropped).audit --review.Until the next layers land
renderhas no review flags and the site shows no review state until Show statement review on the site #217. Every current approval reads self-approved until Label statement approvals by the repository's code-owner review policy #219 checks the repository's code-owner policy; Pages runs no statement review until Label statement approvals by the repository's code-owner review policy #219, and the opt-in gate test covers only the verify workflow.review checkdoes not run there; the pin bump is a post-merge follow-up.Validation
Run 39103606387 on
1648bdf5passed every job:Windows inspection, subprocess, and publication hardening,real Lean (fixture toolchain),real Lean skeleton suite (fixture toolchain),real REPL (fixture toolchain),test (3.10),test (3.13).New:
tests/test_review_cli.py(14 tests, 23 cases; 31 tests at a74dba2) andtests/test_review_bundle.py(24 tests, 47 cases; 29 there). Added: 2 tests intests/test_scaffold.py, 1 each intests/test_doctor.py,tests/test_graph_scale.pyandtests/test_skill_examples.py, 1 test and a packets row intests/test_lean_sources.py.tests/test_readback.py, which a74dba2 changed, is untouched.Where #40's review went
Blockers are #40's review of 765f2cb; items are the open-items comment and its follow-up.
article_idis goneStack