Skip to content

feat(contracts): register forge-core, forge-collab and forge-community fresh for beta.7 - #154

Merged
PastaPastaPasta merged 1 commit into
wipe/beta7from
feat/wipe-schema-three-contracts
Sep 29, 2026
Merged

PastaPastaPasta merged 1 commit into
wipe/beta7from
feat/wipe-schema-three-contracts

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Owner

What

The beta.7 fresh registration as three contracts (WIPE-PLAN §2.2, §2.3), into the integration branch wipe/beta7. It is stacked on the SDK bump #153 (chore/sdk-beta7), which has to merge first; this PR fixes the reds #153 leaves (the contracts job, contract-seed.test.ts, conformance.test.ts).

  • Schemas. forge-contracts/contracts/{forge-core,forge-collab,forge-community}.json are generated by design/final-schema/build.py, with the flags set per WIPE-DECISIONS: D-2 top-level upstreamNumber (skipIfAbsent); D-3 chunk.documentsCountable; D-4 release.assetManifest + release.imported, with packManifest kind 3; D-5 monotonic checkRun plus its updated index; D-6 off (no byRunner bit). D-8 isn't written yet; build.py takes flags, so its items drop in there. Everything is in the findBy/where spelling (platform#5197).
    • forge-collab: transition (the sum-based state machine), dense numbering (dense + perRepo), tk. patch.draft is gone, and event / authorEvent lose the state kinds.
    • forge-community: checkRun, policy, webhook, profile, star, starBeat, watch and follow.
    • Registered schema. registered/forge-core.v1.json becomes the new forge-core, so --expect-update now checks future in-place updates against the fresh registration.
  • contract-validate.
    • Sample documents are split three ways and cover transition, tk, upstreamNumber, the release manifest, a kind-3 packManifest and the checkRun rules.
    • negative.sh takes three files; the webhook/checkRun/star/starBeat/policy mutations move to community.
    • New mutations: dense without either countable perRepo index; sum without summable; an optional summed property; a required skip property; a non-unique findBy on transition; immutableAllowSetting on a mutable property.
    • One rule-deletion mutation per checkRun and transition rule that can be judged offline. Each bad sample satisfies every other rule of its type, so deleting its rule makes validation fail. This proves every rule is load-bearing, including conclusionIfDone/doneIfConclusion and b1–b3.
  • CI. .github/workflows/contracts.yml validates all three contracts and runs deploy-v2.mjs --self-test (offline).
  • deploy-v2.mjs.
    • A DEPENDENT_CONTRACTS list registers forge-collab, then forge-community, after forge-core, all in the one group.
    • --only collab|community and --force-new --same-group work per contract. --force-new without --only refuses to put a superseded collab or community into the existing group unless --same-group is given, when forge-core itself is kept. A dry run sets a record aside only when the real run would supersede it.
    • After a run, the group check covers every recorded contract.
    • The --self-test checks the group-field limits and that every schema loads with forge-core's id substituted.
    • snapshot-contracts.mjs snapshots forge-community too.
  • Contract snapshot. The beta.6-registered moutai snapshot is removed and the loader map is empty. beta.7 refuses those lookup bytes on every parse. Wipe-day step 5 re-runs snapshot-contracts.mjs and restores the entry; until then pages fetch contracts, which fails closed. The e2e check rb-2 (no getDataContract) skips while the deployment has no snapshot, which is expected until that step.
  • docs/contracts/forge-v2.md. Covers the findBy/where spelling, the forge-community section, transition (§3.1), dense numbering and upstreamNumber (§6.2), the counts from transition kinds, the checkRun rules, packManifest kind 3, the sizes, and deploying three contracts. § Contract group trust is marked pending until dg's check_pair/is_known and the web's group trust learn forge-community in the contract-resolution follow-up.

Sizes (beta.7 rs-dpp, protocol 14)

contract signed create transition headroom to 20,480 B fee
forge-core 14,329 B 14,509 B 5,971 B 0.68 DASH
forge-collab 15,671 B 15,777 B 4,703 B 0.51 DASH
forge-community 8,134 B 8,240 B 12,240 B 0.42 DASH

Every contract has at least 3 KB of headroom.

Verified offline

  • contract-validate on all three: ok. Samples 24/21, 32/46 and 15/15 (accepted/refused), plus --expect-update against the new registered forge-core.
  • negative.sh: all 55 mutations rejected.
  • b7gate --cases: cases.json gives collab 26/26 and community 8/8; cases-core.json gives 6/6.
  • deploy-v2.mjs --self-test: ok.
  • cargo test --workspace: green (a forge-core test parses forge-core.json).
  • forge-web: vitest 2,811 passed, 17 skipped (159 files), including the new lib/sdk/deploy-v2.test.ts; tsc is clean.

Nothing ran against moutai. Everything live (registration, fees, the dense and c1–c5 totals) waits for the wipe.

Not in this PR

  • Contract resolution (WIPE-PLAN §2.4): the web, forge-core, relay and dg reading the third id. That is the next PR on top of this one.
  • Transition and numbering client writers (§2.5, §2.6): another agent's scope.

Clients on this branch still read star/checkRun/etc. from forge-collab until §2.4 lands. That is fine on an integration branch that won't reach master before the wipe.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 983e27e8-059e-428d-9fc0-a38bffdb8803

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…y fresh for beta.7

The fresh registration of WIPE-PLAN 2.2/2.3: the three schemas from design/final-schema/build.py (D-2..D-5 on, D-6 off) in the findBy/where spelling, registered/forge-core.v1.json as the new forge-core, contract-validate samples and negative mutations for three contracts (every checkRun and transition rule proved load-bearing), contracts.yml validating all three plus the deploy self-test, deploy-v2.mjs registering forge-community after forge-collab in the same group, and forge-v2.md for transitions, dense numbering, upstreamNumber, the community contract and packManifest kind 3. The beta.6 contract snapshot is dropped (beta.7 cannot parse it) until the wipe re-snapshots, and rb-2 skips without one.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant