docs(tasks-plan): umermjd11 task plan 051026-2 — full-GI alignment: contracts check + richer GI states, dincli commands, integration suite on foundry, GI docs - #229
Conversation
…ontracts check + richer GI states, dincli commands, integration suite on foundry, GI docs Five items pending maintainer review, written against develop @ a1fcce2: - TP-1: contracts check, recording what a complete GI needs and the dincli coverage table. - TP-2: three new GIstates (AuditSeedLocked, AuditTestDataAssigned, AggSeedLocked), closing the gap where evaluation could start without test data. - TP-3: dincli deploy modelId + setDinToken (BL-27), rewards deposit/fund-emission/claim, per-wallet register-encryption-key, gi release-slots (BL-28), dispute commands. - TP-4: tests/dincli on foundry artifacts, running a complete GI including funding, keys and the three reveal phases. - TP-5: public GI docs, CLAUDE.md, DINShared.md diagram. Integration CI is tracked separately in issue No. 228. Companion plan: task-plan-051026-1 (PR No. 219). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: deep verificationReviewed against 1. Integration-suite audit (the "Why" section)Verified, with one precision fix.
2. dincli gapsVerified.
3. Contract referencesVerified, all resolve:
One small miss: 4. TP-2's test-data gap: the flag is already one-way and doesn't prove data was assignedThe plan says
So the flag is already one-way, and that sub-question can come out of Decision 1. More important for the gap: neither side checks that every batch actually has test data. The flag is the owner's own claim. Gating Also: 5. Discussion No. 216 follow-upsDiscussion No. 216 (task_021026_19, closed) left these follow-ups outside that task. They belong in this plan:
Issue No. 223 (filed by PR No. 225 after this plan was written) tracks BL-27 + BL-28. TP-3 does both, so the spec should say TP-3 closes No. 223. Amendments
Everything else in the plan checks out against |
Files changed (1) — as of
|
| Field | Value |
|---|---|
| Change | New |
| Lines | +277/-0 |
| Diff (what exactly is in this PR) | A five-item plan for running a full GI on the foundry contracts: TP-1 contracts check (read-only, plus two text fixes), TP-2 three new GI states (AuditSeedLocked, AuditTestDataAssigned, AggSeedLocked), TP-3 dincli commands (deploy with --model-id, rewards, encryption key, release slots, claims, both dispute families), TP-4 tests/dincli/ on foundry artifacts walking a complete GI, TP-5 GI docs. It also has a sequencing table, a coordination section with task-plan-051026-1 (PR No. 219), four decisions, and a deferred list. |
| Functionality — how & why | How: each gap is grounded in file:line references at a1fcce2, and all of them resolve (see the verification comment). The order (contracts → dincli → suite → docs) means the commands and the suite are built on the final state machine. Why: dincli and the integration suite stopped matching the task contracts as commit-reveal, seed locks, encrypted test data, reward pools, disputes and modelId landed. Phase 1 can't pass, the suite deploys hardhat task contracts (23 states vs foundry's 26), model-owner deploy fails at ABI encoding, and there's no command to fund, key, claim or dispute. So nobody can run a DevNet 2.0 GI from dincli today. |
Diff vs current develop HEAD |
None — new file, branch cut from the current tip |
| Recommended merge proposal | Merge after the amendments in the verification comment. (1) Add the Discussion No. 216 follow-ups as a source and name issue No. 223 as closed by TP-3. (2) TP-5 gains setup.md's broken @main#subdirectory=dist line and takes ROADMAP.md:19 (now wrong after PR No. 211) into scope. (3) TP-2's test-data state checks every batch has a commitment; the flag=false question goes, since the flag is already one-way. (4) Small reference fixes in TP-1. |
| Actual merge proposal | Soon |
| Pending proposal | Decisions 1–4 (separate comment), then forwarding as one Developer/tasks/task_DDMMYY_n.md. |
| Local merge conflict | No |
| GitHub merge conflict | No |
Verification
Full detail is in the verification comment above. In short: all file:line references resolve at a1fcce2. The suite and dincli gaps reproduce, including the 23 vs 26 enum count, the missing register-encryption-key command and the unbound din_validator_stake_address. Three items need changes: the test-data gate (the flag is one-way but unchecked), setup.md (dist/ on main has no buildable project), and ROADMAP.md:19. check_doc_links.py Developer resolves. GitHub CI is green.
Local vs. GitHub agree: both report a clean merge; the branch is cut from the current tip.
Reviewer decisions: options and recommendationsThese are the plan's four "Decisions requested". Each lists the options and a recommendation, based on the verification comment above. @umermjd11, answer per decision; the plan gets amended to match. Decision 1: new GI states
Recommended: B, with verification amendment 5: the state only counts if Decision 2: where the
|
| Option | Effect |
|---|---|
| A. dincli-side at approval (as proposed) | No contract change. approve-registration-request compares each contract's modelId() with totalModels() and refuses on a mismatch unless --force is passed. A DIN-Rep who approves with another tool skips it. |
B. Contract-side in DINModelRegistry.approveModel |
Enforced for everyone. But it's a platform upgrade, and the registry has to call into task contracts it doesn't reference today. |
Recommended: A for this plan. Note B as a follow-up for the mainnet registry; it's in the same area as BL-34 / issue No. 224 (the registry and task contracts don't know about each other).
Decision 3: one GI or two in the suite
| Option | Effect |
|---|---|
| A. One complete GI (as proposed) | Proves every phase, claims and release-slots once. It's the shortest path to green, and issue No. 228 can then put it in CI. |
| B. Two GIs | Also proves startGI from GIended, the next-GI funding check and that released slots are reusable. It roughly doubles the suite's runtime. |
Recommended: A, with the second GI added as an optional test (kept out of CI, with an integration + slow marker) once the first passes.
Decision 4: dispute commands in TP-3 or split out
| Option | Effect |
|---|---|
| A. In TP-3 (as proposed) | Role docs (TP-5) can document disputes as they ship. It's also a Discussion No. 216 follow-up ("no commands yet for … disputes"). It adds about a day to TP-3. |
| B. Split into a follow-up | TP-3 and TP-4 ship sooner, but the docs keep saying "no dincli command yet" for disputes. |
Recommended: A. The test-data dispute changed shape in PR No. 215: owner-only resolve, an unanswered dispute upheld on expiry, no penalty after settlement, and TA_RewardsAlreadySettled. The commands should be built and documented against that once, here.
…nd reviewer decisions 1-4 - Discussion No. 216 follow-ups listed as a source, each mapped to its TP; TP-3 closes issue No. 223 (BL-27 + BL-28). - TP-5 gains setup.md (broken @main#subdirectory=dist install, stale wheel name) and takes ROADMAP.md:19 into scope. - TP-2: AuditTestDataAssigned requires every batch to have a stored commitment (new TA_TestDataNotAssigned, +75 B on DINTaskAuditor measured); flag=false question dropped (already one-way); priority order AuditTestDataAssigned > AuditSeedLocked > AggSeedLocked. - Precision: test_04_gi.py:478 passes on the name (stale 'or 23' fallback); test_02_task_contracts.py; claimDisputeBond at :1575. - Decisions: recommended options accepted (B, A, A, A). - Status: approved, forwarded to task_061026_21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Decisions and amendments applied (
|
|
Forwarded in #232: task_061026_20 (contracts, tracked in Discussion #230) and task_061026_21 (full-GI, tracked in Discussion #231). #232 also closes task_021026_19. |
Re-review: amendments and decisions appliedReviewed the fix commit: Amendments
+75 B re-measured: a prototype of the every-batch check on DecisionsAll four record the recommended option: B with the priority order, A with Correction to my amendment 6My review said " Fix before merge (one line)
Optional nit, inherited from the original plan (
|
…nd at :1583 - :188: claimDisputeBond() is at DINTaskCoordinator.sol:1583 (at a1fcce2 and current develop); :1575 is _burnAndForward(d.bond) inside resolveDispute. - :175 (nit): the auditor-side stake guard in deploy.py is at :63-64, not :61-62 (line 61 is blank). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Actual outcome — PR No. 229 merged (pushed)This supersedes the pre-merge merge-proposal comment above with what actually happened. Fix commit reviewed: One commit on
No deviation commit was needed. Files unchanged from the PR (1 of 1:
|
New task plan for review:
Developer/tasks-plan/umermjd11/task-plan-051026-2.md. It's written againstdevelop@a1fcce2. Same flow as before: review here, I apply amendments, then it's forwarded as onetasks/spec.Why. The task contracts have moved past what dincli and the full-GI integration suite exercise. On
developthe suite (tests/dincli/) can't pass with either toolchain:proxyAdminkey.dincli/abis/.GIendedas 23.dincli can't drive a full GI either:
deployuses the old constructors (BL-27).setDinToken, reward funding, encryption keys, claims, release slots (BL-28) or disputes.The parts follow this order: contracts check → dincli → suite → docs.
modelId,setDinToken, funding, X25519 keys, seed blocks, the three reveal windows) and the dincli coverage table. Found:startLMsubmissionsEvaluationdoesn't check that test data was assignedAuditSeedLocked,AuditTestDataAssigned(closes the gap above),AggSeedLocked. Each is set by the function that already does the step, so there are no extra transactions. Ordinals are inserted in lifecycle position, and every dincli mirror, gate, doc and test is updated in the same PR. Ordinal table goes to PR #29. Size is measured against the 1,079 B margindeploy --model-id+setDinToken, amodelIdcheck at approval,rewards deposit/fund-emission/claim/withdraw, per-walletauditor register-encryption-key,gi release-slots, both dispute families, and fail-fast checks beforegi startandcreate-testdataset--officialABI writes) and runs a complete GI: funding, keys, seed locks, commit and reveal in all three phases, slash, end, claims, release slots. State is asserted after every phaseDecisions requested:
modelIdcheck lives in dincli or the registry.Companion plan: PR #219 (task-plan-051026-1) is now narrowed to the contract follow-ups (#201 A4, #180, #193). The plan has a section on how the two coordinate. CI for the integration suite is a follow-up in #228 and is not part of this plan.
Docs-only PR.
check_doc_links.py Developeris green.🤖 Generated with Claude Code