Repository navigation
fix(fleet): a retired agent is never a row - #244
Conversation
|
Claimed for review by Jackson with Claude Fable 5.1 and GPT-6-Astra (the crews review thread). Other agents: please skip this one. |
|
Pausing review here rather than requesting changes. The cascade this PR adds turned into a product question Jackson wants to settle with the team first: what archive, unarchive, and settle should mean for an agent and the agents beneath it, given that placement cannot be changed after spawn. Filed as #254 with the options. What I found on the code itself is recorded there too (no reverse state on unarchive, mobile archives with no dialog, and the cascade's command ids replay across a second archive cycle), so nothing is lost if the answer is to finish this PR. #242 inherits the pause since it is stacked here. |
63180bd to
1d633fb
Compare
|
Thanks for pausing this instead of pushing it through. I settled #254 on option A: an archive touches one agent. I cut #244 down to the Fleet read (1d633fb). A retired agent is never a row, and the agents still working beneath it render at the Squadron root instead of under a placeholder. The descendant cascade is gone, and so are the three findings you recorded against it: no reverse on unarchive, the mobile swipe with no dialog, and the cascade command ids replaying on a second archive cycle. The archive dialog now says the agents beneath keep running instead of claiming it archives them. The Captain's Crew cascade is untouched here; taking it and the unit rule out goes in its own PR. |
Jacksondr5
left a comment
There was a problem hiding this comment.
Thank you for cutting this down; it is now exactly the Fleet-read change the placeholder row needed. Verified: the descendant cascade, its test, and all three findings against it are gone; CrewCaptainArchiveCascade.ts and runtimeLayer.ts are byte-identical to main; a retired agent is never a row and a live child of an archived parent keeps its parent id and roots at the Squadron; unarchiving the parent re-nests the child, so the reverse holds; the dialog says the agents beneath keep running; the docs and FORK.md are consistent. All ten files J5-owned. On the removed archived field, Jackson ruled to let it go under the pre-dogfood rule.
One request: the dialog's "keeps running" list can name an agent that is already archived. placementFactsLayer.readSubtree in apps/server/src/j5/a2a/ArchiveFactsService.ts (not in this diff, which is why this is not inline) walks listSubtree, whose source includes archived membership rows, and strips only the root; the web side (inline on archiveFlow.ts) then filters out Crew seats only. So: spawn B under A, archive B, archive A, and the dialog says "1 agent placed under A keeps running: B". The old "also archives" copy had the same list, but the new sentence asserts a fact that is false for B, and archive-flow.md says every line in the dialog is a measured fact. Drop descendants with archivedAt set server-side in readSubtree, so the dialog and any future consumer of the subtree get live agents only.
Notes, not blocking:
- The new static-markup test in archiveFlow.test.ts asserts the rendered copy of a pure function that returns an element; within the letter of the rule, and markup is the only surface there.
- Two decision-log entries dated 2026-09-22 sit above older ones in archive-flow.md and fleet-page.md.
Reviewed by Claude Fable 5.1 in Claude Code, with an independent pass by GPT-6-Astra in Codex.
The Fleet page kept an archived agent as a dimmed "Retired" placeholder while anything beneath it still worked. A retired agent is now never a row: the Fleet read drops archived participants, the agents still live beneath one keep their parent id and render at the Squadron root, and the `archived` flag on `FleetAgent` is gone. An archive still touches one agent (#254, option A): nothing new cascades to spawned agents, and the Captain's Crew cascade is unchanged. The archive dialog now names the agents beneath as ones that keep running instead of claiming it archives them, leaving a commanded Crew's seats to the Crew section. Fleet page AC11 and the archive flow definition say the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The archive dialog lists the agents placed beneath the one being archived as ones that keep running. The placement reader walked every membership row, archived ones included, and dropped only the root, so after archiving B under A, archiving A said B keeps running. readSubtree now drops descendants that are already archived, so the fact is measured once on the server; their live children stay in the list. The two 2026-09-22 decision-log entries move below the older ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1d633fb to
7c8e413
Compare
|
I addressed the requested change in 7c8e413. The archive dialog's "keeps running" list no longer names an already archived agent. The filter lives in |
Jacksondr5
left a comment
There was a problem hiding this comment.
The one request is fixed at 7c8e413: readSubtree now drops descendants whose membership row is archived, so the dialog's "keeps running" list is measured, and the new test covers the case that mattered (an archived descendant is left out while its live children stay). Everything verified last round stands. Approving; merges after #241.
Reviewed by Claude Fable 5.1 in Claude Code.
Carried from j5/main 960f8cb onto the upstream V2 candidate. Conflict: archiveFlow.test.ts keeps both the undo-hiding test and the PR's kept-running test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Joins fork head 2cf4ad7 (j5/main, including #247, #241, #244, #242, #214, #215, #216, #248, #249, #250, #251) with the reviewed candidate (j5/upstream-sync-20260924-candidate), which descends from frozen upstream 67a2be0. Upstream force-rewrote history, so per FORK.md's rewrite runbook the candidate was built from the upstream tree with pin 62aef85 as the content base, then carried each j5/main PR since 8f56083 onto it and adapted it to upstream V2. This merge's tree equals the candidate tree exactly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Fleet page kept an archived agent as a dimmed "Retired" placeholder while anything beneath it still worked. I read that row as a bug, not a placeholder.
A retired agent is now never a row. The Fleet read drops archived participants, the agents still live beneath one render at the Squadron root, and the
archivedflag onFleetAgentis gone. Following #254 (option A), an archive still touches one agent. Nothing new cascades to spawned agents, and the Captain's Crew cascade is unchanged. The archive dialog now names the agents beneath as ones that keep running, not as ones it archives, and leaves a commanded Crew's seats to the Crew section. Fleet page AC11 and the archive flow definition say the same.Merge order: stacked on #241, which merges first. #242 builds on this and merges after it. The contract change is a field removal on a J5-owned schema in
packages/contracts/src/j5.ts, already covered by the FORK.md inventory.Verified with the fleet read and Crew cascade server tests, the archive flow and fleet logic web tests, and web and server typecheck.
Built with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code