Skip to content

docs: cloud-native harness systems — future work scoping - #54

Merged
JAORMX merged 4 commits into
mainfrom
docs/cloud-native-kit
Jul 10, 2026
Merged

JAORMX merged 4 commits into
mainfrom
docs/cloud-native-kit

Conversation

@jbeda

@jbeda jbeda commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Not a decision. Speculative scoping only — safe to merge as documentation, but nothing in it is committed.

Adds docs/cloud-native-harness-systems.md: a scoping doc naming what's still unaddressed toward a fully disaggregated cloud-native harness. It explicitly leaves out session/event state and resource-lifetime management, since ADR 0027 and ADR 0048 already resolved those. What's left:

  • The filesystem / forker / command-runner shared-handle problem (the architectural crux — the workspace/FS driver is still a proto sketch, confirmed against current main).
  • Forking as environment descent (merge-back strategies, the container-model axes — auth is the missing one).
  • Execution as a separate service (data plane vs. environment plane, declarative immutable environments, long-lived processes).
  • Two small, confirmed-still-open domain-logic gaps: governance.IsolationApprovable's worktree-only assumption, and the memory store's missing transactional Update(ctx, fn).

Linked from docs/cloud-native-harness-kit.md (the existing strawman positioning doc) as a pointer to unscoped future work, one level more speculative than that doc's own strawman status.

Verification

  • task docs (matlatl link/anchor check): 0 broken links, 0 orphans, 0 unreachable.
  • go test ./docs/lint/...: citation lint passes (all file/symbol references re-verified against current main).

🤖 Generated with Claude Code

JAORMX added a commit that referenced this pull request Jun 12, 2026
…w optional

A general harness session (chat + MCP + memory + delegation + web fetch)
doesn't need a filesystem (issue #55, the cloud-native enabler from PR #54's
discussion). CreateSessionRequest gains profile (enum-as-string: '' = the
default FS profile, 'no-fs' = filesystem-less; unknown values and the
no-fs+workspace contradiction are loud InvalidArguments; workspace's
min_len=1 moved to the Go chokepoint as a cross-field rule).

A no-fs session routes through the per-session engine (the shared engine has
FS tools baked in) with: the new engine/adapter/nofs Workspace (honest, NOT
memfs — Read/Stat return NotExist, Write errors: nothing exists that can be
lost), a catalog of WebFetch + global/client MCP + memory six + Subagent trio
+ Team (Skill body-only — assets aren't readable, said in the prompt note;
SkillDraft off; NO Read/Edit/Write/Grep/Glob/Bash/Parallel, guarded by an
EXACT-delta drift test), children inheriting the posture (no forkers, no
shell, noFSChildCatalog = memory+WebFetch+MCP with its own exact-delta
guard; per-def specialists deliberately not offered), and the posture made
model-visible three ways (main-prompt note + zeroed env facts, member note,
a rewritten Subagent description that stops promising Read/Grep/Glob).

The review panel caught a HIGH escalation before it shipped: the profile is
not on the persisted snapshot, so a restarted no-fs session would have ridden
the SHARED engine — full FS over the server cwd. Fixed by REHYDRATION (the
evict/rehydrate posture this issue exists for): a persisted empty workspace
can only be no-fs, so the run-entry funnel rebuilds the no-fs per-session
engine through the same factory and re-registers the nofs override; the osfs
factory now intercepts empty roots as a second layer. Mutation-verified e2e
across two Builds over a shared store; the drill also caught and fixed a
vacuous posture-note oracle.

Closes #55

Co-Authored-By: Claude Fable 5 <[email protected]>
@jbeda
jbeda force-pushed the docs/cloud-native-kit branch from e5f436b to 366d163 Compare June 12, 2026 18:08
@jbeda

jbeda commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main (987d88d) and re-verified the doc against current sources. Force-pushed (rebase rewrote the single commit).

