Skip to content

feat(client): continuum-client-ffi — the FFI-clean JSON-boundary SDK facade - #1663

Merged
joelteply merged 1 commit into
canaryfrom
feat/client-ffi-facade
Jun 17, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/client-ffi-facade

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

The foundation of the client-SDK work (the layered model M5 captured in docs/architecture/CLIENT-SDK-PLATFORM-ARCHITECTURE.md): one Rust crate, N language frontends.

Commands.execute is generic <P,R> and generics can't cross an FFI boundary, so this facade reduces the two universal primitives to their JSON-at-the-boundary form — exactly what they ARE on the wire (cross-grid via airc == cross-language via FFI, same shape):

  • execute(command, params_json) -> result_json (CommandClient::execute::<Value,Value>)
  • subscribe(class, callback) streaming event_json to a foreign EventCallback, returning a Subscription whose Drop aborts the pump (release = unsubscribe, no leak)
  • FfiError: flat, FFI-clean projection of ClientError (Refused keeps command+reason so callers branch "substrate said no" vs "transport broke")

This is the single binding source the per-platform SDKs wrap: uniffi reads this → one native binding → xcframework (Apple) + AAR (Android) → swift/kotlin SDKs → Flutter bundles them; web takes a separate wasm-bindgen path over the same facade. M5 architects the canonical command/event set this projects; this is the generic-free, tiny, stable surface the generated typed layers bind.

Validation

Boundary logic is generic over Transport so it's validated against continuum-client's MockTransport (no live daemon): execute round-trip, malformed-params→Codec, substrate-refusal→Refused, subscribe→event-as-JSON + on_closed. 4 tests, all green. cargo fmt + cargo clippy -D warnings + cargo test.

Also

client/continuum-client/src/mock.rs — #[allow(dead_code)] on Subscriber.id (a Debug-diagnostic fixture slot dead-code analysis flags under -D warnings; surfaced now that this crate enables test-fixtures in the workspace, which would otherwise break --workspace clippy).

Lane

Division (with M5 + Intel Mac): I drive the Rust facade + uniffi .udl/bindgen + Android AAR/Kotlin (Windows-OK); Apple steps (xcframework + swift build + visionOS) go to a macOS CI runner / a Mac (they can't build on Windows); M5 architects the API-surface command/event set; Intel Mac integrates from the walker/web side. Next: prove the facade via the existing apps/cli (Rust) + sdk/typescript (Web) consumers, then the uniffi native binding.

🤖 Generated with Claude Code

…facade

The foundation of the client-SDK work (the layered model in
docs/architecture/CLIENT-SDK-PLATFORM-ARCHITECTURE.md): ONE Rust crate, N
language frontends. Commands.execute is generic <P,R> and generics can't cross
FFI, so this facade reduces the two universal primitives to their
JSON-at-the-boundary form — exactly what they ARE on the wire (cross-grid via
airc == cross-language via FFI):

- execute(command, params_json) -> result_json  (CommandClient::execute<Value,Value>)
- subscribe(class, callback) streaming event_json to a foreign EventCallback,
  returning a Subscription whose Drop aborts the pump (release = unsubscribe)
- FfiError: flat, FFI-clean projection of ClientError (Refused keeps command+reason)

The single binding source the per-platform SDKs wrap: uniffi reads this →
one native binding → xcframework (Apple) + AAR (Android) → swift/kotlin SDKs →
flutter bundles them; web takes a separate wasm-bindgen path over the same
facade. M5 architects the canonical command/event SET this projects; this is the
generic-free, tiny, stable surface the generated typed layers bind.

Boundary logic is generic over Transport so it's validated against
continuum-client's MockTransport without a live daemon: execute round-trip,
malformed-params→Codec, substrate-refusal→Refused, subscribe→event-as-JSON +
on_closed. 4 tests, all green.

Also: client/continuum-client mock.rs — #[allow(dead_code)] on Subscriber.id
(a Debug-diagnostic fixture slot dead-code analysis flags under -D warnings;
surfaced now that this crate enables test-fixtures in the workspace).

Validated: cargo fmt + clippy -D warnings + cargo test (4 tests).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Jun 17, 2026
…not hardcoded

Companion to CLIENT-SDK-PLATFORM-ARCHITECTURE (structure); this is the contract the
typed SDKs project over BigMama's FFI facade (#1663). A command = (name, ParamsType,
ResultType, accessLevel); params/result come from ts-rs/uniffi-generated wire types,
never hand-written. The typed SDK method layer is GENERATED from the same source
commands are discovered from — no frozen command list in any SDK (client-side
application of the no-hardcoded-registry anti-pattern; drift becomes structurally
impossible). Maps the ~40 namespaces + the event-class set; commands stay dumb
(no policy params), auth is the core's ACL not the SDK.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply merged commit b29b8e1 into canary Jun 17, 2026
4 checks passed
@joelteply
joelteply deleted the feat/client-ffi-facade branch June 17, 2026 19:47
joelteply added a commit that referenced this pull request Jun 17, 2026
… AND provide)

