Skip to content

feat: land R3-1 Cloudflare hub and Multica runtime gate#78

Merged
Grivn merged 9 commits into
masterfrom
feat/r3-1-cloudflare-multica-runtime
Jul 2, 2026
Merged

feat: land R3-1 Cloudflare hub and Multica runtime gate#78
Grivn merged 9 commits into
masterfrom
feat/r3-1-cloudflare-multica-runtime

Conversation

@Grivn

@Grivn Grivn commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Implements the R3-1 harness-layer iteration without changing the root Mnemon CLI path:

  • removes the GitHubMesh exchange path and keeps MnemonHub as the EventEnvelope sync boundary
  • adds Cloudflare Workers/Durable Object MnemonHub bootstrap, including one-token setup and workers.dev subdomain provisioning
  • rebuilds mnemon-multica-runtime as a gate-first transparent provider wrapper for Codex JSON-RPC
  • adds command-driven Multica writeback boundary coverage
  • adds unified harness/scripts/r3-1/run.sh phase entrypoints for contract, Cloudflare, Docker, live Multica, and Chinese complex case validation
  • runs the Chinese complex Multica case through a Dockerized Multica CLI by default, with Multica-visible issue/run evidence

Validation

Latest full R3-1 suite executed from .mnemon-dev/tmp/r3-1-test/20260701T192723Z:

  • harness/scripts/r3-1/run.sh --phase preflight: ok
  • harness/scripts/r3-1/run.sh --phase mnemonhub-contract: ok
  • harness/scripts/r3-1/run.sh --phase cloudflare-local: ok
  • harness/scripts/r3-1/run.sh --phase cloudflare-live: ok
  • harness/scripts/r3-1/run.sh --phase multica-runtime-gate: ok
  • harness/scripts/r3-1/run.sh --phase multica-writeback: ok
  • harness/scripts/r3-1/run.sh --phase docker-local: ok
  • harness/scripts/r3-1/run.sh --phase docker-cloudflare: ok
  • harness/scripts/r3-1/run.sh --phase live-multica: ok
  • harness/scripts/r3-1/run.sh --phase zh-complex-cases: ok

Notes:

  • preflight reported a non-fatal missing global wrangler; live Cloudflare bootstrap uses npx wrangler and passed.
  • zh-complex-cases summary records multica_mode: docker and assertion Dockerized Multica CLI executed visible case: true.
  • secret scan found only fake test token strings and detector rules, no real Cloudflare or Multica token literal.

Grivn added 9 commits July 2, 2026 01:53
Add the harness/scripts/r3-1 entrypoint with preflight and MnemonHub contract phases plus JSON summaries and skipped-capability reporting for pending live phases.

Validation: harness/scripts/r3-1/run.sh --smoke
Add a shared sync-abi fixture corpus under harness/testdata and drive MnemonHub push, pull, status, auth, replay, conflict, malformed, and scope tests from it.

Validation: go test ./harness/internal/mnemonhub ./harness/internal/contract; harness/scripts/r3-1/run.sh --phase mnemonhub-contract
Remove GitHub as a first-party harness Remote Workspace backend, product connection, sync CLI mode, daemon role, and acceptance path. The remaining sync path is HTTP MnemonHub only, with guard coverage to keep GitHubMesh from re-entering the production harness surface.

Validation: go test ./harness/internal/mnemonhub/... ./harness/internal/app ./harness/internal/productconfig ./harness/internal/daemon ./harness/internal/coreguard ./harness/cmd/mnemon-harness ./harness/cmd/mnemon-acceptance; harness/scripts/r3-1/run.sh --phase mnemonhub-contract.
Add a harness-scoped Cloudflare Worker and Durable Object implementation for the MnemonHub sync ABI, with dependency-free Node contract tests over the shared sync fixture corpus. The Worker keeps the same push, pull, status, auth, scope clamp, replay, and conflict semantics as the Go hub.

Validation: npm test in harness/cloudflare/mnemonhub; harness/scripts/r3-1/run.sh --phase cloudflare-local; go test ./harness/internal/mnemonhub/... ./harness/internal/coreguard ./harness/internal/productconfig.
Add mnemon-harness hub bootstrap cloudflare and hub doctor. The bootstrap path reads a private Cloudflare env file, deploys the Cloudflare Worker/Durable Object through wrangler or npx, writes Worker secrets for replica auth, runs sync smoke, and stores only the local replica sync token under .mnemon.

Validation: go test ./harness/cmd/mnemon-harness ./harness/internal/productconfig ./harness/internal/mnemonhub/... ./harness/internal/coreguard; harness/scripts/r3-1/run.sh --phase mnemonhub-contract; harness/scripts/r3-1/run.sh --phase cloudflare-local; harness/scripts/r3-1/run.sh --phase cloudflare-live skipped because the Cloudflare account has no workers.dev subdomain yet (API code 10063).
Bootstrap now ensures a workers.dev subdomain through the Cloudflare API, keeps Worker grants in the lower-case sync ABI shape, and waits for the deployed endpoint before live smoke. The Worker secrets are no longer duplicated as wrangler vars.

Validation: go test ./harness/cmd/mnemon-harness ./harness/internal/contract ./harness/internal/mnemonhub/...; harness/scripts/r3-1/run.sh --phase cloudflare-local; harness/scripts/r3-1/run.sh --phase cloudflare-live.
mnemon-multica-runtime now buffers early JSON-RPC until a turn can be classified, proxies untouched provider traffic only when no Multica issue activation is present, and keeps issue-triggered imports under mnemond control. The R3-1 gate and writeback phases now execute focused tests instead of reporting pending skips.

Validation: go test ./harness/cmd/mnemon-multica-runtime ./harness/cmd/mnemon-harness ./harness/internal/coreguard; harness/scripts/r3-1/run.sh --phase multica-runtime-gate; harness/scripts/r3-1/run.sh --phase multica-writeback.
R3-1 now has real Docker local and Docker-to-Cloudflare sync probes, a live Multica smoke that creates a visible issue/run, and a Chinese complex-case runner that creates overlapping PoC roots, role assignments, shared-context comments, and a follow-up issue.

Validation: harness/scripts/r3-1/run.sh --phase docker-local; harness/scripts/r3-1/run.sh --phase docker-cloudflare; harness/scripts/r3-1/run.sh --phase live-multica; harness/scripts/r3-1/run.sh --phase zh-complex-cases; go test ./harness/scripts/r3-1/docker; python3 -m py_compile harness/scripts/r3-1/docker-local/verify.py harness/scripts/r3-1/docker-cloudflare/verify.py harness/scripts/r3-1/live-multica/verify.py harness/scripts/r3-1/zh-complex-cases/run.py.
Route the Chinese complex R3-1 live case through a containerized Multica CLI by default, while keeping host mode available for explicit local debugging. The phase summary now records the execution mode and asserts that Docker created the Multica-visible case path.

Validation: python3 -m py_compile harness/scripts/r3-1/zh-complex-cases/run.py harness/scripts/r3-1/*/verify.py harness/scripts/r3-1/lib/report.py; harness/scripts/r3-1/run.sh --phase zh-complex-cases; harness/scripts/r3-1/run.sh --full.
@Grivn Grivn merged commit 3483434 into master Jul 2, 2026
1 check passed
@Grivn Grivn deleted the feat/r3-1-cloudflare-multica-runtime branch July 2, 2026 01:24
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