Skip to content

Spec: starting work and administering a machine through the Console API - #1810

Merged
JacobStephens2 merged 34 commits into
mainfrom
issue-1768
Nov 6, 2026
Merged

JacobStephens2 merged 34 commits into
mainfrom
issue-1768

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Start work and administer this machine through its Console API and signed-in page. This integrates all six Tickets of Spec #1768.

run → repository → known Launch directory → detached CLI Command
      Ticket/Spec, Passes, Reviews, Fix runs, Custom processes, skills, Scoring, triage, Experiments
      requester → Activity log; start → Console log

admin → validated User config / Update / Theme and Eval data import
page  → Start + confirmation / Run now / scoped User config / Update
CLI   ↔ route-table inventory + reasoned exclusions ↔ OpenAPI

Launch directories come from this account's cron jobs and User config. Ticket and Spec runs preserve direct CLI behavior; Passes keep cron's gates and skip outcomes. Update answers after installation, then the Console drains connections and re-executes. Config changes preserve comments/layout and record old/new values. Scope, CSRF and requester attribution apply throughout.

The whole-Spec review fixes record lookup for differently capitalized Issue and pull request URLs, recognizes literal env NAME=value thirdshift cron directories, and reconciles the API manual with all landed endpoints. Shell-owned trust settings and caller-selected output paths stay CLI-only. The manual and hand-written site pages describe the integrated workflow.

Closes #1768

Evidence

Test seams

  • The real binary CLI and authenticated Console HTTP interface, using isolated Git repositories, fake GitHub/Harness binaries, crontab and a login shell. Observe Command records, skip outcomes, requester attribution, auditing, access refusals and survival across a Console restart.
  • The User config binary/HTTP/browser interfaces, preserving layout and comments while validating values and protecting access settings and credentials.
  • The existing release fixtures through HTTP Update, including installed version, response completion and Console re-exec.
  • The CLI inventory/route-table parity check, published OpenAPI, and signed-in browser flows at desktop and mobile widths.

Execution evidence

Merge reconciliation (3331aa36, merging origin/main at a7d76bbb):

  • Preserved both homepage paragraphs: machine administration and upstream pull-request hand-off / Copy fix command. Connected upstream Fix runs to the existing Console start API and Run now controls, retaining CLI option validation, Pass gates, requester attribution and OpenAPI parity.
  • Before: cargo test --locked --bin thirdshift console::parity -- --nocapture failed to compile with E0004: args::Command::Fix(_) was not covered in src/console/start_controls.rs. After: cargo test --locked --bin thirdshift console::parity passed 3/3; the full Rust run below also passed the Console HTTP regressions for targeted Fix starts, option forwarding/refusals and Command-limit skips.
  • NEXTEST_TEST_THREADS=4 RUST_TEST_THREADS=4 /usr/bin/time -p cargo nextest run --no-fail-fast: 3,889 passed, 0 failed, 91 skipped. Wall time 2,652.57s, including 1m 29s compilation; Nextest execution 2,560.782s.
  • NEXTEST_TEST_THREADS=4 RUST_TEST_THREADS=4 scripts/affected-tests main: site 67/67 passed (96.73s) and locked build passed (78.45s). Console finished 149 passed, 1 failed (185.37s): read-only sessions hide actions on desktop and phone with and without JavaScript hit a five-second page.waitForURL load timeout after navigating to Inbox. The script failed and stopped before Rust; the complete Rust run was executed separately above. On unchanged code, cd console && node --test --test-name-pattern='read-only sessions hide actions' tests/accounts.test.cjs passed 1/1 (13.64s). The new Fix Run now confirmation case passed in the full browser run. The original full browser run remains a failed run.
  • cargo clippy --locked --all-targets -- -D warnings, cargo fmt --all --check, git diff --check, and git diff --cached --check all passed. The manual was regenerated with npm run docs --prefix site and its generated output passed the site checks.

