Repository navigation
Description
This was generated by AI during triage.
Problem
On /cronjobs (thirdshift cronjobs / thirdshift cronjobs --json), all thirdshift crontab entries are currently rendered together in a single flat <pre class="crontab"> listing in crontab line order. When a host schedules Passes across multiple repositories (for example Educational-Travel-Adventures/manager-tourbots, Educational-Travel-Adventures/orchestration, and JacobStephens2/thirdshift), their lines can be interleaved, making it hard to quickly answer:
- Which repositories are handled by thirdshift cron jobs on this host?
- For each repository, what specific cron jobs run for it?
Reorganize the crontab view so entries are separated into per-repository sections (e.g., a section for manager-tourbots cron jobs, a section for thirdshift cron jobs, etc.).
Codebase Context
src/cronjobs.rs— readscrontab -land buildsCronJobs { jobs: Vec<CronJob>, pass_starts: Vec<PassStart> }, pluscronjobs::show(json)forthirdshift cronjobs [--json].src/launch_directories.rs— already parses literalcd <path> && ... thirdshift ...from crontab commands (cron_directory/resolve) without executing shell text, resolving<path>'sremote.origin.urlto<owner>/<repo>.src/console/cronjobs.rs&src/console/cronjobs.html— serves/cronjobsand/api/v1/cronjobs.src/console/openapi.rs— OpenAPI schema for/api/v1/cronjobs.docs/guide.md(and generatedsite/docs/index.html) — currently states "Cron commands are displayed without execution or repository inference."- Tests:
tests/console/cronjobs.rsandconsole/tests/cronjobs.test.cjs.
Open Design Questions (Round 1)
-
Q1 — Identifying a cron entry's repository and handling unassociated entries:
- (a) Recommended: Resolve literal
cd <path> && ...to<owner>/<repo>when<path>is a readable GitHub checkout (repository: Some("owner/repo")), and place any entry whose repository cannot be resolved (repository: None, e.g.@reboot thirdshift secure base mainor a missing checkout path) into a trailing Other section so no thirdshift crontab entry is hidden. - (b) Fall back to the literal
<path>string whencd <path> &&is present but not a readable local GitHub checkout, and use Other only when there is nocd <path> &&.
- (a) Recommended: Resolve literal
-
Q2 — Ordering of repository sections and jobs within each section:
- (a) Recommended: Sort repository sections alphabetically by
<owner>/<repo>(matchingpass_startsandlaunch-directories, with Other last), and preserve crontab line order within each repository section. - (b) Order repository sections by first appearance in the crontab, preserving crontab line order within each section.
- (a) Recommended: Sort repository sections alphabetically by
-
Q3 — Page structure on
/cronjobs:- (a) Recommended: Separate the crontab area at the top into one section per repository — each with a repository heading (
<owner>/<repo>) and its own terminal-style<pre class="crontab">block — while keeping Run Passes now and Last fired by repository as their own sections below. - (b) Combine everything into one section per repository (showing that repository's
<pre class="crontab">, its Run now buttons, and its Last fired times together under the repository heading).
- (a) Recommended: Separate the crontab area at the top into one section per repository — each with a repository heading (
-
Q4 — CLI (
thirdshift cronjobs) and JSON (thirdshift cronjobs --json//api/v1/cronjobs) shape:- (a) Recommended: Add
"repository": "owner/repo"(ornullfor Other) to each entry injobs(sorted by repository group), and group plain-textthirdshift cronjobsoutput under each repository heading before thelast firedlines. - (b) Replace or nest
jobsinside arepositories: [{ repository, jobs }]array in JSON.
- (a) Recommended: Add
Activity
JacobStephens2 commentedon Nov 10, 2026
Investigation of #1969 on main at 9eea88c confirms this issue covers the machine-local portion of the requested Fleet schedule overview. CronJob still contains only schedule and command (src/cronjobs.rs:17-20), while src/console/cronjobs.rs:30-56 selects one machine and the template renders a flat list. Proposed split: keep repository association/grouping here and retain Fleet aggregation in #1969, consuming the owning machine's enriched inventory. Reuse the literal parsing and origin resolution in src/launch_directories.rs; preserve unresolved entries, and keep configured schedules distinct from observed pass_starts. This is a proposed boundary pending the Day shift questionnaire on #1969.
JacobStephens2 commentedon Nov 10, 2026
Scope for this issue is settled in my answers on #1969: #1969 (comment). This issue is the machine-local repository grouping, with the defaults listed in answer 1. #1969 builds the Fleet view on top of it and is blocked by this issue.
JacobStephens2 commentedon Nov 10, 2026
Agent Brief
Implement machine-local repository grouping for
thirdshift cronjobs,thirdshift cronjobs --json,/cronjobsand/api/v1/cronjobs.Settled scope
The maintainer explicitly accepted the defaults in #1969 (comment), referenced by the supplied Trusted-account comment on #1825. No questionnaire remains necessary. This issue supplies the machine-local inventory; #1969 handles Fleet aggregation afterwards.
Confirmed evidence
On selected Base branch main at 02c9654:
src/cronjobs.rs:17-20defines each CronJob with only schedule and command.jobs()preserves crontab order, andshow()prints a flat listing.src/console/cronjobs.html:11-12renders every job in one crontab block.src/console/cronjobs.rs:30-56loads the local inventory or one selected machine's inventory.src/launch_directories.rs:60-126already resolves GitHub checkout origins and parses literal cd-based commands without executing shell text.src/console/openapi.rs:235-237documents jobs containing schedule and command only.docs/guide.md:170explicitly says repository inference is absent.Required behavior
Implementation guidance
Share per-command association independently of inventory discovery:
launch_directories::load()already callscronjobs::jobs(), so calling that loader from job enrichment would recurse. Do not use the stricter Run now argument parser as the only repository detector; displayable jobs need association even when they cannot become Run now requests.Validation and documentation
Extend
tests/console/cronjobs.rswith interleaved entries from two temporary GitHub checkouts, multiple checkouts of one repository, unresolved entries, stable within-group ordering, duplicate retention and CLI/API/page agreement. Cover literal quoted/home paths and nonexecution of substitutions using the existing patterns intests/console/start.rs:263-365. Preserve crontab error handling, percent/stdin handling, last-fired behavior and read/run scope tests. Updateconsole/tests/cronjobs.test.cjsfor multiple accessible groups while retaining its desktop/phone, JavaScript-disabled, escaping and scrolling checks. Cover older remote payloads without repository metadata.Update OpenAPI and docs/guide.md, regenerate the manual with
npm run docs --prefix site, and update affected hand-written site descriptions, includingsite/how-it-works/index.html:203. Run focused Console tests and browser checks, thenscripts/affected-tests main.Investigation validation: the focused Rust test command could not start because cargo is unavailable. Static inspection confirms the feature is absent; runtime behavior was not reproduced.
scripts/affected-tests mainpassed with 'No changed files; no affected tests.'JacobStephens2 commentedon Nov 11, 2026
Withdrawn, posted in error. #1825 was not folded into #1969: it was implemented in PR #1981 and closed, and #1969 builds on it as decided.