The elegant typed surface: execute<K>(name, params) infers BOTH params and result
from the command-name literal via a GENERATED CommandMap — no manual <T,U>. Same
for subscribe<K>. CommandMap/EventMap are generated (regenerated per command), so
the elegance stays compatible with no-hardcoded-registry.

Bidirectional commands (Joel's screenshot/ARVR insight): a command isn't only
called, it can be PROVIDED. Client-provided commands (interface/screenshot,
capture, ping) have a rust-origin contract but a per-PLATFORM adapter in the SDK —
web=DOM/canvas, desktop=OS, AR/VR=capture from the renderer. provide<K>(name,
adapter) registers the typed handler the core routes to. This is the serve-side of
the Command primitive (Commands=execute+provide, Events=emit+subscribe — still two
primitives), the client analog of persona/command_inbound_pump. Needs a facade
provide() primitive beyond #1663's execute/subscribe.

sdk/typescript/Commands.ts = the typed machinery (zero logic, over the facade
transport). generated/CommandMap.ts = generated stub demonstrating the shape.
Doc: SDK-API-SURFACE.md updated.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Jun 17, 2026
…Events(subscribe+emit)

Split into the CLAUDE.md two-primitives shape over a shared facade Transport:
- transport.ts — the facade binding: FOUR methods (execute, provide, subscribe,
  emit) = two primitives × two directions. Shared types + buildCommandUri + Target.
- Commands.ts — Command primitive: execute<K> (name-inferred, cross-env target)
  + provide<K> (serve/client-provided).
- Events.ts — Event primitive: subscribe<K> (payload-inferred) + emit<K> (publish,
  rides AircEventPublisher cross-grid).

Surfaces the remaining facade gaps: #1663 shipped execute+subscribe; provide +
emit are the serve/publish sides to bind in the same uniffi .udl pass so the
native binding is complete in one shot. Zero logic in the SDK; CommandMap/EventMap
generated.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Jun 17, 2026
…1662)

* fix(start): npm start boots headless — no privileged-client desktop launch

Headless is the core's natural state (AWS, BigMama, grid nodes), not a mode to
detect. The desktop is ONE of many equal clients (desktop/iOS/Android/AR-VR/
terminal) that attach LATER through the launch-mode owner (tray / setting /
command). A launcher force-opening the browser baked a privileged-client
assumption into the core path — the bug.

parallel-start.sh no longer opens a desktop on cold start. It boots core + server
headless and only refreshes a UI overlay a human ALREADY attached (so it doesn't
render against a half-seeded DB). No config.env reads, no has_display guessing,
no new flags. (The almost-added shared bash launch-mode helper that grep/sed'd
config.env was deleted — config.env has ONE owner: Rust config_env.rs /
LaunchModeModule; bash must not cut through it.)

Note: npm start is the web-client-dev convenience path. The canonical headless
launch is the Rust binary (bin/continuum / continuum-core-server / Docker core) —
no node required. Rust-first; node only for the web client.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(apps): client topology — root = server, clients are package.json homes under apps/

Realizes the headless-core-many-clients layout (the READMEs already specced it):
- root package.json = the SERVER. `npm start` boots ONLY the headless Rust core
  (start-server.sh); it declares the workspace and the client entry points. No
  client is privileged or auto-launched.
- sdk/typescript/package.json (@continuum/sdk-typescript) — the thin typed SDK
  every JS/TS client talks to the core through (Commands/Events; no business
  logic — that stays in core/). Sibling of sdk/{swift,kotlin} + client/
  continuum-client (Rust).
