Skip to content

feat(shared-world): accept subject.source local-tree#274

Merged
danielgwilson merged 1 commit into
mainfrom
feat/shared-world-local-tree
Jul 9, 2026
Merged

feat(shared-world): accept subject.source local-tree#274
danielgwilson merged 1 commit into
mainfrom
feat/shared-world-local-tree

Conversation

@danielgwilson

Copy link
Copy Markdown
Owner

Extends the shared-world topology (sequential + concurrent) to serve the ONE shared plane from the local working copy, not only a public clone. Direct follow-up to the local-tree keystone (#265); the homun-only prerequisite for driving a multi-app monorepo shared world from a working tree.

What

  • shared-world validation was clone-only (lab-config.ts:943); now accepts clone OR local-tree at parse and both engine re-enforcement layers. routesToShared/ConcurrentSharedWorld updated. subject.localTree.keep rejected on the concurrent route (would orphan the N actor desktops, mirroring clone.keep).
  • Both engines pack the working tree once (the ONE subject sandbox), upload + extract + provision via the keystone's provisionLocalTreeSubject; the N actor desktops still drive the getHost URL unchanged (verified: zero re-pack, zero per-actor upload).
  • Plane provenance emits {source: local-tree, archiveSha256, commit?, dirty?} (the archive digest is the pin; a dirty tree can't be commit-pinned) instead of the clone {repo, commit}. Clone path byte-identical. verify fails closed on a live local-tree shared-world bundle missing the pin.
  • Docs: current.md + schemas.md note shared-world now accepts local-tree. The multi-origin design doc is deliberately untouched (separate downstream slice, still gated).

Review

Hostile-reviewed, verdict SHIP: all five attack categories clean (clone regression byte-identical, pack-once traced, provenance honest with no host-path leak, fail-closed gate intact, DI byte-stable), with the reviewer running a live probe confirming verify flips to false when the pin is stripped. Two coverage gaps the review named are folded in (a concurrent wrong-target re-enforcement test, and a shared-world verify-fail-closed-on-missing-pin test).

Proof

pnpm check: 914 passed / 10 skipped, build OK. pnpm public-surface:scan: ok. Deterministic tests cover dry-run, GOOD live run (pack-once + upload + extract + provenance + verify ok), phase-event ordering, packing-failure fail-closed before any sandbox, localTree.keep, engine re-enforcement (missing serve / wrong target / keep), and the pin fail-closed. Clone shared-world tests unchanged and green.

🤖 Generated with Claude Code

…g tree onto the shared plane)

Extends the shared-world topology (sequential and concurrent) to serve the
ONE shared plane from the local working copy, not only a public clone. The
local-tree keystone (#265) already built provisionLocalTreeSubject and the
provenance shape; this removes the clone-only gate and wires it into both
engines.

- lab-config: sharedWorldValidationReason + routesToShared/ConcurrentWorld
  accept clone OR local-tree; localTree.keep rejected on the concurrent
  route (would orphan the N actor desktops, same as clone.keep).
- both engines pack the working tree ONCE (the ONE subject sandbox), upload
  + extract + provision via provisionLocalTreeSubject; the N actor desktops
  drive the getHost URL exactly as before (no re-pack).
- provenance emits {source: local-tree, archiveSha256, commit?, dirty?} for
  the plane instead of the clone {repo, commit}; the clone path is
  byte-identical (verified). verify fails closed on a live local-tree
  shared-world bundle missing the archiveSha256 pin.

This is the homun-only prerequisite for driving a multi-app monorepo shared
world from a working copy. The multi-origin design doc is untouched (a
separate downstream slice).

Hostile-reviewed: SHIP (clone regression clean, pack-once verified,
provenance honest, live verify-fail-closed probed); two coverage gaps the
review named folded in. 914 passed, scan clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@danielgwilson
danielgwilson merged commit 3c133fa into main Jul 9, 2026
3 checks passed
@danielgwilson
danielgwilson deleted the feat/shared-world-local-tree branch July 9, 2026 07:26
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