Skip to content

fix: complete worker host preflight - #71

Merged
Nickfost merged 5 commits into
mainfrom
fix/issue-21-host-preflight
Aug 28, 2026
Merged

fix: complete worker host preflight#71
Nickfost merged 5 commits into
mainfrom
fix/issue-21-host-preflight

Conversation

@Nickfost

@Nickfost Nickfost commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

  • finish the repository-owned host preflight required by feat: Add idempotent install-host.sh to enroll and manage CI fleet Docker hosts #21
  • fail before configuration or mutation unless the host is supported Debian, required generic tools and CA trust exist, the Docker socket is directly accessible, and Docker storage remains below the existing 80% warning threshold
  • keep rollback and uninstall available when install-time host prerequisites disappear
  • document the exact supported boundary and add focused OS/disk/recovery regressions

Validation

  • scripts/test-install-worker-controller.sh (INSTALLER_TESTS_OK)
  • shellcheck scripts/install-worker-controller.sh scripts/test-install-worker-controller.sh
  • Bash syntax and git diff --check
  • exact-commit committed-secret scan
  • capacity-preflight, desired-state, and quickstart tests

External acceptance

Fresh disposable Debian Docker-host acceptance passed at the exact PR head: full repository validation, first install, idempotent convergence, failure/rollback paths, uninstall, real image build, runner-tool smoke, and residue cleanup all completed successfully. GitHub App/runner-group bootstrap remains separately tracked by #27.

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

Focused exact-head review at 349821e. Verify the #21 host-preflight completion, especially fail-before-mutation behavior, Debian/version parsing, Docker socket/storage checks, and preserving rollback/uninstall when install prerequisites disappear. Apply the objective review-value gate; reject speculative expansion beyond the documented Debian host contract.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 349821e3cc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh Outdated
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

Focused exact-head confirmation at 89d7301. Verify both accepted root-cause fixes: rollback/uninstall remain available without install-only dependencies, and every Docker lifecycle call is confined to the verified local Unix socket. Apply the objective review-value gate and collapse duplicates/speculative variants.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 89d7301100

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Nickfost

Copy link
Copy Markdown
Member Author

Completion-run acceptance passed on a fresh disposable Debian Docker VM at exact head 89d73011005d674db89cd4944e6dd4d55e6dbe7e.

  • scripts/validate.sh: exit 0
  • installer acceptance: INSTALLER_TESTS_OK
  • fresh install, idempotent rerun, drift/failure rollback, explicit rollback, adoption, disabled/drained convergence, and uninstall paths all passed
  • real Docker image build and runner tool smoke passed
  • final cleanup verified zero containers, images, volumes, custom networks, ci-fleet paths, units, checkout, and bundle

The first validation attempt correctly stopped because the prepared host lacked required jq; after installing the documented prerequisite (and ShellCheck for repository validation), the unchanged exact head passed.

@Nickfost
Nickfost marked this pull request as ready for review August 17, 2026 02:07
@Nickfost
Nickfost force-pushed the fix/issue-21-host-preflight branch from 89d7301 to 181efe0 Compare August 28, 2026 01:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 181efe0e89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/install-worker-controller.sh Outdated
docker compose version >/dev/null 2>&1 || die 'Docker Compose v2 is unavailable'
[[ "$mode" == rollback || "$mode" == uninstall ]] && return

for command in curl jq df; do command -v "$command" >/dev/null || die "$command is required"; done

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Check OpenSSL before enabling remote reconciliation

On a host where the CA bundle exists but the openssl executable is absent, an install using a remote OWNER/REPO configuration passes this dependency preflight and enables ci-fleet-reconcile.timer, but every reconciliation then fails: scripts/remote-reconcile.sh requires openssl, and github-app-token.sh uses it to sign the GitHub App JWT. Include openssl among the install-time requirements so the installer fails before activating a controller that cannot consume subsequent desired-state updates.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted: the installer enables ci-fleet-reconcile.timer during install, and remote reconciliation signs the GitHub App JWT with openssl (scripts/github-app-token.sh), so a host without openssl would get a broken enabled timer. Fixed in 04c3f38 by requiring openssl in the install/check command-presence preflight (require_commands), with a strict TDD regression in test-install-worker-controller.sh (INSTALLER_TESTS_OK). Pushed at 1d4d3c8 after merging current main. Awaiting exact-head CI.

Nickfost and others added 2 commits August 27, 2026 22:39
The installer enables ci-fleet-reconcile.timer during install, and remote
reconciliation signs the GitHub App JWT with openssl (github-app-token.sh).
Require openssl in the install/check preflight so the enabled timer cannot
fail at runtime on a host without it.

Co-Authored-By: Hermes Agent <hermes@nousresearch.com>
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d4d3c8024

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/install-worker-controller.sh
Comment thread scripts/install-worker-controller.sh Outdated
@Nickfost

Copy link
Copy Markdown
Member Author

@codex review\n\nExact-head review request for 70dbba4. Please verify the maintenance-service local Docker pin, default-context acceptance, and the exact-head CI gate.

@Nickfost

Copy link
Copy Markdown
Member Author

@codex review\n\nExact-head review request for 70dbba4. Please verify the maintenance-service local Docker pin and the default-context acceptance on the current head.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 70dbba48ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Nickfost
Nickfost merged commit 928bf14 into main Aug 28, 2026
1 check passed
@Nickfost
Nickfost deleted the fix/issue-21-host-preflight branch August 28, 2026 15:38
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