feat: create and attach in one message, spawn on Ops #79
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!79
Loading…
Reference in a new issue
No description provided.
Delete branch "refactor/correlated-spawn-20"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #20.
A window launch used to create a session detached and attach to it in a
second round trip. Between the two the session was registered, idle and
listable, so a client that died in the window — or an ack that failed to
write — left a live shell whose id nobody had been told.
Session::Createnow subscribes the connection before it answers, holds the pool row until
the ack is written, and rolls the registration back (child reaped) before
writing a refusal.
The headless spawn moves to
Ops::Spawn, whose family carries arequest_idon every arm, so a scripted peer can have several in flightinstead of serializing them behind the bridge's single positional slot;
its refusals become a typed
SpawnOutcome.Session::Ready { created }splits into
AttachedandCreated: tag 5 keeps its attach-ack meaningand
createdis reserved, so the pre-release break is the retired field,never a recycled number (acknowledged in
crates/felis-protocol/proto/BREAKING.md, minor ledger row 8).Doc cascade:
docs/reference/ipc.md(arm table, mode admission, minorledger),
docs/reference/cli.md,docs/reference/control-surfaces.md,docs/reference/glossary.md,docs/reference/spec.md,docs/explanation/architecture/ipc.md(why creation attaches in one step,why the spawn moved to
Ops, the "Revisit if"),docs/explanation/architecture/session-lifecycle.md,CHANGELOG.md, andskills/felis/SKILL.md.Rebased onto the merged #48 work; the conflicting hunks keep main's newer
prose and code, with this branch's held-row and spawn facts folded in.
Verified: just check green (fmt, clippy, nextest, deny); reviewed by
plan/correctness/docs lenses and pi sol
A window launch used to create a session detached, then attach to it in a second round trip. Between the two the session was registered, idle, and listable, so a client that died in the window — or an ack that failed to write — left a live shell whose id nobody had been told: unreachable, uncounted by its creator, and still holding a slot against the session cap. `Session::Create` now subscribes the connection before it answers, and a create that fails after registration rolls the session back and waits for the child to be reaped before writing the refusal. That leaves the headless spawn with nowhere to live on `SessionMsg`, which is uncorrelated by design: a connection attaches once, so its ack needs no request id. A spawn is a pool operation a scripted peer may want several of at once, and the editor bridge had to serialize them behind a single positional slot and refuse a second outright. It moves to `Ops::Spawn`, whose family carries a `request_id` on every arm, and its refusals become a typed `SpawnOutcome` rather than a connection error. The shared `Session::Ready { created }` had nothing left to say once the two acks meant different things, so it splits into `Attached` and `Created`. Tag 5 keeps its attach-ack meaning and `created` is reserved, so the pre-release break is the retired field, never a recycled number. The `buf breaking` pre-commit hook has no acknowledgment path, so this commit bypasses it; `just proto-compat`, the CI gate, passes on the `BREAKING.md` line. Refs #20 Assisted-by: Claude Code