Earlier Spec review evidence (before this merge):

  • Before: python3 .thirdshift-review-cWCzpo/spec-repro.py case returned HTTP 422 for both uppercase repository + issue number and uppercase Issue URL, despite retained Command records. After: the identical command returns 200 and {"version":1,"name":"ACME/WIDGETS#7"} for both. Retained regression: cargo test --test console start::api_start_returns_the_record_for_case_insensitive_issue_inputs -- --exact failed 422 != 200, then passed 1/1.
  • Before: cargo test --test console start::api_start_returns_mixed_case_pull_request_record -- --exact --nocapture failed 422 != 200. After: the same command passes 1/1, exercising both Review and Custom-process starts and retrieving their Command with show. The separately supplied Review-only reproduction also failed before and passed afterward; both tests are retained.
  • Before: python3 .thirdshift-review-cWCzpo/spec-repro.py cron found directories: [] for a listed env NO_COLOR=1 thirdshift pickup job. After: the identical command finds the expected repository/directory. cargo test --test console start::launch_directories_include_literal_env_wrapped_cron_commands -- --exact failed with an empty inventory, then passed 1/1 for env and /usr/bin/env.
  • Before: both reviewers' exact documentation commands failed on the missing Experiment start and CLI-only verification claim; Standards also detected the obsolete no-start wording and incomplete JSON-body guidance. After: both exact commands pass. The retained node --test --test-name-pattern='the manual describes Console starts' site/tests/docs.test.cjs failed before correction and passes 1/1 against source and generated HTML. It also caught and now prevents documenting off instead of the CLI's none; the unchanged parser still treats off as a named account.
  • NEXTEST_TEST_THREADS=8 RUST_TEST_THREADS=8 scripts/affected-tests main: site 67/67 passed (87.48s), locked build passed (24.06s), Console 148/148 passed (153.76s). Rust stopped at 552 passed, 1 failed, 83 skipped, with 3,292 unrun: the existing dismissed_spec_silence_covers_a_different_ticket_run assertion saw null instead of silent. cargo test --test dismiss dismissed_spec_silence_covers_a_different_ticket_run -- --exact --nocapture then passed 1/1 on unchanged code. The initial Rust stage took 505.11s, including 186s compilation.
  • /usr/bin/time -p cargo nextest run --no-fail-fast --test-threads 8 completed all 3,845 Rust tests: 3,843 passed, 2 failed, 83 skipped. Wall time 2,107.37s, including the 0.42s cached test-build check. The full run remains a failed run. Both failed cases subsequently passed focused reruns on the same code and native environment:
    • cargo test --test pickup_run base_ci::unreadable_ci_files_nothing_and_does_not_stop_ready_dispatch -- --exact --nocapture: 1 passed, 36.82s test execution. The parallel run found no fixture pull request (no PR from issue-7: []).
    • cargo test --test security_review security_review_failures_without_a_diagnostic_keep_the_generic_cause -- --exact --nocapture: 1 passed, 20.29s test execution. The parallel failure explicitly reported Unit thirdshift-session-2790964-0-harness.scope was already loaded or has a fragment file before reaching the intended Security-review failure.
  • Final code: cargo clippy --locked --all-targets -- -D warnings, cargo test --test console start:: -- --test-threads=3 (24 passed, 14.67s test execution), cargo fmt --all --check, and git diff --check all passed. The full Rust run above predates the final exhaustiveness-only refinement spelling out the existing Kind variants for clippy; these final checks cover that version.

Visual evidence

Paired captures retained from the landed Tickets, showing their implementation before/after states. These are the existing evidence from #1808, #1811 and #1819, not new captures from this review.

Inbox Start — 1440×900 desktop

Before
After

Inbox Start — 390×844 mobile

Before
After

Cron jobs Run now — desktop and mobile

1440×900:

Before
After

390×844:

Before
After

User config — desktop and mobile

1440×900:

Before
After

390×844:

Before
After

Update navigation and page — desktop and mobile

Navigation, 1440×900:

Before
After

Navigation, 390×844:

Before
After

Update desktop
Update mobile

Review coverage

Independent Standards and Spec reviews compared the whole Spec branch with main (8ee0544034522da2a57c52f35eebfb01320d73b6) and completed their follow-up. Standards raised 5 findings: 3 fixed, 2 declined below. Spec raised 3: all fixed. Both axes read all 73 changed files, including generated site/docs/index.html. Generated-output exclusions: none. Changed files left unread: none on either axis. Reports, combined files-read lists, reproductions and summary.json ({"standards":5,"spec":3}) are retained in the Session's .thirdshift-review-cWCzpo/ artifacts.

