Skip to content

fix(fleet): a retired agent is never a row - #244

Merged
bryantderosier merged 2 commits into
j5/retired-crew-cardsfrom
j5/retired-agent-never-a-row
Sep 24, 2026
Merged

bryantderosier merged 2 commits into
j5/retired-crew-cardsfrom
j5/retired-agent-never-a-row

Conversation

@bryantderosier

@bryantderosier bryantderosier commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

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 archived flag on FleetAgent is 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

@bryantderosier bryantderosier self-assigned this Sep 22, 2026
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Sep 22, 2026
@bryantderosier
bryantderosier added this pull request to stack #245 September 22, 2026 14:41
@github-actions github-actions Bot added the size:XL 500-999 effective changed lines (test files excluded in mixed PRs). label Sep 22, 2026
@Jacksondr5 Jacksondr5 added the jackson-direct Taken by Jackson + Astra outside the fleet methodology; lanes never staff these label Sep 23, 2026
@Jacksondr5

Copy link
Copy Markdown
Owner

Claimed for review by Jackson with Claude Fable 5.1 and GPT-6-Astra (the crews review thread). Other agents: please skip this one.

@Jacksondr5

Copy link
Copy Markdown
Owner

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.

@bryantderosier
bryantderosier force-pushed the j5/retired-agent-never-a-row branch from 63180bd to 1d633fb Compare September 23, 2026 12:44
@bryantderosier bryantderosier changed the title fix(fleet): a retired agent is never a row and an archive takes its spawned agents along fix(fleet): a retired agent is never a row Sep 23, 2026
@bryantderosier

Copy link
Copy Markdown
Collaborator Author

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.

Merge order: #241 first, then this, then #242.

@github-actions github-actions Bot added size:M 30-99 effective changed lines (test files excluded in mixed PRs). and removed size:XL 500-999 effective changed lines (test files excluded in mixed PRs). labels Sep 23, 2026

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

Comment thread apps/web/src/j5/a2a/archiveFlow.ts
bryantderosier and others added 2 commits September 23, 2026 11:15
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>
@bryantderosier
bryantderosier force-pushed the j5/retired-agent-never-a-row branch from 1d633fb to 7c8e413 Compare September 23, 2026 15:18
@bryantderosier

Copy link
Copy Markdown
Collaborator Author

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 readSubtree, so the dialog and any other subtree reader get live agents only. The two 2026-09-22 decision-log entries now sit below the older ones in archive-flow.md and fleet-page.md. The branch is rebased onto the updated #241.

Comment thread apps/web/src/j5/a2a/archiveFlow.ts

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

@bryantderosier
bryantderosier merged commit 960f8cb into j5/main Sep 24, 2026
26 checks passed
@bryantderosier
bryantderosier deleted the j5/retired-agent-never-a-row branch September 24, 2026 13:35
Jacksondr5 added a commit that referenced this pull request Sep 24, 2026
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>
Jacksondr5 added a commit that referenced this pull request Sep 25, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jackson-direct Taken by Jackson + Astra outside the fleet methodology; lanes never staff these size:M 30-99 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants