Skip to content

fix(console): verify service startup during installation - #1333

Merged
JacobStephens2 merged 9 commits into
mainfrom
issue-1327
Oct 25, 2026
Merged

JacobStephens2 merged 9 commits into
mainfrom
issue-1327

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #1327

 restart thirdshift-console.service
+wait for active service AND configured localhost port (15 bounded probes)
+on restart/readiness failure: print last 50 journal lines, exit 1
 configure and restart proxy

Warn when getenforce reports Enforcing, linking to #1078. Document the curl prerequisite, startup checks and failure output in the guide and site.

Evidence

  • Before: cargo test --test console_install inactive_console_fails_installation_with_its_journal_before_proxy_changes failed because installation exited successfully with no journal output. The configured-port regression also failed when the active service had no listener.
    After: cargo test --test console_install passed: 18 tests, one ignored fixture entry point. Coverage includes inactive service, unreachable port, delayed port readiness, configured port selection and absent/Enforcing/Permissive/Disabled SELinux.
  • cargo check, cargo fmt --check and cargo clippy --all-targets -- -D warnings passed.
  • scripts/affected-tests main: all 50 browser tests, 1,490 Rust unit tests and integration groups through site deployment passed, except the_systemd_units_verify. The runner exited nonzero because systemd 252 warns about the host's unrelated snapd.service using unsupported RestartMode.
  • SYSTEMD_UNIT_PATH=/tmp/issue-1327-systemd-units: cargo test --test site_deploy the_systemd_units_verify passed. That temporary directory masks only snapd.service; default unit paths and diagnostics remain enabled.
  • The eight remaining targets passed with cargo test --test spec_push_race --test spec_run --test status --test stop --test toolchain --test trial --test update --test user_config. This completes every selected test group without repeating the successful groups.
  • Test environment: Python 3.12 on PATH and process-only GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=tag.gpgSign GIT_CONFIG_VALUE_0=false. Focused reruns also passed for the three Worktree tag fixtures and Bug-origin regression that initially exposed the host's signing setting and Python 3.9 default. No source changes were needed for these environment issues.
  • Wall times (time -p, cached builds): affected runner 1,111.84s; remaining targets 244.17s. The shell timer was used because /usr/bin/time is unavailable.

Test seams

  • The thirdshift console install CLI and its emitted shell script, executed with fixture system commands, observing exit status, diagnostics and installation actions.

Review coverage

Independent Standards and Spec reviews used main at 09d6d401cdc07e6a37a86aa77a0f22366e00aefb as the fixed point. Standards: one P3 duplication finding, addressed by sharing the bounded fake sleep fixture and confirmed by the reviewer. Spec: zero findings.

Both reviewers inspected changed hunks in all five files: src/console/install.rs, tests/console_install.rs, docs/guide.md, site/docs/index.html, and site/how-it-works/index.html. Changed files left unread: none. Generated-output exclusions: none.

Unaddressed findings

Standards

None.

Spec

None.

CI notes

  • console-test intermittently lost selection at console/tests/inbox.test.cjs:813 when a selected row moved into folded Done; that test, Console/Inbox implementation and CI job are unchanged against main (f39fdd07), while this branch changes only installation and its docs/tests. Local npm test --prefix console passed all 84 tests, and the exact failing test passed once on this branch and 50 consecutive times on an unchanged main build. Earlier main CI separately lost selection in the neighboring live-push test. No unrelated code or tests were changed.

  • CI test job failed intermittently at tests/progress_lines.rs:383: recovery expected 42 input / 7 output tokens but received the fake OpenCode completion export's 2800 / 800. This branch changes only Console installation and its docs/tests; the failing test, fake, shared support, and Session/process/Harness code are unchanged against main (e5b48aac). The focused test passed on this branch; the full progress_lines target and 20 focused repetitions passed on unchanged main; the full branch target also passed in fresh local validation. No unrelated code was changed.

  • Fresh scripts/affected-tests origin/main (20m05s, including compilation) passed all 50 site browser tests, 1,490 Rust unit tests, all 18 installer tests, progress_lines, and every integration group through site deployment except the_systemd_units_verify: host systemd 252 rejects RestartMode in /usr/lib/systemd/system/snapd.service:23. That test and the checked-in deployment units are unchanged against main (f39fdd07). All eight remaining targets passed with cargo test --test spec_push_race --test spec_run --test status --test stop --test toolchain --test trial --test update --test user_config --no-fail-fast (4m17s, cached build). The systemd check was left intact; no diagnostics were suppressed.

Merge Danger

Door: two-way

Revert to restore the previous emitted script; no data migration or SELinux policy changes.

Blast Radius: Console

Linux installation scripts now require curl and stop before proxy setup when the Console cannot start or answer locally.

Built with codex · gpt-6.1-sol · high

@JacobStephens2
JacobStephens2 merged commit 2944d04 into main Oct 25, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1327 branch October 25, 2026 18:17
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 25, 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.

console install checks that the Console actually started

1 participant