Unaddressed findings

Standards

  • S2 — consolidate start-option definitions (P3 design judgment), declined. src/console/start.rs:160 (Kind::fields) and :208 (Kind::required) already own command applicability and required fields; admission at :351 and OpenAPI at src/console/openapi.rs:420 consume that shared inventory. The remaining typed decoding declarations and scalar JSON schema metadata serve different interfaces. The specific claim of independently maintained applicability inventories is refuted by those shared calls; a new type/schema framework is not required for this implementation.
  • S3 — combine the two Flags conversions (P3 design judgment), declined. src/console/start_controls.rs:183 encodes existing CLI Flags into a page request; src/console/start.rs:391 decodes a request into Flags. They run in opposite directions. The page validates its result through Request::arguments at start_controls.rs:166, and src/args.rs:311 owns canonical CLI flag rendering, used by start.rs:296. These are deliberate interface adapters, with the existing CLI parser retaining authority. This is an implementation judgment; no Spec or Day shift decision is deferred.

Spec

None. All three findings, including the follow-up pull request casing cases, are fixed and covered by retained regressions.

Security

None.

Security review outcome

No unaddressed introduced findings.

CI notes

  • site-test run 42233085731 exceeded its 10-minute job limit during npx playwright install --with-deps chromium: Azure Ubuntu font downloads stalled/retried, and npm test never started; the workflow, setup commands and site dependency manifest/lockfile are unchanged versus main, and the same run’s Console dependency installation succeeded in 24 seconds. Locally at unchanged head e88d1d87, npm ci --prefix site and Playwright installation passed, then npm test --prefix site passed 67/67, with 0 skipped, in 87.67s; the Rust and Console jobs already passed for this exact head.

Merge Danger

Door: two-way

Reverting removes the routes and controls. Remove launch_directories from User config before rolling back to an older binary. Existing installed Console services need the generated KillMode=process setting applied to preserve detached Commands across service restarts. Update replaces the binary through the existing receipt-checked installer.

Blast Radius: machine

run can spend Harness subscriptions and write repository/GitHub state as the serving account. admin changes machine defaults and installs updates. The shell retains control of tokens, sign-in access and address scopes.

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

Tickets

Expose User config through the CLI, Console API and page
Preserve both the Ticket/Spec start API and the User config API, regenerate the manual, and support editing root-level launch_directories settings with a regression test.
Add Console Update and admin data imports
Keep Ticket and Spec run starts and the Launch directory inventory alongside
admin Update, Theme import and Eval replay import routes. Combine the API
scope documentation and regenerate the manual from docs/guide.md.

Validation:
- cargo clippy --all-targets -- -D warnings and cargo fmt --check passed.
- scripts/affected-tests origin/issue-1768 passed 63 site tests, the locked
  build and 139 Console browser tests. Its first Rust attempt stopped at a
  systemd scope-name collision; the affected Activity log case passed alone.
- /usr/bin/time -p cargo nextest run --no-fail-fast --test-threads 3 --retries 1
  passed all 3823 Rust tests, with 4 passing on retry and 83 skipped.
  Wall time: 3021.20 seconds, including a warm-cache 0.38-second compilation.
Start Ticket and Spec runs through the Console API
Start Passes and remaining work through the Console API
Enforce complete CLI and Console API parity
Preserve confirmed Console start-control documentation alongside the upstream Experiment API documentation.
Add confirmed Console start controls
@JacobStephens2
JacobStephens2 marked this pull request as ready for review November 6, 2026 13:14
Preserve both Console homepage additions and integrate upstream Fix runs with the existing Console start API and cron Pass controls. Keep CLI parity and OpenAPI aligned, with HTTP and browser coverage and regenerated documentation.
@JacobStephens2
JacobStephens2 merged commit 27f5479 into main Nov 6, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1768 branch November 6, 2026 15:09
@JacobStephens2 JacobStephens2 mentioned this pull request Nov 6, 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.

Spec: starting work and administering a machine through the Console API

1 participant