Skip to content

Fix fleet-steward collection and Console reads - #2258

Merged
JacobStephens2 merged 2 commits into
mainfrom
fleet-steward-review-fixes
Nov 17, 2026
Merged

JacobStephens2 merged 2 commits into
mainfrom
fleet-steward-review-fixes

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

Follow-up to #2257. The Review run on #2257 committed these fixes after the PR had already merged, so they were never pushed. This applies that commit (3306b4a9) on main unchanged.

 fleet-check.sh
-  gh api rate_limit …                         # failure ignored
+  gh api rate_limit … || status=1
-  gh api search/issues per_page=50            # first page only
+  gh api --paginate search/issues per_page=100, error on incomplete results
   for each host
-    collect | quiet | tail -40                # unreachable host looks idle
+    collect || status=1                       # "running: unknown (host read failed)"
   Console
-    curl -s …                                 # signed-in Console reads as empty
+    curl --fail [--cookie $CONSOLE_COOKIE_FILE] … || status=1
+  if status != 0: keep last-tick, exit nonzero  # the missed window is read next tick
   write last-tick

 fleet-host.sh
+  set -eo pipefail
-  ps | grep -E … | grep -v grep …
+  ps | awk '$2 ~ /(^|\/)thirdshift$/ && $3 != "console"'

+scripts/test_fleet_steward.py                 # 9 tests

fleet.conf.example gains CONSOLE_COOKIE_FILE, and SKILL.md step 1 is done only when the script succeeds.

Evidence

Execution evidence

  • Before: on main, a host that can't be reached prints running: idle. The tick then writes last-tick, so that host's events since the previous tick are never read.
    After:

    $ python3 .agents/skills/fleet-steward/scripts/test_fleet_steward.py
    Ran 9 tests in 1.778s
    OK
    $ shellcheck -S warning scripts/*.sh   # no warnings
    

    Against the maintainer's live 8-host fleet (ssh, Lima, Console), fleet-check.sh reads every host and the Console's 3 Needs you rows and exits 0.

Merge Danger

Door: two-way

Changes only the skill's own files.

Blast Radius: steward

A fleet check now exits nonzero when any host, GitHub or Console read fails, and keeps last-tick so the next tick reads the missed window again. Output is no longer capped at 40 lines per host.

@JacobStephens2 JacobStephens2 added the in-progress A Claim: thirdshift has taken this issue label Nov 17, 2026
@JacobStephens2

Copy link
Copy Markdown
Owner Author

Review run. Pushed fixes to fleet-steward-review-fixes at 4daa189. Spec axis used the pull request body alone; no closing issue was linked.

Committed fix as 4daa1894. Review baseline: c58b4bfc87428feaabad1fae532421584b359a6d.

Standards

No actionable findings.

Spec

The pull request body was the sole Spec; no linked closing issue was supplied.

S1 — P2, fixed: Unreadable Activity-log directories could make collection report running: idle and advance last-tick, skipping unread events. This violated the body’s promise to preserve the checkpoint when a host read fails.

The exact reproduction confirmed the failure. fleet-host.sh now checks directory access before enumeration. A retained regression covers unreadable logs, owner, and repository directories. All three cases failed before the fix and passed afterward.

Unaddressed findings

  • Standards: none.
  • Spec: none.

Review coverage

Both reviewers read all six changed files:

  • .agents/skills/fleet-steward/SKILL.md
  • .agents/skills/fleet-steward/fleet.conf.example
  • .agents/skills/fleet-steward/scripts/fleet-check.sh
  • .agents/skills/fleet-steward/scripts/fleet-host.sh
  • .agents/skills/fleet-steward/scripts/needs-you.py
  • .agents/skills/fleet-steward/scripts/test_fleet_steward.py

Both also reviewed the final fix. No changed files remain unread; no generated-output exclusions were used.

Complete per-axis files-read lists and findings are in standards.md and spec.md. summary.json contains {"standards":0,"spec":1}.

Validation

  • python3 -, using the complete reproduction heredoc in spec.md: exit 1 before, 0 after.
  • python3 .agents/skills/fleet-steward/scripts/test_fleet_steward.py FleetStewardSpecRegressions.test_unreadable_log_directories_keep_checkpoint: exit 1 before, 0 after, covering all three permission cases.
  • python3 .agents/skills/fleet-steward/scripts/test_fleet_steward.py: exit 0; 9 baseline tests and 10 final tests passed.
  • shellcheck -S warning .agents/skills/fleet-steward/scripts/*.sh: exit 0, no warnings.
  • /usr/bin/time -p scripts/affected-tests c58b4bfc87428feaabad1fae532421584b359a6d: exit 1, after 236 seconds including compilation. It selected cargo test, which exited 101. Unit tests passed: 1,966 passed, 3 ignored. Twelve earlier integration binaries passed. Console tests had 351 passed, 1 failed, 2 ignored.
  • cargo test --test console api::release_url_keeps_api_openapi_and_cli_parity -- --exact: exit 0 on focused rerun.
  • python3 -m unittest discover -s scripts -p 'test_*.py': exit 0, 72 passed.
  • git diff --check c58b4bfc87428feaabad1fae532421584b359a6d...HEAD and git diff --check: exit 0.

The full-suite failure compared a Console response containing a GitHub authentication warning with a CLI response lacking that warning. Later integration binaries did not run after Cargo stopped. The full suite remains recorded as failed despite the focused rerun passing. Logs are under .review-logs/.

Standards: 0 findings; Spec: 1 P2 checkpoint-loss finding, fixed.

Security

No unaddressed introduced findings.

CI passed or absent at 4daa189

@JacobStephens2 JacobStephens2 removed the in-progress A Claim: thirdshift has taken this issue label Nov 17, 2026
@JacobStephens2
JacobStephens2 merged commit ec31321 into main Nov 17, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the fleet-steward-review-fixes branch November 17, 2026 14:13
@JacobStephens2 JacobStephens2 mentioned this pull request Nov 17, 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.

1 participant