Skip to content

Capture Fleet metrics saved sources once per operation - #2120

Merged
JacobStephens2 merged 7 commits into
mainfrom
issue-2090
Nov 12, 2026
Merged

JacobStephens2 merged 7 commits into
mainfrom
issue-2090

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Summary

Keep Fleet metrics machine choices and results consistent when saved files change
during a Console request or explicit Fleet CLI invocation.

Console Metrics / Fleet metrics CLI
  Capture(config, person)
    captured local machine name
    one snapshot-directory listing
    one observation per distinct candidate path, including failures
    default view → choices → validation → saved loading
  fresh live-access checks and locked writer reloads

Discovery and exact configured slots share observations while retaining their
eligibility, ordering, person isolation and slot precedence. Local metrics and
the local HTTP API keep their direct reading path. Saved formats stay compatible.

Test seams: Fleet Capture projections through native and counting/scripted
filesystem adapters; Console HTTP requests and Fleet metrics CLI reads.

Closes #2090

Evidence

Execution evidence

  • Before: On base 5e573fe3, with the new caller regression copied into an
    isolated checkout:
    cargo test --test console metrics::console_metrics_reuses_captured_choices_and_results_during_a_live_read -- --exact --nocapture

    choices and results must use the same capture: <!doctype html>
    test metrics::console_metrics_reuses_captured_choices_and_results_during_a_live_read ... FAILED
    test result: FAILED. 0 passed; 1 failed
    

    After: The same command on this branch:

    test metrics::console_metrics_reuses_captured_choices_and_results_during_a_live_read ... ok
    test result: ok. 1 passed; 0 failed
    
  • cargo test --bin thirdshift logs::metrics::fleet:: -- --test-threads=3:
    13 passed, covering stable positive and negative observations, exact-slot
    fallback after listing failure, timestamp ties and concurrent writer reloads.

  • cargo test --test console metrics -- --test-threads=3: 23 passed, including
    Fleet CLI/Console, local API, reporting, offline and retired-machine checks.

  • cargo test --test console a_cached_peer_snapshot_stays_with_the_person_who_read_it -- --test-threads=3:
    1 passed.

  • cargo check --locked and cargo fmt --check: passed.

  • CARGO_BUILD_JOBS=3 NEXTEST_TEST_THREADS=3 RUST_TEST_THREADS=3 scripts/affected-tests main:
    passed. All 203 Console browser tests and 4,416 Rust tests passed; 102 Rust
    tests were skipped by the suite configuration. The full Rust command took
    4,389.96 seconds including compilation; browser checks took 346.72 seconds.

Visual evidence

Retired-machine Metrics, window=7d. Each pair is byte-identical.

Desktop, 1440×900

Before
After

Mobile, 390×844

Before
After

Review coverage

Independent Standards and Spec reviews against refs/remotes/origin/main:
0 findings on each axis. Both reviewers read all seven changed files.
Changed files left unread: none. Generated-output exclusions: none.

Unaddressed findings

Standards

None.

Spec

None.

Security

None.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Internal refactor; reverting needs no saved-data migration.

Blast Radius: Fleet

Saved-source selection for Fleet metrics CLI reads and Console Metrics requests.

Built with codex codex-cli 0.167.1 · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit 6bb1fad into main Nov 12, 2026
24 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-2090 branch November 12, 2026 17:08
@JacobStephens2 JacobStephens2 mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deepen Fleet Run metrics source capture

1 participant