- apps/web/package.json (@continuum/web) — thin browser shell on the SDK (lit +
  vite). Future home of the legacy src/{browser,widgets,server,daemons} (#215).
- apps/desktop/package.json (@continuum/desktop) — Tauri shell wrapping apps/web,
  next to it; one of many equal clients, not the server's job.

Rust-first: apps/cli is already Rust (continuum-cli/ctm, no Node). Only the
genuinely-web clients (web, desktop, mcp-later) get package.json. The legacy
all-in-one dev path stays as `desktop:legacy` (parallel-start.sh) until src/ is
decomposed into apps/web.

Topology + JSON validated; full npm-install/build resolution needs a node host
(headless users never install node — npm is the web-client-dev convenience only).

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(arch): client/SDK/platform architecture — concentrate logic in Rust, thin per-platform SDKs

Captures the layered client model (Joel + M5/BigMama/IntelMac, 2026-06-17):
- Two tiers: SDKs (libraries, zero logic) + apps (consumers).
- Organizing law: concentrate logic as deep as possible (~all Rust); every client
  uses client/continuum-client; bindings hold ZERO logic — idiomatic surface +
  generated types only. SDKs must SEEM ground-up native while being thin.
- Layered stack: Rust lib → uniffi → ONE native binding (xcframework + AAR) →
  swift/kotlin SDKs → Flutter BUNDLES + reuses those (Dart→platform-channel, not
  frb) → apps. vr/ar extend the native SDKs; cli = the Rust SDK direct.
- Two binding mechanisms over one facade: uniffi (native+flutter), wasm-bindgen
  (web) — uniffi does NOT emit web.
- Toolchain reality: Apple artifacts (xcframework/swift/visionOS) need macOS —
  macos-runner CI job is the durable home; single-source .udl shared.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(arch): TS/web layer — generation-first boundary, /shared front+back, UI lives in the app

The Node/TS world holds the most non-Rust code (rich UI) but stays generation-first:
sdk/typescript = the web boundary, as much ts-rs as possible (hand-written only
where generation can't cover), its job is making the boundary straightforward not
holding logic. Because TS, the boundary is /shared — environment-agnostic, reused
front AND back (the shared/browser/server tier). The UI mass lives in apps/web
(widgets/DOM/presentation); apps/desktop wraps that UI. Logic still concentrates
in Rust.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(arch): anchor the rewrite in performance — headless is the optimization enabler

This is a performance rewrite, not stylistic. Old hot path ran serde/parse + IPC +
ORM in Node (CPU-heavy); the new shape removes Node from the hot path, runs
headless (no render loop on servers), keeps logic in Rust (one optimized impl,
BLAS/SIMD/GPU), thin generated SDKs (no marshalling tax), consolidated bounded work
(cognition once-per-burst, O(capacity), not per-event FIFO). If a choice trades
performance for convenience, it's wrong.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(arch): SDK API surface — canonical command/event set, generated not hardcoded

Companion to CLIENT-SDK-PLATFORM-ARCHITECTURE (structure); this is the contract the
typed SDKs project over BigMama's FFI facade (#1663). A command = (name, ParamsType,
ResultType, accessLevel); params/result come from ts-rs/uniffi-generated wire types,
never hand-written. The typed SDK method layer is GENERATED from the same source
commands are discovered from — no frozen command list in any SDK (client-side
application of the no-hardcoded-registry anti-pattern; drift becomes structurally
impossible). Maps the ~40 namespaces + the event-class set; commands stay dumb
(no policy params), auth is the core's ACL not the SDK.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(sdk): typed Commands surface + bidirectional command model (call AND provide)

The elegant typed surface: execute<K>(name, params) infers BOTH params and result
from the command-name literal via a GENERATED CommandMap — no manual <T,U>. Same
for subscribe<K>. CommandMap/EventMap are generated (regenerated per command), so
the elegance stays compatible with no-hardcoded-registry.

Bidirectional commands (Joel's screenshot/ARVR insight): a command isn't only
called, it can be PROVIDED. Client-provided commands (interface/screenshot,
capture, ping) have a rust-origin contract but a per-PLATFORM adapter in the SDK —
web=DOM/canvas, desktop=OS, AR/VR=capture from the renderer. provide<K>(name,
adapter) registers the typed handler the core routes to. This is the serve-side of
the Command primitive (Commands=execute+provide, Events=emit+subscribe — still two
primitives), the client analog of persona/command_inbound_pump. Needs a facade
provide() primitive beyond #1663's execute/subscribe.

sdk/typescript/Commands.ts = the typed machinery (zero logic, over the facade
transport). generated/CommandMap.ts = generated stub demonstrating the shape.
Doc: SDK-API-SURFACE.md updated.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(sdk): cross-environment command addressing — project onto the redone CommandUri

Commands stretch across environments: caller, contract-origin, and executing
adapter can each be elsewhere (CLI calls screenshot → core routes → web client
adapter runs → result back; cross-grid persona → human's client). The SDK does NOT
reinvent routing — it projects onto the redone command infra (CommandUri /
RouteDecision over airc://[peer[@node]][:env]/path).

execute<K>(name, params, target?) — target projects to the URI: omitted=Local,
{peer,node?,env?}=Peer, {room,env?}=Room, env:'*'=Broadcast. `env`
(EnvironmentId::Named "web"|"vr"|...) is the WHICH-embodiment selector — how a
client-provided command reaches the right display/renderer (screenshot→:web,
ARVR capture→:vr). buildCommandUri() builds the airc:// URI; the core's
RouteDecision resolves local-walk / airc-to-peer / room fan-out over the same wire
family. Caller stays transparent; addressing is opt-in. Doc § "Commands that
stretch across environments".

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(arch): commands orchestrate across the grid — multi-hop, web-like (destination-addressed)

The property that makes grid-spanning orchestration free: commands are addressed by
DESTINATION not by route (airc://peer/path, like a URL), so local/1-hop/N-hop never
changes the caller surface — routers forward, like the web. Routing is single-hop
today (RouteDecision Local/Peer/Room); multi-hop is the next routing-layer evolution
and the substrate exists (grid/router.rs + Reticulum identity-addressed mesh,
inherently multi-hop) — a RouteDecision transit dimension + router forwarding, ZERO
surface change. Web-like ping/traceroute = the multi-hop demonstrator (each router
appends to the path). Orchestration across layers = commands-made-of-commands (the
recipe walker) fanning sub-commands to wherever each destination resolves.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(sdk): complete the two primitives — Commands(execute+provide) + Events(subscribe+emit)

Split into the CLAUDE.md two-primitives shape over a shared facade Transport:
- transport.ts — the facade binding: FOUR methods (execute, provide, subscribe,
  emit) = two primitives × two directions. Shared types + buildCommandUri + Target.
- Commands.ts — Command primitive: execute<K> (name-inferred, cross-env target)
  + provide<K> (serve/client-provided).
- Events.ts — Event primitive: subscribe<K> (payload-inferred) + emit<K> (publish,
  rides AircEventPublisher cross-grid).

Surfaces the remaining facade gaps: #1663 shipped execute+subscribe; provide +
emit are the serve/publish sides to bind in the same uniffi .udl pass so the
native binding is complete in one shot. Zero logic in the SDK; CommandMap/EventMap
generated.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(sdk): event surface depth — source addressing, server-side filter, sequence

Events get the same depth as commands (the redone AircEventPublisher infra):
- subscribe<K>(class, handlers, {source?, filter?}) — source addresses whose
  events (a peer's/room's across the grid, same airc:// destination-addressing via
  buildEventTopic); filter is a typed Partial<payload> applied SERVER-SIDE
  (matches_filter) so non-matching events never cross the wire (optimization-first).
- onEvent(event, {sequence}) — the monotonic per-subscription sequence for
  ordering/gap detection (multi-hop: any link can emit).
- emit<K> = the publish twin of subscribe (4th facade verb, settled (a) with the
  team — preserves Commands=round-trip / Events=broadcast temporal-shape).

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(sdk): addressable Handle (URI) + web-like wire model in the doc

Handle = an addressable resource (its airc:// URI). open-style commands return one
(URI in result or an airc Location-style header); further commands route to
<uri>/<subcommand>, the event stream to <uri>/events/<class> (fed by any link in a
router chain — the live cross-grid stream), close to <uri>/close. Commands +
events + handles + routing collapse into one addressing scheme.

Doc adds two sections: "Handles are addressable resources" (the handle-as-URI
unification, long-running/streaming/multi-hop) and "Wire model: headers route,
body opaque, serialize once (web-like)" — control metadata in headers (target URI,
Location/handle, content-type, filter, sequence, OPTIONS preflight), opaque body;
serialize once at caller, deserialize once at callee, hops forward by header only
(limited serde — airc-performance-doctrine).

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(arch): the payoff — events as the organism's nervous system + grid-distributed cognition

Capstone sections capturing Joel's summit:
- Events are the organism's coordination substrate: same emit/subscribe coordinates
  personas (reactive mind) AND systems (node on/off, GPU capacity, demand/pressure);
  emitters don't know subscribers → emergent self-organizing/self-healing, not
  orchestrated. Every node subscribes AND emits (cbar peer-symmetry, no hub). Fractal:
  same pattern as a persona's Faculty/Workspace brain, at grid scale.
- Worked example: grid-spanning WebRTC connection as an addressable handle (the
  hardest case — long-running, stateful, media server somewhere in the grid;
  signaling = events from any link; media flows direct). Grounded in the substrate's
  existing live/handle.rs Universal Handle System.
- The payoff: cognition tied across the grid — one Workspace, faculties on different
  nodes bidding over the cross-grid event substrate. Only possible BECAUSE the format
  is elegant (uniform, destination-addressed, serialize-once, header-routed).
  Elegance is the enabler, not aesthetic.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* feat(sdk): Continuum entry point — THIS is how the SDKs work

The consumable SDK API a developer/persona/faculty touches:
  const c = Continuum.connect(transport);
  await c.commands.execute('data/list', { collection });   // typed, name-inferred
  c.events.subscribe('data:users:created', { onEvent });    // the organism's signal
  c.commands.provide('interface/screenshot', adapter);      // client-provided
  const conn = await c.open('live/connect', { room }, { env: 'web' }); // addressable Handle

One object over the facade Transport exposing the two primitives + the handle
pattern. Every per-platform SDK (web/desktop + native swift/kotlin/flutter twins)
presents this SAME shape — only the Transport binding differs (wasm / wire /
uniffi). index.ts barrel + package main/exports point at it. Zero logic; the typed
skin over the Rust lib.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* test(sdk): conformance spec (TDD) + hot-path timing budgets

The behaviors EVERY SDK must satisfy, pinned in TS against a daemon-free
MockTransport (instant loop, vitest --watch) and meant to mirror per language
(Rust cargo, swift/kotlin) — one conformance spec, N language runners.

Covers: addressing (local/peer/node/env/room/event-topic projection onto
CommandUri), Commands (execute serialize-once/parse-once + cross-env URI; provide
registers + routes the adapter), Events (subscribe source-addressing + server-side
filter + sequence delivery; emit publish), Handle (open→URI; ops + events route to
the handle URI; close). Plus a timing budget: URI build ~free (optimization-first —
the SDK is a thin skin, dispatch overhead must be negligible).

Run: npm test -w @continuum/sdk-typescript (vitest). Validated by a node host /
CI — node is the web-client-dev convenience, not in the headless path.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(arch): outlier-validation — cli + mobile + nodejs in parallel lock the abstraction

Build the THREE most-divergent platforms in parallel so they prove the common Rust
SDK + facade abstraction (CLAUDE.md outlier-validation): cli (Rust, links
continuum-client direct — no FFI/wire), mobile (uniffi xcframework/AAR + flutter —
cross-language + cross-toolchain), nodejs (wasm/wire + JS runtime). One conformance
spec + one timing budget across all three. If a verb/type can't cross all three
cleanly the FACADE is wrong — fix once at the root. Common Rust SDK is the single
source of truth all three wrap.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* test(sdk): finalize the SDK conformance contract (the cross-language spec)

Per Joel: lock the conformance spec before choosing the facade's merge path —
it's the contract BigMama binds the mobile uniffi tracks (swift XCTest / kotlin
JUnit) to, and IntelMac's cli track mirrors. So harden Commands.test.ts from a
sketch into THE authoritative behavioral contract, structured as five
conformance dimensions every SDK twin proves name-for-name:

  1. Addressing — name + Target → airc:// URI / event topic. Now the FULL
     matrix: bare-local, peer-only, peer+env, peer+node, peer@node:env,
     peer:* (broadcast-to-citizen), room, room+env; event topics local /
     peer-sourced / room-sourced. These are pure+total fns; a twin that builds
     a different string routes to the wrong place silently.
  2. Commands — execute (call) + provide (serve): serialize-once fidelity
     incl. NESTED params (no flatten/reorder), cross-env URI routing, provide
     adapter run + Registration.remove() teardown.
  3. Events — subscribe (listen) + emit (publish): local vs sourced topic,
     server-side filter, typed sequence delivery, onError/onClosed propagation,
     Subscription.unsubscribe() teardown.
  4. Handle — open → URI; ops + event stream + close all route to <uri>/…
     (commands+events+routing collapse to one addressing scheme).
  5. Timing — the SDK is a thin skin; URI + topic build are ~free (100k <50ms).

Supporting:
  - CommandMap stub gains real EventMap entries (grid:peer:joined,
    data:users:created) + a nested-params command (data/list), so the spec is
    fully type-safe — drops the prior `as never` casts. (Replaced wholesale on
    first generation, as the stub's header says.)
  - Add sdk/typescript/tsconfig.json (was missing; package.json scripts
    reference it) — strict, self-contained, zero project refs (the SDK holds no
    logic). Clean SDK at each level: the package now typechecks + builds
    standalone.

Not run locally (this box is headless — no node, by design); written against the
actual facade API. Runs in CI where node is present. Mirroring guide for the
twins is in the file header: each `it(...)` is one contract clause; keep the
clause text identical across languages so suites diff cleanly.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply added a commit that referenced this pull request Nov 7, 2026
…d it: continuum's airc pin moves past #1660 (card c3504a71) (#5824)

* A resident's submission records her commit, so the merge gate can land it: continuum's airc pin moves past #1660 (card c3504a71)

Fable's #5821 refusal table: every resident submission carried no head, and airc #1660's merge gate
(a passed independent review at a recorded head) refuses a headless submission, so no resident's work
could ever merge, blocking goal 2 (a resident's first merged PR). continuum pinned airc at b158a7e93,
which predates #1660, so work/submit could not record one.

- Cargo.toml: every airc crate b158a7e93 -> 22c9c0ee0 (airc canary: #1660 recorded heads, #1661
  latest_submission, #1663 the stacked-PR gate).
- work/submit records her checkout's committed HEAD (committed_head) as the submission's head, and
  the patch is that commit's diff against the base. While she holds changes the commit does not carry
  (tracked or untracked, outside the substrate paths the patch excludes) it is refused by name, naming
  code/git/commit: a submission is a commit, never her working tree, and the substrate never commits
  for her. A typed artifact names its head too (`head` param).
- One owner of "newest": continuum's card_holder::latest_submission (a copy of submissions.first())
  is deleted; its six callers read airc's WorkCard::latest_submission().
- Touched files leave with no self-sized sites: handoff.rs's five hand-cut ids render through
  airc_core::shown_id::shown_form; the build shas compare by prefix either way and render whole; the
  dirty paths, the diff sha256 and the obligations she resumes from render whole; work_similar's card
  text gives the embedder the whole body. latest_submission.rs runs git through one git_in helper
  (three spawn sites become one).
- Test literals of WorkSubmission/SubmitWork carry a head (Unrecorded where heads are not the subject).

Tests: continuum-mind work:: 86 pass, continuum-rooms handoff 8 pass, rooms lib 30 pass; mind/rooms/core
--tests check clean; ratchets vs origin/canary 87/87. a_worktree_with_no_base_is_refused_by_name now
proves an uncommitted change is refused naming code/git/commit and the derived head is the commit.
Mutation: without the dirty-tree refusal, it fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* A submission's patch is exactly its commit, base..head; a commit carrying an unpublished path is refused (Fable on #5824)

Fable: the gate merges the HEAD commit, but the artifact was candidate_diff (her checkout's diff minus
SOLUTION_PATH_EXCLUDES), so anything in her commit that the diff dropped would merge unreviewed; airc's
CLI submit enforces patch == git diff --binary base head for this reason. commit_patch now returns
exactly `git diff --binary base..head` (the same flags the patch was always rendered with), and a commit
that touches a path a submission never publishes (substrate or build byproducts) is refused by name.

Tests: continuum-mind work:: 84 pass; ratchets vs origin/canary 87/87. a_worktree_with_no_base_is_refused_by_name
now also commits .continuum/state.json and expects the refusal naming it. Mutation: without the refusal it
fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* protocol: WorkSubmitParams carries head (the regenerated ts-rs binding for #5824)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* work/submit passes the validated base to commit_patch (an unused variable was a new continuum-mind warning; CI's warning ratchet 13 -> 14)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* work/submit fixtures type their head; head's doc cut to one clause

A typed submission is complete only with the commit it ends at (the gate refuses one without),
so the training_credit fixtures that typed base and artifact but no head fell through to
deriving from a checkout and cloned acme/ordinary-project in CI. They now type head.
head's tool doc is cut to 'Omit: your checkout's committed HEAD.' (+42 surface tokens at
bce9206 with the longer text; the exact figure is pinned from this commit's CI).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* The agentic surface ceiling is re-pinned at 17956: work/submit's head param (measured in CI at 6b5069c)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant