Skip to content

fix(fleet): badge counts agents with measured problems - #664

Merged
BastiHu merged 13 commits into
fix/fleet-facts-uifrom
fix/fleet-problem-badge
Oct 27, 2026
Merged

BastiHu merged 13 commits into
fix/fleet-facts-uifrom
fix/fleet-problem-badge

Conversation

@BastiHu

@BastiHu BastiHu commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The old Fleet badge counts owed asks, even when agents are healthy. The badge should count agents with current measured problems and distinguish zero from unavailable or incomplete coverage.

What changed

Count each environment-qualified agent once across project placements for a failed latest run, an overdue undispatched run, or a delivery alarm belonging to an open Exchange. Ordinary owed asks and platform notices do not count. Plain-message and closed-Exchange alarms stay visible without counting.

The badge consumes the same receiver-merged facts as the page. Stale receivers stop contributing current alarms; missing/older receiver facts leave coverage incomplete. An origin or receiver Exchange closure clears eligibility, and reconnect/read recovery restores measurements. An empty readable source is measured zero; wholly unavailable sources report an unavailable count.

Stack: #662 → #663 → #664. Land this layer with #663 for #360; its data and timestamp/disclosure changes are inherited rather than duplicated here.

UI changes

Refreshed screenshots supplied by Jackson on 27 October: capture report. Before is j5/main; after is the stack tip, with matched fixture data, dark theme and 1280×800 captures. This is an integrated stack comparison. Each image is clickable at its original size. Videos are omitted as requested.

Ordinary open ask

An ordinary open ask changes from badge 1 to no problem badge.

Before — main: ordinary ask gives badge 1 · Open full-size screenshot

Before — main: ordinary ask gives badge 1

After — stack tip: ordinary ask gives no problem badge · Open full-size screenshot

After — stack tip: ordinary ask gives no problem badge

Only environment offline

Before — main: saved rows while offline · Open full-size screenshot

Before — main: saved rows while offline

After — stack tip: unavailable coverage on page and badge · Open full-size screenshot

After — stack tip: unavailable coverage on page and badge

Remote-sender alarm

After — receiving server alarm on sender row and badge 1 · Open full-size screenshot

After — receiving server alarm on sender row and badge 1

Remote offline, local live

After — incomplete coverage and no numeric badge · Open full-size screenshot

After — incomplete coverage and no numeric badge

The remote alarm is a database fixture on connected test servers, not a real peer delivery failure. #663 evidence shows relative times, the exact-time tooltip, keyboard Facts and stale absolute times. No loading, empty-state or screen-reader evidence is claimed.

Validation

The integrated predecessor 30e4f70da passed 117 tests across 12 focused files, scoped server/web/client-runtime/contracts typechecks, targeted lint (27 changed code files), formatting (32 changed files), and whitespace checks. Dependencies were installed from the pinned lockfile; no repo-wide local checks were run.

The current follow-up fixes CodeRabbit r4376419909: frozen rows always mark problem coverage incomplete while preserving their measured runtime, activity, asks and problems. Already-incomplete cached objects keep their identity. The strengthened regression reproduced the old failure, then passed after the fix; it verifies frozen references, stable identity across unrelated updates and reconnection recovery. The base layer passes 18 shared tests. The integrated predecessor 7d442e446 passed 67 relevant tests across 5 files, client-runtime/web typechecks, targeted lint, formatting and whitespace checks. Server/contracts code is unchanged by this follow-up.

Claude Opus 5.5 approved the full predecessor stack with no Critical, High or Medium findings, then independently approved this two-file follow-up after rerunning the same 23 shared + 44 web tests. Repeated runs are not added together. Its optional performance observation remains: the remote merge currently reruns on thread-shell changes; no measured regression was reported.

GitHub J5 CI passed on #662’s current head and the prior #663/#664 heads: #662, #663, #664, including all three server shards and each aggregate check; infrastructure timeouts required reruns without changing the code or the workflow timeout. The earlier #662 run passed format/lint/typecheck, unit/web tests and server shards 1/2; shard 3 exceeded its 15-minute budget while downloading Chromium dependencies, before tests began. The CI-timeout increase remains outside this stack.

