Skip to content

Show Fleet cron schedules by repository and machine - #1987

Merged
JacobStephens2 merged 10 commits into
mainfrom
issue-1969
Nov 11, 2026
Merged

JacobStephens2 merged 10 commits into
mainfrom
issue-1969

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Cron jobs now offers Fleet schedules at /cronjobs?fleet=true, with matching thirdshift cronjobs --fleet [--json] output.

Fleet schedules
  Machines → ok / empty / unavailable / refused / incompatible / link-only
  owner/repo (alphabetical; Other last)
    machine
      recognized Command kind · original schedule · original command

Inventories use owning-machine repository metadata and conservative nullable Command kinds. Reads forward the signed-in person; CLI reads use the token holder. /api/v1/cronjobs remains local. Run now and Last fired remain in each machine's view.

Closes #1969

Evidence

Execution evidence

  • Before: cargo test --test console cronjobs::cronjobs_classifies_literal_commands_without_executing_them -- --exact --test-threads=3 failed: left: None, right: Some(String("Pickup run")).
    After: the same command passed: 1 passed; 0 failed.
  • Before: python3 tests/console/cronjobs_fleet.py target/debug/thirdshift failed: AssertionError: thirdshift: ... usage: thirdshift cronjobs [--json].
    After: the same command passed: Fleet CLI/page grouping, empty inventories, partial failures and API isolation passed.
  • Final scripts/affected-tests main selection passed site checks (68 checks plus manual generation; 99.03s), the binary build and all 190 Console browser checks (579.26s). Node test files ran serially; Rust used eight Nextest workers with retries disabled.
  • Current focused checks pass: all 12 Cron jobs Rust tests; the forwarded-person/read-scope test; all 20 command-surface tests; and all 14 Cron jobs browser checks, including long machine names. cargo clippy --all-targets -- -D warnings passed.
  • The local Rust phase hit the unchanged process-tree test's eight-second timing assertion under parallel load. cargo test --test process_tree interrupting_a_codex_run_stops_a_command_in_its_own_session -- --exact --test-threads=1 passed alone in 1.89s. Full CI for the exact head 68d661ec passed 4,185 Rust tests, with 97 skipped (1,233.708s test execution plus 74s compilation). CI site, Console and both Linux artifact builds also passed. Reused that successful full-suite result as the repository directs.

Seams under test: the cronjobs CLI; local /api/v1/cronjobs; signed-in local and Fleet Cron jobs pages; owning-machine HTTP reads and forwarded-person/read-scope enforcement; browser navigation, escaping and phone-width layout with and without JavaScript. Fixtures cover shared repositories, multiple Command kinds, unknown and legacy metadata, duplicates, empty inventories, independent failures, link-only machines and API non-relay behavior.

Visual evidence

1440 × 900, Cron jobs with the same local and Fleet fixture inventory:

Before
After

390 × 844, same flow and fixture inventory:

Before
After

Long machine names: wrapping regression before and after

1440 × 900:

Before
After

390 × 844:

Before
After

  • Security: cargo test --bin thirdshift cronjobs::fleet::tests::a_fleet_report_cannot_forge_another_machines_line -- --exact --test-threads=3 failed before the fix (exit 101). A remote schedule newline, line separator, and terminal controls were printed as extra Fleet report lines, including a forged west: ok status. The same test passed after the text report folds those characters. --json still keeps the original field text.

Review coverage

Independent Standards and Spec reviews used refs/remotes/origin/main as the fixed point. Both read all 21 changed files, including the generated manual; no generated exclusions and no changed files left unread. Standards raised one parsing-duplication finding, fixed by sharing the literal argument parser. Spec raised one machine identity collision finding: its exact reproduction failed before the fix (AssertionError: Local and remote schedules were merged) and passed afterward. The regression is retained; local display names now remain distinct from all configured Fleet names. Both findings are addressed.

Unaddressed findings

Standards

None.

Spec

None.

Security

None.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Read-only schedule inspection with additive inventory metadata; no scheduling or persistent-data migration. Reverting restores the previous page and CLI behavior.

Blast Radius: Console

Affects Cron jobs CLI/page/API output and Fleet read presentation. Requests use the existing validated Fleet transport, per-request timeout and redirect policy; healthy inventories remain visible when another machine fails.

Built with codex codex-cli 0.167.0 · gpt-6.1-sol · high

@JacobStephens2
JacobStephens2 merged commit 6f4ba5d into main Nov 11, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1969 branch November 11, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant