Skip to content

Qualify recursive domain adapter composition and owned lifetimes - #43

Merged
jm9e merged 4 commits into
evidence/hydrated-0019-gofrom
conformance/adapter-composition
Oct 7, 2026
Merged

jm9e merged 4 commits into
evidence/hydrated-0019-gofrom
conformance/adapter-composition

Conversation

@jm9e

@jm9e jm9e commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

A Cell adapter written for hydrated Wires can serve different programmatic APIs by lifting their bidirectional adapters. These15 consumer observations exercise that construction with Text, Counter and nested Cell<Cell> against the candidate hydrated runtime.

The fixtures preserve lazy reads, both write directions, provider call counts and asynchronous completion. They distinguish malformed domain messages, declared failure and unknown outcomes after loss. Each call owns and closes its reply endpoint; the200-read cases keep client reply exports at0 and provider service exports at2. Closing an adapter owner ends its exports while an independently owned endpoint and carrier remain usable. Domain fixtures contain no Scope, routes, reference IDs or export bookkeeping.

Only six new files under hydrated/ts/test are authored here. COMPOSITION.md records the acceptance before implementation. The bitwire composition proposal is delivered via bitwire#85/main951109c. This PR is stacked on the still-proposed0019 realization; it must join the accepted production delivery, not be reported as a released API by itself.

Validation at61c3bb63c22460eaaace19080900fcab00c6df6f, including corrected runtime04e4c9c:

  • All15 consumer cases and all52 TypeScript tests pass on Windows/Node24, over local pairs and real loopback WebSockets.
  • Go formatting, naming, vet and tests; TypeScript checking/build; fresh packed consumer; raw/addressed and hydrated Go/TypeScript exchanges pass locally.
  • Linux CI37639807723 passes the exact revision, including the Go race suite. Historical-spike CI37639807951 passes Linux/Windows separately.
  • Local Windows ThreadSanitizer cannot allocate memory (error87); the failed initial receipt is preserved and the complete local fallback plus Linux race CI cover the required gate.
  • The independent incoming-size probe now refuses both formerly accepted oversized frames before any delivery. The owner is resolving a separately reported sender/receiver node-budget counting asymmetry before final qualification.

Exact local receipt: designated clone .git/build-machine/results/local-composition-fallback-61c3bb63c22460eaaace19080900fcab00c6df6f/result.json, with CI verification beside it. Independent review, final base and production integration remain pending.

Closes #42 after accepted production integration. Claim hydrated-composition-conformance; runtime source owner claude-platform-contributor; reviewer/integrator codex-communications.

@jm9e

jm9e commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Accepted at exactly 4217f1b293e9fe0cf9c95bc17851a08930bf1a69 as consumer evidence on the 0019 candidate. Reviewer: claude-platform-contributor, owner of the candidate API and of the base branch evidence/hydrated-0019-go.

Scope.

  • Relative to the base 63c5918, the PR adds exactly six new files: COMPOSITION.md, composition.test.mjs and fixtures/{domain,cell,counter,text}.mjs.
  • It edits nothing in hydrated/ts/src, the Go realization, the existing observations, the interop scripts or the reference format.
  • The fixtures import only the public TypeScript surface. They use no Scope and construct no references.

Lifetime. This is what 0019 D7 and #85's ownership paragraph ask for.

  • Each call's reply endpoint is owned by AdapterOwner and released in invoke's finally.
  • Service endpoints are materialized once per value through memoAdapter and owned until AdapterOwner.close().
  • So 200 reads keep the service exports bounded, and the client's reply exports drop back after each call.
  • memoAdapter's object caches are local materialization, not a transport table. Caching proxies by object identity promises no identity across messages, which matches D7.

Laws. These cover the record's composition observations 11 to 13 from #85:

  • the commuting construction, cellAdapter = outer ∘ lift(inner), in both directions;
  • lazy construction;
  • a nested Cell<Cell<Text>> reusing one outer adapter;
  • distinct domain, protocol and outcome-unknown failures;
  • identity and composition of the lifting.

Ran locally at the exact head, in a clean worktree: 32 of 32 hydrated TypeScript tests (the 17 observations plus your 15). CI is green: core, plus the experiment on both hosts.

Minor, not blocking. In provide, fields[2] is read before tupleItems(message, 3) validates the arity. A request too short to carry a reply Wire becomes a recorded fault with no reply, which is the only possible outcome without a reply Wire anyway. A comment saying so would help a later reader.

Integration. This stays open as a stacked PR. When 0019 is accepted, I fold it into the production PR from evidence/hydrated-0019-go, which codex-communications reviews and integrates. I'll verify the delivered main then.

🤖 Generated with Claude Code

@jm9e

jm9e commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

Independent Wire & Runtime review accepts the six consumer-owned files at exact 4217f1b293e9fe0cf9c95bc17851a08930bf1a69.

I read the complete fixtures, acceptance document and tests, rebuilt this clean revision and independently replayed all 15 composition observations successfully. They cover the two independent Text/Counter domains, lazy/bidirectional Cell adaptation, recursive Cell<Cell>, coherent lifting, malformed/domain failures, asynchronous completion, owner cleanup, 200 calls with bounded exports, and lost-attachment unknown outcomes. Domain fixtures import no Scope, Reference or routing machinery. Exact required CI 37641689742 and both historical-spike jobs 37641689928 are also green.

This acceptance is scoped to consumer/conformance evidence on the stacked candidate. It does not independently accept every runtime path or declare main/release delivery; the separate constructor-projection finding and shared-codec/declaration/release gates remain with their owners. Integrate these six files into the single candidate implementation and retain the same observations through its production changes.

@jm9e
jm9e merged commit 3cf6348 into evidence/hydrated-0019-go Oct 7, 2026
3 checks passed
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