The latest change fixes the timezone-dependent keyboard assertions reported in the maintainer review on #663. Expected absolute times now use the local timestamp formatter and current 12/24-hour setting. The original failure reproduced in America/New_York. All nine keyboard tests pass in UTC, America/New_York and Pacific/Auckland; an independent Claude Opus 5.5 review approved the test-only change and repeated the same nine tests successfully in six zones, including UTC+14 and UTC−11. Targeted lint, formatting and whitespace checks pass. Product code is unchanged. Fresh J5 CI for #664 passed at 3d4bba413, including format/lint/typecheck, unit/web tests, all three server shards and the aggregate check. An earlier duplicate run was cancelled; its failed aggregate is superseded by this successful run. The earlier links above predate the test-only correction.

Current layer heads: #662 87ed2dd73f8412a1a3f2abaaa89beecc84845cfc; #663 a0e89707ffc832c37319e69bb9ef609df9364998; #664 3d4bba4134d408418a80bda8ddf54577764c9da9. All include j5/main at 882256d0915b4bb639c236506ec66a2a7a0975d9.

Live testing

Fresh fixture-based browser screenshots are available in the #663 capture report and #664 capture report. They show the table and exact-time tooltip, keyboard-open Facts, stale absolute times, a remote-sender alarm, and incomplete coverage on the page and rail badge. Remote alarms were seeded in disposable test databases; these captures do not prove a real-network delivery failure or provider run.

The initial J5 Browser attempt failed because AppArmor blocks its sandbox. The user-authorized standalone Chrome fallback works and has captured additional #663/#662 fixture screenshots; the isolated tester is finishing the bounded comparison and live-turn work. No host security setting or live database was changed. The earlier blocked-attempt artifact is historical, not the current evidence status. No new real provider turn, screen-reader pass or real-network peer failure has yet been verified in this follow-up. Automated push/poll and DOM tests cover modeled behavior separately. Disposable databases that applied the removed branch migration 44 must be recreated before testing against main's migration 44.

Checklist

  • One concern: measured Fleet facts and their presentation
  • Focused tests cover the changed behavior
  • UI evidence: refreshed fixture screenshots and limitations are linked above
  • Live testing: exercised and unexercised paths are stated above
  • Upstream-owned edits: none in this incremental layer
  • Upstream product behavior is unchanged
  • Surfaces: shared contracts/derivation, web and desktop, provider-independent facts, connected environments and stale recovery; native mobile has no Fleet page
  • Affected J5 definitions are updated

Implementation and integration: GPT-6.1-Sol through Codex. Independent review: Claude Opus 5.5 through Claude.

Count live agents with failed runs, overdue dispatch or open-Exchange delivery failures once per environment and participant. Keep source gaps and unmeasured agents explicit, and preserve facts across duplicate project placements.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
AI-Model: gpt-6.1-sol
AI-Harness: Codex
@BastiHu BastiHu self-assigned this Oct 19, 2026
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Oct 26, 2026 1:52pm UTC

Request Review

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Oct 19, 2026
@github-actions github-actions Bot added the size:L 100-499 effective changed lines (test files excluded in mixed PRs). label Oct 19, 2026
BastiHu added a commit that referenced this pull request Oct 20, 2026
BastiHu added a commit that referenced this pull request Oct 20, 2026
@BastiHu
BastiHu marked this pull request as ready for review October 21, 2026 09:49

@bryantderosier bryantderosier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the incremental badge layer c1cfbf4 -> 9bf180e; PR head and stack base rechecked before submission.

No additional verified actionable defects found in this layer. Checked measured-problem eligibility, one count per environment/participant, duplicate project placements, unavailable versus measured-zero labels, stale-source exclusion, and recovery when runtime or Exchange state changes.

The stack remains blocked by the P1 integration issue reported on #662: its Fleet read imports a human-name helper removed from current main, preventing server startup after the proposed merge. This is a nonblocking review of the incremental badge changes, not approval to land the current stack. Recheck after updating the base, and land this layer together with #663.

Validation: 60 existing focused tests passed across six files (server Fleet facts, read-change feeds, Fleet projection, shared runtime facts, Fleet logic, and Fleet presentation) on the integrated stack head 9bf180e. Whitespace checks passed for all three incremental diffs. These branch-only results do not establish compatibility with current j5/main. No live server/provider turns or browser testing were performed; no repository source files were changed.

Reviewed with GPT-6.1-Sol through the Codex harness.

@bryantderosier bryantderosier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review: measured-problem Fleet badge

