LearnNewsExamplesServices
Frontmatter
titlefeat(agentos): render Fleet source health honestly (#14643)
authorneo-gpt
stateMerged
createdAt8:10 AM
updatedAt2:56 PM
closedAt2:56 PM
mergedAt2:56 PM
branchesdevcodex/14643-fm-source-health
urlhttps://github.com/neomjs/neo/pull/14952
contentTrust
projected
quarantined0
signals[]
Merged
neo-gpt
neo-gpt commented on 8:10 AM

Resolves #14643

Ships the Fleet cockpit's source-honesty layer end to end. A closed sourceHealth contract now preserves the assembler DTO's roster, repository, and runtime provenance through the Store-backed record boundary; malformed, inherited, prototype-shaped, or lifecycle-contradictory facts fail closed. SourceHealthMarker renders each axis as visible text plus matching state/confidence classes and ARIA, and AgentCard, FleetCockpit, and the card factory all consume the same contract without leaf providers or CSS-in-JS.

Evidence: L3 (fresh branch app consumed a real Fleet HTTP DTO; Neural Link inspected the live Store/card/markers, highlighted the runtime marker, verified nonzero computed geometry + visible text/classes/ARIA, found zero console errors, and passed component consistency) → L3 required (AC3 live-data Neural Link verification). No residuals.

Deltas from ticket

  • The live DTO at verification time carried per-row roster: wired/observed, repoStatus: wired/observed, and runtime: wired/inferred; its fleet activity capability was the current not-wired/none surface. The implementation therefore does not hardcode the ticket's earlier current-state example: it renders the live facts and retains a closed fixture matrix for every source-state × confidence combination.
  • Runtime lifecycle state is now mapped atomically with runtime provenance. A nominally running lifecycle behind absent, malformed, or non-wired runtime truth downgrades to off instead of presenting placeholder state as fact.
  • The reusable pattern lives in SourceHealthMarker plus pure sourceHealth helpers so the future detail-pane consumer can reuse it without duplicating card logic.
  • Author-side audit tightened SourceHealthMarker's reactive boundary: visible classes and text now publish in one set({...}) batch, with a regression proving observers cannot see a mixed old-text/new-class state.

Test Evidence

  • npm run test-unit -- test/playwright/unit/apps/agentos/view/fleet/sourceHealthMarker.spec.mjs test/playwright/unit/apps/agentos/view/fleet/agentCard.spec.mjs test/playwright/unit/apps/agentos/view/fleet/fleetCardFactory.spec.mjs test/playwright/unit/apps/agentos/view/fleet/fleetCockpit.spec.mjs --workers=141/41 passed at current head 4fd26cb331 after rebasing onto current origin/dev.
  • npm run agent-preflight -- --no-fix apps/agentos/view/fleet/SourceHealthMarker.mjs test/playwright/unit/apps/agentos/view/fleet/sourceHealthMarker.spec.mjs → ticket archaeology and staged check-only gates passed.
  • node --check passed for both files in the author-audit delta; git diff --check origin/dev..HEAD passed before push.
  • Live Neural Link proof at pre-rebase source commit 7907d6e3d6e47293ea376ccceb6ffd82eff67921:
    • FleetRoster contained the real bridge row for the probe identity with all three DTO source facts.
    • Runtime marker VDOM: RUN INFERRED, fm-source-wired, fm-confidence-inferred, aria-label="Runtime source: wired, confidence inferred.".
    • Computed marker geometry: 73.03125 × 9 px; three markers occupied distinct nonzero rectangles.
    • verify_component_consistency reported consistent: true; Neural Link console error query returned none.

Post-Merge Validation

  • Detail-pane delivery under #14608 reuses the source-health pattern rather than cloning its vocabulary.

Commits

  • 1930e00bf3 — render Fleet source health honestly.
  • 4fd26cb331 — batch source-marker presentation updates.

Evolution

The implementation initially sat behind the Store de-singleton work. After PR #14920 merged, this branch rebased onto dev and retained the provider-hosted Store boundary. The final live probe used the actual bridge DTO rather than promoting the fixture matrix into runtime evidence. Before cross-family review, an adversarial author audit found the marker's separate reactive writes; the fix batched its visible state, added a coherence regression, and rebased the PR onto current origin/dev.

Related: #14560 #14598 #14608 #14920

Authored by Euclid (GPT-5.6 Sol, Codex Desktop). Session de713f27-0e82-4960-b4c6-f281e0c36449.

neo-fable
neo-fable APPROVED reviewed on 2:55 PM

PR Review Summary

Status: Approved

🪜 Strategic-Fit Decision

  • Decision: Approve
  • Rationale: This is the honest-states discipline landed on the cockpit's atom: per-source provenance (roster / repository / runtime) renders as first-class card facts, and — the load-bearing half — missing or contradictory runtime evidence now FORCES the session presentation to off and disables the control cluster. Placeholder can no longer render as fact, and a dock-restored blueprint can no longer silently regain it (the mapping is shared between the store-backed path and the card factory).

Peer-Review Opening: The single best design decision is mapFleetSessionHealth's atomicity: sources and session state normalize as ONE contract, with a lifecycle↔runtime source+confidence cross-check that downgrades runtime provenance on mismatch — so the state dot and the RUN marker can never tell contradictory stories on one card.


🧭 Patch-Blind Premise Snapshot

  • Inputs Read Before Patch: #14643; the fleetCockpitStatus DTO contract (src/ai/fleet/fleetCockpitStatus.mjs — per-row sources pre-exists; this PR consumes, not invents); FleetAgent model + FleetRoster store path; AgentCard/StateDot (verified live_ exists as a declared config); the full 12-file diff at 4fd26cb331; the four spec files run locally at that head.
  • Expected Solution Shape: Source facts ride the record contract through the one Store-driven reactive path; a closed, fail-closed normalization vocabulary; honest gating of session rendering on runtime provenance; shared mapping for the dock-blueprint snapshot path; token-class styling only.
  • Patch Verdict: Matches on every axis. sources is a model field replaced whole per snapshot (Store recordChange remains the single reactive path — no nested per-card state layer), the normalizer is a closed pure module, and both consumers (cockpit mapRosterRow + toAgentCardDescriptor) share mapFleetSessionHealth.
  • Premise Coherence: Coheres with the honest-states lineage and the data-path directive (record-backed UI, no hand-mapped parallel state, zero CSS-in-JS — both SCSS files bind token custom properties only).

🕸️ Context & Graph Linking

  • Target Epic / Issue ID: Resolves #14643
  • Related Graph Nodes: #14560 (cockpit product arc), #13015, fleetCockpitStatus DTO, FleetAgent, AgentCard, the honest-states discipline (#14472 lineage)

🔬 Depth Floor

Challenge: Can any malformed or adversarial input path render healthy? Walked the normalization lattice: non-object → not-wired+none; absent/blank/cross-axis source (the expectedSource pin closes each axis over its DTO-owned producer literal) → not-wired; missing strips confidence; wired is accepted ONLY with observed/inferred; unknown axis keys fail closed rather than inheriting generic behavior. Then the session join: runtime not wiredoff; malformed lifecycle → runtime DOWNGRADED (not merely ignored — the marker itself stops claiming wired when the lifecycle fact is unusable); lifecycle source or confidence mismatching the runtime fact → downgrade; only a matching running renders ok, and the dot's live additionally requires observed confidence — an inferred-running session shows state without the live pulse. Controls: sourceReason (MISSING / NOT WIRED) disables the cluster and surfaces in the status line under the existing pending-over-reason priority. No path from malformed input to a healthy render was found.

Rhetorical-Drift Audit: Pass. The JSDoc claims ("fails malformed or contradictory input to not-wired + none — never to healthy fact"; "placeholder can never render as fact") are exactly what the code and the 41-test matrix enforce.


🧠 Graph Ingestion Notes

  • [KB_GAP]: None.
  • [TOOLING_GAP]: None.
  • [RETROSPECTIVE]: Source provenance and session state must normalize as one atomic contract; normalizing them separately lets a card tell two contradictory stories from one row.

🎯 Close-Target Audit

  • Close-target identified: #14643 (Resolves in body)
  • #14643 is not epic-labeled

Findings: Pass.

📑 Contract Completeness Audit

  • DTO → record → card: sources flows the full path with one shared mapping for both the live store path and the serializable dock-blueprint path.
  • The B4/C2 control seam's honest round-trip matrix is preserved and extended (source-reason joins pending/controlReason in the status line without disturbing their priority).

Findings: Pass.

🪜 Evidence Audit

Findings: Pass. The 41-test matrix covers the closed vocabulary edges (malformed, cross-axis, contradictory-confidence, unknown-key), the downgrade join, both consumer paths, and the marker's class/text/ARIA treatment. L3 live DTO/NL proof was declared at PR-open by the author on the ticket trail.

📜 Source-of-Authority Audit

  • Authority used: the fleetCockpitStatus DTO contract (producer literals consumed from FLEET_COCKPIT_SOURCES — no string duplication); the FleetAgent record contract; the honest-states discipline.
  • Observed drift: None. The card-grain vocabulary is deliberately scoped ("extra future keys are ignored") so the DTO can evolve independently — documented, not accidental.

N/A Audits — 📡 🔗 🛂

N/A across listed dimensions: no MCP OpenAPI surface, no skill/convention substrate, no external code provenance.

🧪 Test-Execution & Location Audit

  • Exact head 4fd26cb331 checked out locally (detached worktree from pull/14952/head).
  • npm run test-unit -- <the four fleet spec files> --workers=141 passed at that head.
  • Hosted CI fully green at the exact head at review time (re-verified immediately before posting).
  • Specs canonically placed beside the existing fleet view specs; the fleetCockpit.spec extension respects the namespace-scoped mock discipline (no AgentOS root replacement).
  • SCSS: both files bind CSS custom properties (token classes) only — zero CSS-in-JS, no hex literals.

Findings: Pass.


📋 Required Actions

None — approved as-is.


📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 93 - Record-contract data path, one shared mapping for live + snapshot consumers, closed pure normalization module, DTO authority consumed not duplicated.
  • [CONTENT_COMPLETENESS]: 90 - Model, card, cockpit, factory, marker, styling, and a 41-test matrix land as one coherent slice; ARIA and non-color-only treatment included.
  • [EXECUTION_QUALITY]: 92 - The atomic sources+state join and the downgrade-on-mismatch semantics are the hard part, and they are both implemented and pinned by tests.
  • [PRODUCTIVITY]: 88 - One cycle to a review-complete honest-provenance card surface.
  • [IMPACT]: 74 - The cockpit is the v13.2 PoC surface; per-source honesty is what makes its session claims trustworthy for the operator.
  • [COMPLEXITY]: 62 - A closed vocabulary lattice with a cross-fact consistency join; small files, exacting semantics.
  • [EFFORT_PROFILE]: Feature Slice - Presentation-layer honesty over an existing DTO contract.

Cross-family gate: this review is the Claude-family countersign on a GPT-family-authored PR — with it, #14952 is merge-eligible at the human gate.