What moved under the doc since it was first written (a1baf7ee):

  • Core relocated internal/ → engine/ — every internal/<core> path in the doc corrected.
  • The driver-seams arc shipped (new docs/design/DRIVERS.md): a gRPC driver protocol now backs SessionStore (+ optional PrunableStore retention), MemoryStore, and the skill/soul/agent-def/command sources, each with a conformance suite. Several "where to explore" predictions are now implemented, not hypothetical; annotated as such. The workspace/FS driver is the one seam left unbuilt — carried as an explicit proto sketch, which is exactly the mecatui: subagent / Task visibility (agent hierarchy dashboard) #1 "shared-handle problem."
  • Smaller corrections: failed-session recovery (failed → Recover → idle), the no-FS session profile (nofs), child-session retention/GC, Message.ProviderPhase in the snapshot, the production wallclock Clock, and the MemoryStore interface dropping Remember(key,value) (with Update(ctx,fn) still unadded, so 5.1's TOCTOU note stays live).

Base commit it was first written against (a1baf7ee) is now recorded at the top of the file. Still [DO NOT MERGE] / speculative.

@JAORMX

JAORMX commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Thanks for the re-verification pass, this tracks really well with where main actually is now.

One thing the rebase base just missed: 987d88d predates f1f4e31, which added docs/design/CLOUD-NATIVE.md... the executed counterpart to this doc. It takes your §1.1-§1.4 and #6 and turns them into a phased arc (snapshot fidelity → awaiting-approval evict/rehydrate → event log/outbox → leasing), with the resource inventory #6 asks for (19 rows; verdict: no seam yet, leasing is the first forcing function), a rehydrate-fidelity ledger with a decision per row, and three recorded decisions. Your next rebase will pick it up.

Two connections worth making when you do:

  • §1.4 is now partly built and doesn't know it. The no-FS profile work (9f8ba8c) shipped a run-entry rehydration seam (rehydrateNoFSSession): a restarted no-fs session rebuilds its per-session engine through the same factory create used, double-defended at the osfs factory chokepoint. That is your "evict the parked run and rehydrate" mechanism in miniature, minus the mid-turn cursor. Your line "the only genuinely new piece is a mid-turn resume entry" is more true now than when you wrote it.
  • On priorities: the arc deliberately demotes your mecatui: subagent / Task visibility (agent hierarchy dashboard) #1 (the shared-handle spike) behind mid-turn liveness and the event log. The reasoning is the no-FS cut (Make the filesystem truly optional: a no-FS session profile #55): a general harness session (chat + MCP + memory + delegation + web) doesn't need a filesystem at all, so the shared-handle problem stops gating the cloud path and only returns when the workspace driver does. The WorkspaceService sketch stays the natural home for the spike when that day comes, agreed there.

Two factual nits while you're in the file:

  • 2.1 says Root() exists because three consumers need it; it's ~29 call sites today (permconfig, parallel, bash, forker, teamsupervisor, subagent, acp, build). Dropping it is a much bigger refactor than the note implies.
  • 3.3 says force-copy "severs .git" so the worktree posture is needlessly restrictive for it. Force-copy copies .git including the remotes config, so git push from a force-copy child still reaches the real origin; blocking push/fetch/remote stays correct for both isolation kinds. The kind-awareness gap is real but smaller than the note suggests.

The three decisions in CLOUD-NATIVE.md are marked OPEN and input is welcome, especially (c): v1 is session-affinity / single-writer as a stated deployment constraint, with leasing as a Phase 4 driver-protocol concern. Your Chubby / Kubernetes-Lease prior-art pointer in #6 is exactly where we'd start.

(And before this ever merges: the internal-note reference near the top needs to go, we keep that name out of repo docs.)

Scoping doc inventorying the subsystems mecatl would break out to become a
"cloud-native harness" — externalized state, separable tool execution, a
near-stateless and cheaply restartable process. Tier A (six stateful/execution
subsystems, including resource-lifetime management as the one seam not yet
built) + Tier B (already-clean ports) + a priority synthesis. Headers are
numbered for reference.

Speculative / not a committed direction; unsure this repo is its home.

Rebased onto main (987d88d) and re-verified against it: records the base
commit it was first written against (a1baf7e), corrects the internal/ → engine/
core move, and annotates where the shipped driver-seams arc (DRIVERS.md) has
turned "where to explore" predictions into implemented reality — gRPC drivers
for SessionStore (+ PrunableStore retention), MemoryStore, and the
skill/soul/agent/command sources, with the workspace/FS driver left as the one
sketched-not-built seam. Also: failed-session recovery, the no-FS profile,
child-session GC, and Message.ProviderPhase in the snapshot.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@jbeda
jbeda force-pushed the docs/cloud-native-kit branch from 366d163 to 801022b Compare July 8, 2026 19:34
ADR 0027 (cloud-native arc, shipped) and ADR 0048 (mecak8s, shipped) have since
resolved most of what docs/design/CLOUD-NATIVE-KIT.md was scoping: durable event
log, mid-turn awaiting-approval resume, cross-process session leasing, and a
concrete k8s-native demonstration. Replace the 952-line speculative inventory
with docs/cloud-native-harness-systems.md, which keeps only what's still
genuinely unscoped (the filesystem/forker/command-runner shared-handle problem,
forking-as-environment-descent, execution-as-a-service, and two small
domain-logic gaps) and points at the ADRs for everything else. Linked from
docs/cloud-native-harness-kit.md; llms.txt regenerated.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@jbeda jbeda changed the title [DO NOT MERGE] docs: cloud-native harness kit subsystem inventory (speculative) docs: cloud-native harness systems — future work scoping Jul 8, 2026
jbeda and others added 2 commits July 8, 2026 12:55
…ystems.md

Git already has the history (the deleted docs/design/CLOUD-NATIVE-KIT.md and
PR #54); no need to narrate it inside the doc itself.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Four parallel research agents fact-checked every citation and claim in
cloud-native-harness-systems.md against current main. Everything held up
except one: §2 claimed forking's merge strategy is "hardwired to discard,"
but a real diff-apply ForkMerger already promotes a preserved fork's
changes into the parent, default-on when wired (ADR 0039) for Parallel's
single-branch winner. Correct the claim to the actual, narrower scope:
one merge strategy (promote-on-success via diff-apply), wired for exactly
one path, with every other fork path (Team, multi-branch Parallel, and the
writable Subagent's deliberately fork-free direct-write mode, ADR 0041)
still discarding or bypassing forking entirely. Also tightens two smaller
imprecisions: the Fork() signature's omitted advisory return, and the
git-worktree threat-model rationale's exact source comment.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@jbeda
jbeda marked this pull request as ready for review July 8, 2026 20:12
@jbeda
jbeda requested a review from JAORMX July 8, 2026 20:13
@jbeda

jbeda commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@JAORMX - I reworked this so that it is a companion to the cloud-native-kit.md file. This is a critique of some of the systems but marking it as speculative for now. If we start tackling any of these, we can do so through ADRs. I'm still figuring out the right way to work in this repo so maybe, at some point, we can find time and you can show me what skills you use and how.

@JAORMX JAORMX left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbeda we can merge this as is for now and iterate. Let me push an "onboarding" skill as we have for atrium which can help in getting around the repo.

@JAORMX
JAORMX merged commit eec03d9 into main Jul 10, 2026
11 of 13 checks passed
@jbeda
jbeda deleted the docs/cloud-native-kit branch August 12, 2026 20:12
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.

2 participants