Repository navigation
feat(doop): close proof and land_proposal policy rule, inert (CHE-9672) [squash] - #160
Draft
congvc-bot-x99[bot] wants to merge 2 commits into
Draft
congvc-bot-x99[bot] wants to merge 2 commits into
congvc-bot-x99[bot] wants to merge 2 commits into
Conversation
added 2 commits
November 26, 2026 04:23
verifyLanding rebuilds the close proof from Multica and the sent bytes. assertWritable gains land_proposal, which needs a proof only verifyLanding can make. No caller yet (S3b); DOOP_LANDING stays off.
This branch has not been deployed
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.
What
CHE-9672, slice S3c of the CHE-9448 A5 landing plan (r5): the close proof and the landing policy rule. Inert.
server/landingProof.ts(new):verifyLanding(req, multica) -> LandingProof.server/writePolicy.ts: newWriteOpland_proposal,WriteContext.landing,WriteTarget.sourcePageId, and itsassertWritablerule.server/pageState.ts:land_proposaljoinsFROZEN_OPS, so a Finished ledger page (the destination) is refused by the page rule.tests/landingProof.test.ts(new): 37 tests.How the proof works
LandingProofis made only byverifyLanding. A module-privateWeakSetbacksisLandingProof, so a spread, a JSON round trip or input-shaped object is not a proof.LandingMultica(watcherId,trustedChecklist,decision,members). No REST path is guessed and S3a is not imported (it is not merged). S3b binds the real client.proof_unavailable);trustedChecklist; decision id and pin equal the record; link canvas and topic; the decision (kind,answered, not withdrawn,human, asked by the watcher elsedecision_not_watcher, topic issue, chosen label andcontent_snapshotbothclose, not disclaimed);answered_by_user_idequalshuman_user_idand is anownerin the member list; exactly one pin line equal to the record pin; SHA256 of the sentLOCK.jsonequals the pinmanifest; LOCK canvas, page and frame set equal the request; each frame hash equals its LOCK entry and the SHA256 of its html.proof_unavailable. S3a refusals pass through by.code.land_proposalrule: lock and page rules first; a genuine proof is required for every context kind;canvas.projectIdequalsproof.projectId; proof canvas equals the canvas; the source page exists, is the proof topic, and when bound has the proof issue; the destination is the ledger page only.assertBindingis skipped for this op only, so the taskless refusal still holds for every other op (tested withcreate_frame).Assumptions (stated, not asked)
pinis theLock pin: ...line string.close=content_snapshot" is checked as both beingclose.sourcePageIdandsourcePageName.Red, on the base (
e21b6250)Green
bun run typecheck,bun run lintandbun run format:checkpass.Selectors (
describeblocks intests/landingProof.test.ts):verifyLanding(valid case; settings unset; passthrough and transport errors; unrelated owner close; superseded checklist; pin, link, each decision-state code, owner role, base64 options, pin line, manifest, LOCK mismatch, frame hash) andassertWritable land_proposal(no proof, forged proof, taskless MCP agent with proof passes, other project, other issue, non-ledger destination, Finished ledger, locked frame,create_framestill refused).Run one:
bunx vitest run tests/landingProof.test.ts -t "assertWritable land_proposal".Not covered
The gstack
/verifypregate ranbun testover a wide unrelated selection and timed out (tests=TIMEOUT,bun:testhas novi.hoisted/inject). That is a runner mismatch, not a failure of this change. The vitest results above are the evidence.Dark
Merges dark. No caller of
verifyLandingorland_proposalyet (S3b).DOOP_LANDINGis untouched (defaults false),DOOP_LANDING_WATCHER_IDstays unset, no C00 or production config changes.Refs CHE-9672. Parent plan: CHE-9448.