No additional verified actionable defect in this incremental badge layer. The shared summary counts each measured environment/agent once, excludes ordinary owed asks, and distinguishes unavailable coverage from measured zero.

Severity Open Fixed Accepted
🔴 Critical 0 — —
🟠 High 0 — —
🟡 Medium 0 — —
🔵 Low 0 — —
⚪ Info 1 — —

No prior incremental findings. The inherited #662 startup/import blocker is fixed. No new inline comments.

Checked behavior, dependencies and validation

Checked multiple problems per agent, duplicate project placements, environment-qualified identities, plain-message versus open-Exchange alarms, platform notices, stale sources, dispatch/healthy-run/Exchange-close recovery, wholly unavailable sources and readable-empty measured zero. Inspected assertions exercise these distinctions.
This layer inherits #662's remote-sender alarm/activity limitations and #663's keyboard-inaccessible fact details; fix them in their owning layers rather than duplicating those comments here. #663/#664 still need to land together for #360 completion.
Both reviewers independently ran 3 focused client files / 46 passing tests at this head. Opus additionally ran the inherited server Fleet checks / 7 passing tests; Sol's three server suites were import-blocked. Counts are per-head runs, not unique tests across the stack. Whitespace passed.
Two independent reviewers (GPT-6.1-Sol and Claude Opus 5.5), each with separate Standards, Spec and Risk children; Captain reconciled findings against pinned source. Focused tests used existing mirrored dependencies: Effect was relinked to pinned 4.0.5, but other dependency versions may drift. No lint/typecheck, browser/accessibility interaction, live server/provider or real cross-environment execution was run.
No mobile Fleet surface exists in the pinned source. Positive-problem rendering, actual cross-environment traffic and the visual indication of incomplete rail coverage were not verified in a browser.

⚪ Info (1): unresolved visual coverage question

When coverage is incomplete, the rail's accessible label/title and page notice explain it, but the rail itself has no separate visible incomplete marker. Whether it needs one remains a product/accessibility question; I have not established a defect or an approved waiver.

Reviewed base dcdee0b922f7 → head 91dc29fe66e7. Ordinary COMMENT review.

codex added 3 commits October 26, 2026 10:35
…ated

# Conflicts:
#	apps/web/src/j5/fleet/fleetState.ts
#	packages/client-runtime/src/j5/fleetFacts.test.ts
#	packages/client-runtime/src/j5/fleetFacts.ts
…ated

# Conflicts:
#	packages/client-runtime/src/j5/fleetFacts.ts
@BastiHu

BastiHu commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

@bryantderosier Please re-review #664 at 3d4bba413, stacked on #663 a0e89707f and #662 87ed2dd73.

The badge consumes the page's receiver-merged facts, counts each environment/agent once, requires the Exchange to be open on both sides, and marks unavailable delivery coverage incomplete. Frozen rows now retain their measured facts while reporting incomplete coverage. Latest-head J5 CI passed; the earlier cancelled duplicate run's failed aggregate is superseded.

Update, 27 October: the PR bodies now include Jackson's refreshed #663 screenshots and #664 screenshots. I visually checked the table, exact-time tooltip, Facts disclosure, stale rows, remote alarm and incomplete page/badge. The comparison is main → stack tip; the remote alarm is a database fixture, not a real peer delivery failure. The user-requested Chrome fallback works despite the J5 Browser AppArmor restriction. Videos are omitted from the bodies as requested. The previous blanket evidence-blocked statement is superseded; the bounded isolated tester is finishing its remaining work.

@Jacksondr5

Copy link
Copy Markdown
Owner

UI evidence (captured for review)

Before is j5/main and after is the stack tip. Both use the same fixture data, 1280×800 and the dark theme.

Before After
One ordinary open ask: before shows badge 1, after shows no badge before after
The only environment is offline before after

After only:

State Screenshot
A remote alarm gives badge 1 remote alarm badge
The remote server is offline and local stays live: coverage incomplete, no numeric badge remote offline

Captured by GPT-6-Astra; posted by Claude Opus 5.5 for Jackson.

@BastiHu
BastiHu merged commit 0e7b6f6 into fix/fleet-facts-ui Oct 27, 2026
51 of 60 checks passed
@BastiHu
BastiHu deleted the fix/fleet-problem-badge branch October 27, 2026 13:56
@BastiHu
BastiHu restored the fix/fleet-problem-badge branch October 27, 2026 13:56
BastiHu added a commit that referenced this pull request Oct 29, 2026
* fix(fleet): show measured status, asks and problems

