Repository navigation
feat(contracts): forge-collab revision for GitHub-parity PR review - #48
Conversation
Registers forge-collab BMfPmaEiMqDp64NDa4Am79VoRpZ9MPVNnCUy6i3UiyWi on devnet moutai (nonce 10, same group, forge-core unchanged) from the review-parity schema of docs/design/review-parity-spec.md section 3: comment.startLine and comment.reviewId (a deletableDocument reference to the review with a repoId, targetId=patchId and $ownerId agreement, so only the reviewer attaches comments, on its PR), review.commentCount, patch.draft, patch headOid/draft/ref names immutable, event and authorEvent refId, authorEvent oid and kind enum [1,2,9,10,11,12,13,14,16], optional event enc/epoch, a maintainer-gated non-deletable policy type, $updatedAt and $updatedAtBlockHeight on issue/patch/comment, sparse reply/addressee indexes, sourceRef (sourceRepoId, sourceRefNameHash) and rangeCountable review counts per PR. The read fixture's collab documents are re-seeded under the new id (the seeder now archives collab steps when forge-collab changes) with a review-parity PR #3, issue #4 and a policy; the live test reads every changed type back, proves the refusals at consensus in a scratch repo (40127 reviewId agreement, 40120 writer policy and non-author authorEvent, 40128 headOid replace, schema refusal of author merge/label/dismiss) and an author replace. Spec section 3.9-3.11 records what protocol 14 changed and measured costs; forge-v2.md and private-repos.md follow (edits keep a patch's epoch; the late-content rule reads $updatedAtBlockHeight). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedNext included review available in 11 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (14)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review 🤖 Posted autonomously by Claude on behalf of pasta. |
|
PR 1 of the GitHub-parity review plan (
docs/design/review-parity-spec.md§7, committed here). This PR changes the forge-collab contract, registers the new one on moutai, re-seeds the fixture, and adds live proofs that each new gate is enforced at consensus. The rule functions, vectors and writers come in PR 2.Registered
forge-collab
BMfPmaEiMqDp64NDa4Am79VoRpZ9MPVNnCUy6i3UiyWion devnet moutai:The committed
forge-collab.jsonhashes to theschemaHashrecorded indeployments/devnet-moutai.json. The recorded id feeds forge-core'snetwork.rs, forge-web'sdeployments.ts, the e2e helpers and the seeder. One hard-coded copy, inwallet-protocol.test.ts, is updated here.Schema changes (spec §3, as registered in §3.9)
comment
startLine.reviewId: adeletableDocumentreference to areview, withpropertyAgreement {repoId: repoId, targetId: patchId, $ownerId: $ownerId}. Only the reviewer can attach comments to their review, and only on that review's PR. Consensus enforces this; another reviewer gets 40127, shown live.reply (replyTo)index, markednullSearchable: false, so comments withoutreplyToget no index entry.review
commentCount.patch (patchId, $createdAt)index is nowrangeCountable, which gives a provable review count per PR.patch
draft.headOid,draftand the four ref-name fields are nowimmutable. A replace that movesheadOidgets 40128.sourceindex becomessourceRef (sourceRepoId, sourceRefNameHash). Queries onsourceRepoIdalone still use it.issue, patch, comment
$updatedAtand$updatedAtBlockHeightare now required. Readers get "edited" markers, and the private late-content rule can judge edits.event
refId, with a sparseaddressee (refId)index.enc/epochwithdependentRequired(private-repos §13 item 6). Nothing writes these yet.authorEvent
kindis nowenum [1, 2, 9, 10, 11, 12, 13, 14, 16]. The author may resolve threads, request reviewers, mark draft/ready and move the head. The schema refuses author merge, label, assign, retarget and dismiss.refIdandoid, plus a sparseaddressee (refId)index.policy (new type)
requiredApprovals0–10,approverRole,requireChecks, and amergeMethodsbitmask.Where protocol reality changed the spec
Details are in spec §3.9–3.11 and forge-v2.md §6.1.
propertyAgreementkeys are the referring properties. The spec wrotepatchId → targetId; the schema hastargetId: patchId.(refId|replyTo, $createdAt)indexes would add an entry for every event and comment. The registered indexes are single-property withnullSearchable: false, so only documents that set the field pay.event+authorEvent, and merge validity depends on the base branch history. A stored state field could only live on the author-owned document, and members close and merge. So those counts stay client-side, as fix(web): count only open issues and pull requests in the repo tabs #44 already does.rangeCountable(target, $createdAt)indexes read prefix-to-last. rs-drive has this form; the book doesn't document it yet. A compositecountssub-query uses the same index picker.$updatedAtBlockHeight. Both are in private-repos §4.5 and §8.2.Earlier on the same day, nonces 8 and 9 registered two iterations of this schema: one with non-sparse indexes, one without
$updatedAtBlockHeight. Both are recorded as superseded.Tests
tools/contract-validatepasses: full PV14 parse, registration reference checks, 25 sample documents accepted and 18 malformed ones refused.negative.shpasses, including 5 new mutations.FORGE_LIVE=1 … vitest run lib/repo/v2.live.test.ts lib/private/private.live.test.ts): every changed type is read back from the re-seeded fixture (PR feat: make the pull-request workflow observable and honest #3, the policy) through the new indexes and counts. In a scratch repo, the refusals and an author replace are checked. The existing fixture test and the private-repo test still pass.pnpm testpasses: 940 tests.cargo test -p forge-core networkpasses.The fixture now also has issue #4. PR #3 took #3 as a PR number, and the jump-box spec needs a number that is only an issue.
🤖 Generated with Claude Code