Skip to content

Publish the Console API's generated OpenAPI description - #1779

Merged
JacobStephens2 merged 3 commits into
issue-1753from
issue-1759
Nov 5, 2026
Merged

JacobStephens2 merged 3 commits into
issue-1753from
issue-1759

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Publish the served Console API's OpenAPI description through HTTP and the CLI.

Console route table
  ├─ /api/v1 handlers
  └─ operations: scope, CLI twins, arguments, JSON shape
       ├─ GET /api/v1/openapi.json
       └─ thirdshift console openapi

Closes #1759.

Test seams

  • Console HTTP and CLI binary: identical descriptions, operation metadata and response schemas, without local credentials.
  • Console route table: advertised paths and methods match the registered Router; should-panic twins reject missing operations, extra operations, routes outside the table, a wrong prefix and a wrong method.

Evidence

Execution evidence

  • Before: cargo test --test console api::openapi_equals_cli_and_describes_operations_without_local_secrets -- --exact failed: left: 404, right: 200; 0 passed, 1 failed.
    After: the same command passed: 1 passed, 0 failed. The final cargo test --test console api:: passed all 5 API regressions.

  • Before: cargo test --bin thirdshift console::tests::parity_rejects_api_routes_mounted_under_wrong_prefix -- --exact failed: test did not panic as expected; 0 passed, 1 failed.
    After: the same command passed: 1 passed, 0 failed. The final cargo test --bin thirdshift console::tests passed all 9 checks, including wrong-prefix and wrong-method regressions.

  • target/debug/thirdshift console openapi > /tmp/thirdshift-1759-openapi-final.json && /tmp/thirdshift-1759-openapi-validator/bin/python -m openapi_spec_validator /tmp/thirdshift-1759-openapi-final.json: /tmp/thirdshift-1759-openapi-final.json: OK.

  • cargo fmt --check and cargo clippy --all-targets -- -D warnings: passed.

  • scripts/affected-tests origin/issue-1753: site tests passed (252.82s) and cargo build --locked passed (181.89s). The Console browser step had 125 passes and one phone sign-in navigation timeout at its five-second load wait, after reaching the expected URL.

  • Exact retry: node --test --test-name-pattern='sign-in and sign-out work on a phone without JavaScript using secure cookies' console/tests/accounts.test.cjs: 1 passed, 0 failed.

  • Full browser retry: /usr/bin/time -p node --test --test-concurrency=3 console/tests/*.test.cjs: all 126 passed, 0 failed (204.03s). No code changed for this timeout.

  • Initial full Rust run: /usr/bin/time -p cargo nextest run --test-threads 3 stopped after 83 tests (82 passed) when the host rejected an already-loaded transient systemd scope for an Architect fixture. It took 366.97s including 3m18s compilation.

  • Exact retry: cargo test --test architect_run an_interrupted_review_sends_one_notification_that_it_was_interrupted -- --exact: 1 passed, 0 failed (1.92s); no code changed for the scope collision.

  • The no-fail-fast local run on the pre-help-fix build was stopped after 1,246/3,754 cases: 1,241 passed, the compact-help limit failed, one Continuation fixture hit the same host transient-scope collision, and three running cases were interrupted during cancellation. 2,508 cases remained unrun. The final head is running the full suite in CI.

  • Help regression: the broad run failed help_is_a_compact_reference_with_a_link_to_the_details: help should fit in a short reference, got 69 lines. Commit 985d9a9f combines existing Theme import/export help entries while retaining OpenAPI. On the final head, cargo test --test command_surface passed 20 tests (1 fixture entry point ignored), including the unchanged 68-line check; cargo test --test console api:: passed all 5 tests again.

  • CI on final head 985d9a9f: formatting, all-target Clippy, Python checks, site and Console browser tests passed. Linux artifact builds and release smoke tests also passed. Full Rust CI remains in progress.

Visual evidence

Matched Before/After states; Before is the Base branch at d4b52b93.

User manual, Console API section — 1440×900

Before

After

Homepage, Console section — 1440×900

Before

After

How it works, Console API paragraph — 1440×900

Before

After

Architecture, Console API paragraph — 1440×900

Before

After

User manual, Console API section — 390×844

Before

After

Homepage, Console section — 390×844

Before

After

How it works, Console API paragraph — 390×844

Before

After

Architecture, Console API paragraph — 390×844

Before

After

Review coverage

Reviewed against the fetched issue-1753, pinned at d4b52b93187cc4c15e6eb0e74527832df26ef999.

  • Standards: 1 finding raised (duplicate view dispatch), addressed with one operation description.
  • Spec: 1 finding raised (route identity parity), reproduced with its exact command, fixed, and retained as a regression.

Both reviewers inspected all 12 changed files, including the generated manual's changed hunks, before the final compact-help fix. Changed file with a remaining partial review gap: src/main.rs — only the final Theme import/export help consolidation in 985d9a9f was not independently reread. Its original CLI feature hunks were reviewed. This gap is also recorded in both review reports. No generated-output exclusions.

Unaddressed findings

Standards

None. The raised finding is addressed.

Spec

None. The raised finding is addressed.

Security

None.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Blast Radius: Console

Discovery uses the shared Console route table and authentication. Schemas describe CLI envelopes; nested Command and Experiment records are extensible objects.

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

@JacobStephens2
JacobStephens2 marked this pull request as ready for review November 5, 2026 16:17
@JacobStephens2
JacobStephens2 merged commit 1b50b81 into issue-1753 Nov 5, 2026
15 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1759 branch November 5, 2026 16:28
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