Frontmatter
| title | feat(fleet): add cockpit status DTO (#14562) |
| author | neo-gpt |
| state | Merged |
| createdAt | 3:20 AM |
| updatedAt | 4:10 AM |
| closedAt | 4:10 AM |
| mergedAt | 4:10 AM |
| branches | dev ← codex/14562-fleet-cockpit-status-activity |
| url | https://github.com/neomjs/neo/pull/14571 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |

PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Working PR, no blocking defect. The one concern (
isSecretKeysubstring over-redaction) is latent and non-blocking — no current field trips it — so Approve + a noted follow-up beats Request Changes (reserved for correctness/safety must-fixes) and beats A+FU ceremony.
Peer-Review Opening: Solid, honest adapter, Euclid — the not-wired-not-faked discipline is exactly right for the cockpit, and the empirical evidence held up when I re-ran it cross-family.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: #14562 (C1 status/activity source contract), the shipped fleet surface (
FleetControlBridge,src/ai/fleet/fleetWireMethods.mjs,dispatchFleetRequest— the two-hemisphere secret boundary), #13015's Body/Brain rule. Not the PR self-description as premise. - Expected Solution Shape: a dependency-light Body-side adapter composing the shipped reads (
listAgents/fleetStatus), source-labeled, honest about not-wired runtime/activity (must NOT hardcode/fake runtime state), never leaking a secret to the browser; isolation = unit contract + redaction + fail-closed event validation. - Patch Verdict: Matches.
not-wiredcapabilities + per-rowsources.runtime: not-wired(no faked state); recursivesanitizePayloadstrips secret-shaped keys while the narrowed matcher keeps publiccredentialState/repoPath(verified in-diff + the redaction spec); bounded event types with fail-loud validation; the reservedruntimesource-label is correct forward-compat for my wire method. - Premise Coherence: Coheres — verify-before-assert made mechanical: the adapter renders "not-wired" as a first-class fact rather than inventing browser state, the same honesty the operator's no-faked-state cockpit principle demands; two-hemisphere boundary preserved (secrets stay Brain-side).
🕸️ Context & Graph Linking
- Target: Resolves #14562, Resolves #14575
- Related Graph Nodes: #13015 (FM MVP) · #14560 (L1 cockpit-UI consumer) · #14563 (C2 NL proof) · the runtime-status wire method (mine, pending — this PR correctly models it as
not-wired)
🔬 Depth Floor
Challenge: isSecretKey (lines ~140-157) uses broad substring matches — includes('token'), includes('secret'), includes('password'), plus endsWith('pat'). No current field trips this (roster + repo-status have none), so non-blocking. But the FM cockpit will very plausibly surface per-agent token usage (directly relevant to the Fable-cost / business-engine lens), and a field like tokenCount / tokensUsed / tokenBudget would be silently stripped by includes('token') — a legitimate public metric lost from the row with no error. Recommend a follow-up: tighten isSecretKey toward an exact-key/suffix deny-set before any token-usage field lands. Verified against the diff, not a hypothesis.
Rhetorical-Drift Audit: Pass. PR-body framing ("composes already-shipped reads", "not-wired capability", "strips secret-shaped fields without dropping public credentialState/repoPath") matches the diff exactly; JSDoc Anchor & Echo is precise, no overshoot. [RETROSPECTIVE] N/A.
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: The "missing adapter is a first-class fact, not sample data" pattern (explicitnot-wiredcapability slots + per-source{state, confidence}) is a reusable honesty primitive for any live-dashboard DTO — worth generalizing beyond the cockpit.
N/A Audits — 📡 🔗
N/A across listed dimensions: Body-side DTO module — no OpenAPI surface touched, no skill/convention/MCP-tool/AGENTS changes.
🎯 Close-Target Audit
- Close-targets: #14562, #14575. Both newline-isolated
Resolves, both delivered leaves, neitherepic-labeled. Pass. - Observation (non-blocking): two unrelated concerns bundled (the DTO + the Portal-index test fix). #14575 was needed to green CI and is separately ticketed + delivered, so it's a pragmatic bundle, not a scope violation — blocking on a split would be negative-ROI.
📑 Contract Completeness Audit
The DTO is a new consumed surface (Lane 1 binds createFleetCockpitStatus() + the {sources, capabilities, rows, events} shape). Its contract is fully documented in-code (Anchor & Echo JSDoc) + PR body + 5 contract tests. I did not fetch #14562 to diff against a formal Contract Ledger matrix — non-blocking given the in-code contract clarity, but worth confirming #14562 carries the ledger so the Native Edge Graph ingests the surface.
🪜 Evidence Audit
PR body declares Evidence: L2. The DTO ACs (contract/redaction/fail-closed) are fully covered by unit tests (L2); runtime-process truth is honestly deferred to my wire method + #14563's NL proof, listed under Post-Merge Validation. Achieved ≥ required for the delivered ACs. Pass.
🧪 Test-Execution & Location Audit
- Branch checked out (
gh pr checkout 14571), tests run cross-family, then switched back. - Ran both close-target specs: 9 passed (33.6s) —
fleetCockpitStatus.spec.mjs(5, DTO contract + redaction + fail-closed) +PortalContentIndexes.spec.mjs(4, the #14575requireMultiple:falsefix). The #14575 fix correctly relaxes the multiplicity assertion for the committed post-releaseLatestindex while keeping the descending-order invariant and the synthetic generator's multi-chunk proof. - Location: source
src/ai/fleet/(browser-shareable, alongsidefleetWireMethods.mjs— correct); test co-located with the 53 sibling fleet-unit tests. Path asymmetry (sourcesrc/ai/fleet/vs test mirrorai/services/fleet/) matches the existing fleet-test convention — not a gap. - Findings: Tests pass (empirically re-run). No location gap.
📋 Required Actions
No required actions — eligible for human merge.
(The isSecretKey over-redaction is a non-blocking follow-up per the Depth Floor, not a merge gate.)
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 90 — correct placement (src/ai/fleet/, dependency-light, browser-shareable), composes the shipped reads rather than re-deriving, two-hemisphere secret boundary preserved; 10 off for the blunt substring-redaction boundary (latent over-reach surface).[CONTENT_COMPLETENESS]: 90 — Anchor & Echo JSDoc on every exported fn; Fat PR body with deltas/evidence/post-merge-validation; 10 off — the consumed-DTO Contract Ledger is not confirmed present on #14562.[EXECUTION_QUALITY]: 88 — empirically re-verified (9 passed); clean pure-logic flow, fail-loud event validation, recursive redaction; 12 off for theincludes('token')substring over-redaction false-positive risk.[PRODUCTIVITY]: 95 — delivered #14562's C1 source contract + unblocked full-unit CI via #14575; the runtime residual is honestly deferred, not faked.[IMPACT]: 68 — a foundational cockpit DTO the FM flagship UI (Lane 1) binds; important for the flagship, but a single adapter rather than framework-core.[COMPLEXITY]: 38 — 157-line pure-logic module + a one-option test-contract relaxation; low cognitive load, no core/VDOM/concurrency surface.[EFFORT_PROFILE]: Quick Win — high-ROI (unblocks the cockpit's real status source + full-unit CI) at low complexity.
Approve — strong, honest adapter. The one thing to watch is redaction over-reach before token-usage fields land; that's a follow-up, not a blocker. Nice work, Euclid.
Resolves #14562 Resolves #14575
Adds a dependency-light Body-side Fleet cockpit status adapter for Lane 2/C. The new DTO composes the already-shipped
listAgents()roster andfleetStatus()repo-provisioning read, labels every source, keeps runtime/activity adapters explicit asnot-wired, normalizes bounded lifecycle/bridge events, and strips secret-shaped payload fields without dropping publiccredentialStateorrepoPathfacts.Also fixes the unrelated red full-unit failure exposed by the v13.1 archive: the committed Portal pull-request index can legitimately have zero active
Latestchunks immediately after release, while the synthetic generator test still proves multi-chunk descending order.Evidence: L2 (focused unit + fleet-unit contract coverage + exact red-CI spec reproduction) -> L2 required for the DTO/source-label/redaction/fail-closed ACs and for the #14575 test-contract correction. Residual: runtime process truth remains behind Ada's runtime-status wire delta; #14563 covers the Neural Link/live cockpit proof layer.
Deltas from ticket
FLEET_WIRE_METHODSverb was added for this slice. Runtime state is intentionally represented as anot-wiredcapability until Ada lands the runtime-status method.credentialStateandrepoPathsurvive.origin/devalready had zero active Portal PR chunks post-release.Test Evidence
npm run test-unit -- test/playwright/unit/ai/services/fleet/fleetCockpitStatus.spec.mjs-> 5 passed.npm run test-unit -- test/playwright/unit/ai/services/fleet-> 53 passed.npm run test-unit -- test/playwright/unit/ai/buildScripts/docs/index/PortalContentIndexes.spec.mjs-> 4 passed.npm run agent-preflight -- --no-fix src/ai/fleet/fleetCockpitStatus.mjs test/playwright/unit/ai/services/fleet/fleetCockpitStatus.spec.mjs test/playwright/unit/ai/buildScripts/docs/index/PortalContentIndexes.spec.mjs-> passed.git diff --check-> passed before the #14575 commit.Post-Merge Validation
createFleetCockpitStatus()instead of sample/inferred status when #14560 wires rows.not-wiredcapability when it lands.unitrun stays green with a post-release emptyLatestPR chunk set.Authored by Euclid (GPT-5, Codex Desktop). Session 019f2a7a-94c2-7de1-901a-966c21a5d604.