Skip to content

[WIP/DRAFT] RFC-49 contract strip graft (ciphertext→catalog) — build-green starting point, test reconciliation INCOMPLETE#1202

Closed
branarakic wants to merge 1 commit into
integration/track-c-mergefrom
integration/rfc49-strip-graft
Closed

[WIP/DRAFT] RFC-49 contract strip graft (ciphertext→catalog) — build-green starting point, test reconciliation INCOMPLETE#1202
branarakic wants to merge 1 commit into
integration/track-c-mergefrom
integration/rfc49-strip-graft

Conversation

@branarakic

Copy link
Copy Markdown
Contributor

⚠️ DRAFT / DO NOT MERGE. Build-green starting point for the RFC-49 ciphertext→catalog cutover, stacked on the agent-half PR #1201. Test reconciliation is incomplete and this is gated on a coordinated contract redeploy. See caveats below.

What this is

A cherry-pick of 68b80e18a (the strip commit from #1196, "catalog-sampling rewire + ciphertext strip WS-A..E") onto the Track-C-reconciled agent half. The on-chain random-sampling proof target moves from the private ciphertext commitment (ciphertextChunksRoot) to the public _catalog commitment (catalogRoot); member-side encryption stays (ciphertext for members), only the on-chain commitment + core ACK + pricing move to the catalog.

State (honest)

  • All 10 packages build green (tsc cross-package type-consistency holds); evm-module compiles 9 contracts.
  • ✅ Publisher units 100/100 — incl. the dkg-publisher.ts hand-merge (curator-ack gate preserved) + the strip's storage-ACK gate inversion.
  • ⚠️ Test reconciliation INCOMPLETE. The cherry-pick auto-merge silently drifted on several files main evolved since the strip's base, so the strip's updates only partially applied. Known so far (need careful 3-way merges, NOT take-strip):
    • packages/core/test/v10-proto.test.ts — stale LU-11 ciphertext test (1 core test fails).
    • packages/publisher/test/storage-ack-handler.test.ts — 157 ours-unique lines a naive take-strip would delete.
    • packages/agent/src/dkg-agent-swm-host.ts — 17 ours-unique curated-detection lines.
    • packages/cli/src/publisher-runner.ts — ours's async-lift path the strip never saw (already renamed here).
    • The full test suite has not been run; more drift is likely.

Why it's harder than a clean graft

The divergence audit projected "7 mechanical conflicts, take-strip, ~1.5 days." That under-counted: main evolved the shared files substantially since the strip's base, so "OURS==main → take strip" regresses main's post-strip additions (e.g. skipContextGraphEnsure). The correct path is a careful per-file 3-way merge (base = the #1164 common ancestor) + full CI — ideally done with the strip author (#1196).

Gating

  • Contract redeploy at an epoch boundary (new addresses + clearOutstandingChallenges) — this branch makes the line lead main on the cutover.
  • Internal auth review + cross-rotation soak + partner re-publish.

Recommendation

Treat this as scaffolding for the cutover, not a merge candidate. Finish the 3-way reconciliation + full CI with the #1196 author, then un-draft once the redeploy is scheduled.

🤖 Generated with Claude Code

…nt half (WS-A..E)

Cherry-pick of 68b80e1 ("feat(rfc49): catalog-sampling rewire + ciphertext
strip") from feat/rfc49-catalog-sampling-strip (#1196) onto the Track-C-reconciled
agent half. The on-chain random-sampling proof target switches from the private
ciphertext commitment (ciphertextChunksRoot) to the public _catalog commitment
(catalogRoot); member-side encryption STAYS (ciphertext distributed to members),
only the on-chain commitment + core ACK + pricing move to the catalog.

REQUIRES A COORDINATED CONTRACT REDEPLOY at an epoch boundary (new addresses +
clearOutstandingChallenges migration) — do NOT activate without it. This commit
makes the branch LEAD main on the cutover (main still commits ciphertext).

Conflict resolution (7 textual + integration fixes the divergence audit missed):
- 5 take-strip (ours==main, strip is the catalog cutover): proto/publish-intent.ts,
  ack-collector.ts, publisher.ts core, storage-ack-handler.ts; deleted the V2
  chunked-ciphertext test (feature removed by the strip).
- dkg-agent.ts: ciphertext→catalog commitment param swap (chunkedCommitment →
  catalogCommitment { catalogRoot, catalogLeafCount }).
- dkg-publisher.ts: HAND-MERGE — kept ours' curator-ack gate + projection
  emission (auto-merged regions), grafted the strip's catalog-commitment staging
  for the curated-publish payload (take-strip on the one staging hunk).
- publisher.ts: RESTORED ours+main's skipContextGraphEnsure on PublishOptions
  (taking strip wholesale had regressed it — strip predates that field).
- publisher-runner.ts (cli async-lift, ours-post-strip-base — strip never saw
  it): renamed the executor's commitment param/forward ciphertext→catalog to
  match the strip's ACKCollector catalogCommitment param.

Verified: ALL 10 packages build green (tsc cross-package type-consistency holds);
evm-module compiles 9 contracts. Tests + adversarial review of the dkg-publisher.ts
hand-merge pending. Stacked under the agent-half PR (#1201); contract-strip PR is #1196.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@branarakic

Copy link
Copy Markdown
Contributor Author

Superseded by the properly-reconciled full cutover branch integration/rfc49-full (3-way merge keeping curator-ack/Gate-A/recovery + main's additions; surgical cutover applied to the publisher/agent; all suites green except a pre-existing env flake). New PR below.

@branarakic branarakic closed this Jun 16, 2026
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