Use the existing live shell and ledger facts for Fleet rows, with explicit unknown reasons, per-environment read times and frozen stale measurements. Add the Fleet command-palette delegate and keep section and Crew summaries aligned with those measurements.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
AI-Model: gpt-6.1-sol
AI-Harness: Codex

* fix(fleet): keep dates explicit in measured timestamps

Use the existing absolute timestamp formatter for every Fleet time, including the date and year, so stale measurements never depend on midnight clocks. Omit the empty problems line while preserving unknowns and actual problems.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
AI-Model: gpt-6.1-sol
AI-Harness: Codex

* fix(fleet): make row fact details keyboard accessible

* docs(fleet): record keyboard test dependency seam

* fix(fleet): refresh relative timestamps while live

* fix(fleet): keep exact times accessible and relative labels clear

* fix(fleet): merge receiver facts and qualify incomplete coverage

* test(fleet): respect local timezone in keyboard assertions

* fix(fleet): badge counts agents with measured problems (#664)

* fix(fleet): badge counts agents with measured problems

Count live agents with failed runs, overdue dispatch or open-Exchange delivery failures once per environment and participant. Keep source gaps and unmeasured agents explicit, and preserve facts across duplicate project placements.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
AI-Model: gpt-6.1-sol
AI-Harness: Codex

* fix(fleet): omit counts when every source is unavailable

* test(fleet): verify cross-environment badge coverage and recovery

---------

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Codex <codex@openai.com>

---------

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Codex <codex@openai.com>
Jacksondr5 pushed a commit that referenced this pull request Oct 29, 2026
* fix(fleet): expose measured ledger and runtime facts

Read owed and awaited Exchanges and sender delivery alarms with the Fleet snapshot. Derive runtime, dispatch problems and labeled activity from the existing live raw shell, with one shared local threshold deadline and explicit missing-fact reasons.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
AI-Model: gpt-6.1-sol
AI-Harness: Codex

* fix(fleet): measure received messages and bound ask summaries

* fix(fleet): leave partial ledger activity unknown

* fix(fleet): return peer thread-delivery alarms to origin

* fix(fleet): keep polling past early alarm facts

* ci(j5): allow cold Chromium setup before server shards

* docs(a2a): keep delivery criterion in one sentence

* fix(fleet): read remote delivery alarms through client sources

* fix(fleet): track remote coverage from open Exchanges

* fix(fleet): qualify frozen rows as incomplete

* fix(fleet): show measured status, asks and problems (#663)

* fix(fleet): show measured status, asks and problems

Use the existing live shell and ledger facts for Fleet rows, with explicit unknown reasons, per-environment read times and frozen stale measurements. Add the Fleet command-palette delegate and keep section and Crew summaries aligned with those measurements.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
AI-Model: gpt-6.1-sol
AI-Harness: Codex

* fix(fleet): keep dates explicit in measured timestamps

Use the existing absolute timestamp formatter for every Fleet time, including the date and year, so stale measurements never depend on midnight clocks. Omit the empty problems line while preserving unknowns and actual problems.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
AI-Model: gpt-6.1-sol
AI-Harness: Codex

* fix(fleet): make row fact details keyboard accessible

* docs(fleet): record keyboard test dependency seam

* fix(fleet): refresh relative timestamps while live

* fix(fleet): keep exact times accessible and relative labels clear

* fix(fleet): merge receiver facts and qualify incomplete coverage

* test(fleet): respect local timezone in keyboard assertions

* fix(fleet): badge counts agents with measured problems (#664)

* fix(fleet): badge counts agents with measured problems

Count live agents with failed runs, overdue dispatch or open-Exchange delivery failures once per environment and participant. Keep source gaps and unmeasured agents explicit, and preserve facts across duplicate project placements.

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
AI-Model: gpt-6.1-sol
AI-Harness: Codex

* fix(fleet): omit counts when every source is unavailable

* test(fleet): verify cross-environment badge coverage and recovery

---------

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Codex <codex@openai.com>

---------

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Codex <codex@openai.com>

---------

Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Co-authored-by: Codex <codex@openai.com>

This branch was successfully deployed

1 active deployment
Preview — 3d4bba41 Deployed Oct 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 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.

4 participants