Skip to content

Start Ticket and Spec runs through the Console API - #1809

Merged
JacobStephens2 merged 6 commits into
issue-1768from
issue-1771
Nov 6, 2026
Merged

JacobStephens2 merged 6 commits into
issue-1768from
issue-1771

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

GET /api/v1/launch-directories ↔ thirdshift launch-directories --json
POST /api/v1/runs [run]
  owner/repo → known Launch directory (cron + launch_directories)
  JSON asks → canonical CLI arguments → same binary, detached
  Command record → {"version":1,"name":"acme/widgets#7"}
  requester → Command record + Activity log; attempt → Console log

Ticket and Spec runs keep CLI behavior, including starting at the Command limit. Detached sessions, login environments and the generated systemd service preserve work across Console restarts. Documents the API and config in the manual and hand-written site pages.

Closes #1771

Evidence

Execution evidence

  • Before: cargo test --test console start::run_token_starts_an_attributed_ticket_that_survives_console_restart failed with 404, {"error":"Unknown Console API endpoint."}.
    After: The same command passed: 1 passed; 0 failed. The retained test checks the Command record, requester, login environment, separate OS session, restart survival and audit event.

  • Before: cargo test --test console start::api_start_does_not_return_an_old_record_after_pid_reuse failed: returned acme/widgets#7, expected acme/widgets#8.
    After: The same command passed: 1 passed; 0 failed.

  • Both reviewers' behavioral reproductions were run exactly as supplied before deciding them, then rerun after fixes:

    Command Before After
    python3 /tmp/issue-1771-email-repro.py target/debug/thirdshift Exit 1: email.address became --merge in spawned argv Exit 0: address refused; spawned_argv: null
    python3 /tmp/issue-1771-cron-repro.py adjacent-operator Exit 1: empty directory inventory for adjacent && Exit 0: expected repository listed
    python3 /tmp/issue-1771-cron-repro.py adjacent-redirect Exit 1: output reached fallback log Exit 0: output reached cron's log

    Retained regressions: structured_email_addresses_cannot_become_cli_flags, launch_directories_understand_adjacent_shell_operators, and api_start_appends_to_the_repository_cron_log in tests/console/start.rs.

  • scripts/affected-tests issue-1768 selected the site, Console and full Rust checks. The site passed 62 tests, and the Console passed 137 tests. An initial five-second sign-in navigation timeout passed both in isolation and in the complete browser rerun with four-CPU affinity.

  • NEXTEST_RETRIES=1 cargo nextest run --no-fail-fast --test-threads 8 completed all 3,813 Rust cases: 3,796 passed (four after retry), 17 failed, 83 skipped. The failures exposed the help line budget, a missing Linux module gate, and Config/Setup assertions that assumed no new root setting. Those fixes retain the preservation contracts and existing tests. All 17 failed cases subsequently passed within these 178 focused checks:

    • cargo test --bin thirdshift config::tests: 42 passed.
    • cargo test --bin thirdshift setup::: 62 passed.
    • cargo test --test setup --test packaging --test command_surface: 64 passed, two fixture entry points ignored.
    • cargo test --test console start::: 10 passed.
  • The host also produced transient systemd scope-name collisions; affected cases passed on retry. cargo clippy --all-targets -- -D warnings, cargo fmt --check, npm run docs:check --prefix site, and all three exact reviewer reproductions passed after the final repairs.

Test seams

The binary CLI and authenticated Console HTTP interface, with fixture Git repositories, crontab, login shell, GitHub and Harness executables. Observe directory inventories, Command records through show/status, Activity log attribution, Console log auditing, scope refusals and detached Command lifetime across Console restart.

Visual evidence

Matching public documentation flows at 1440×900 desktop and 390×844 mobile; captures contain public site content. Before uses the unpatched issue-1768 baseline. Media is hosted in a secret Gist, outside repository branches.

Manual: Console API — 1440×900

Before
After

Manual: Console API — 390×844

Before
After

Homepage: Console — 1440×900

Before
After

How it works: outcomes — 1440×900

Before
After

Architecture: Console and host resources — 1440×900

Before
After

Homepage: Console — 390×844

Before
After

How it works: outcomes — 390×844

Before
After

Architecture: Console and host resources — 390×844

Before
After

Review coverage

Independent Standards and Spec reviews used issue-1768 as the fixed point (4fae9ac0 initial head, 29f45a1c coverage follow-up). Both reviewed the original 23 paths and the added Setup-test path; src/setup.rs was also read as supporting code. The final diff has 26 changed paths. Later Config/Setup assertion repairs were validated locally. The findings and final combined files-read lists are retained in .thirdshift-review-YnuaCF/standards.md and spec.md, with summary.json recording {"standards":2,"spec":2}. All four findings were addressed, including the Standards recommendation to reuse the CLI's shared-options serializer.

Unread changed file on both axes: src/setup/console_tests.rs, whose late assertion-only update came after the skill's one permitted coverage follow-up. Its tests pass in the 62-test Setup unit run. Generated-output exclusions: none.

Unaddressed findings

Standards

None. S1's email argument ambiguity and S2's duplicate serializer were addressed.

Spec

None. Both cron parsing findings were reproduced, fixed and retained as tests.

Security

None.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Older binaries reject launch_directories; remove that config key when rolling back. Existing installed Console services need their generated KillMode=process setting applied for service restarts to preserve Commands.

Blast Radius: Console

A holder with run can spend Harness subscriptions and start repository work as the serving OS account, within known Launch directories.

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

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.
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.
@JacobStephens2
JacobStephens2 merged commit cc4f0cd into issue-1768 Nov 6, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1771 branch November 6, 2026 07:17
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