Skip to content

Retire the unused Hetzner pool - #167

Merged
SSFSKIM merged 1 commit into
mainfrom
retire-hetzner
Oct 26, 2026
Merged

SSFSKIM merged 1 commit into
mainfrom
retire-hetzner

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Proposal — awaiting the owner's decision

Prepare the code retirement for #23. Do not merge this PR or perform the operational checklist until authorized. No cloud resources, repository secrets, release tags or deployed services/jobs have been changed.

The Hetzner config serves no repositories. GCE/EC2 already serve MAWS, manim-master and ci-kit-sandbox, while the old weekly bake still snapshots credentials and the ten-minute guard still runs.

Removed and retained

  • Remove the Hetzner API client, weekly snapshot workflow/builder, ensure provisioning implementation, pool agent/reconciler/watchdog/systemd units, guard, config, server-session ledger, test-box tool, boot spike and provider-only tests.
  • Remove the obsolete pool.json membership/overlap dependency from the launcher and webhook, and the Hetzner-only branches in shared preparation/container code.
  • Retain the shared runner image/hook, container cache/environment and queue filter, VM runtime, bake manifest/job-image/setup code, alerts, GCE/EC2 configs and provider implementations. Both live providers import these modules; deleting pool/ wholesale would break them.
  • Preserve the independent fifteen-minute EC2 guard and its App credentials. Update the living runbooks; historical specs are unchanged except for a dated proposal in the owning design's Decision Log.

Caller compatibility

pool-ensure is a network- and credential-free no-op, still accepting the deprecated hcloud-token input without reading or forwarding it. Its output is result=none. The launcher already observes GitHub's queue, so keeping provider discovery in this action would add a needless failure point.

Audited the fetched default branches of MAWS (origin/master), manim-master, ci-kit-sandbox, cua, doperpowers and ci-kit:

  • MAWS gate.yml and sandbox maws-probe.yml directly call pool-ensure@v1 and pass hcloud-token.
  • manim, sandbox, cua and doperpowers call gates.yml@v1 with secrets: inherit; the reusable workflow invokes its own checked-out action. ci-kit uses the workflow by local path.
  • No action caller has a step ID or consumes result. The reusable workflow no longer forwards HCLOUD_TOKEN.
  • Published v1 was 2b2c6bf2de120c40ca61f7691aaf9c9abdb0545c during the audit. It already bundles an empty Hetzner repo list, returns gce before requiring a token for current pool repos, and treats a missing main pool.json as empty. Merging this deletion does not break the old tag. Moving v1 later publishes the no-op to callers; no tag was moved here.

Validation

Local focused checks pass: 13/13 action/config tests and 42/42 shared ledger/container tests; shell syntax and git diff whitespace checks pass. The full suite belongs on GitHub Actions, not the MacBook; the initially requested local full run was discontinued without a complete verdict and is not claimed as passing. Committed-HEAD ci-gate is GREEN for dd63b7fe44495cf1beaf29e746d24e5895734796: run 40345381032, PASS test 2m37s (full npm test on GitHub Actions).

New regression tests failed before implementation on actual network requests and the retired config read, then passed after removal. They exercise the action with/without a legacy token while forbidding network access, and prove a fresh launcher reads only the GCE/EC2 configuration. Shared cloud runtime tests remain in the suite.

Post-merge checklist — not executed

  • From a clean checkout of merged main, redeploy ci-kit-bake and ci-kit-bake-check (both GCE and EC2 stages), ci-kit-launcher, and ci-kit-webhook in ssfskim-ci-kit/us-central1: gce/deploy.sh bake bake-check launcher webhook. Each has a separately deployed source bundle touched by this removal. Do not use the script's no-argument form, which also reconciles infrastructure/schedules/alerts. Redeploying jobs does not execute an image bake. Existing GCE/EC2 runner images are self-contained; rebuilding them is not needed for caller continuity.
  • Verify the removed weekly workflow and ten-minute guard no longer run; retain the EC2 guard's fifteen-minute schedule.
  • Move v1 to the approved release commit to distribute the no-op/updated reusable workflow. This is publication, not a prerequisite for current callers to survive pool.json deletion. Caller cleanup can then remove their now-useless ensure steps/inputs.
  • Remove the unused HCLOUD_TOKEN repository secret from MAWS, ci-kit and ci-kit-sandbox, once the retired workflows are gone. No corresponding secret exists in manim-master, cua or doperpowers. No other repository secret becomes unused: keep both repositories' CI_KIT_APP_ID/CI_KIT_APP_KEY, and MAWS's unrelated SSH MAWS_APP_DEPLOY_KEY.
  • Delete only the two identified ci-kit Hetzner snapshots 445212613 and 448062482, after verifying their ci-kit=pool-image labels. Inventory any remaining ci-kit-owned pool/builder servers or firewall before deciding on their cleanup. The unrelated “session-mirror db” snapshot is not ours and must remain untouched. No Hetzner resource inventory or deletion was performed in this PR.
  • Any token/key rotation is a separate owner decision. Global Hetzner tooling remains in manim and doperpowers, so CI retirement alone does not establish that the owner's global token can be revoked.

Where the GitHub App private keys remain

There are two documented keys for ci-kit-runners (App ID 5337915), not one Hetzner-only credential. Fingerprints below come from existing design records; secret values were not retrieved or freshly compared.

Store Consumers after this PR
ci-kit repository secret CI_KIT_APP_KEY (with CI_KIT_APP_ID) pool-guard.yml → ec2/guard.mjs: mint a sandbox issues-read token for the independent EC2 guard's ledger reads. AWS access uses GitHub OIDC separately.
ci-kit-sandbox repository secret CI_KIT_APP_KEY (with CI_KIT_APP_ID) maws-probe.yml and maws-gce-probe.yml mint MAWS checkout tokens; daily test-history.yml → history/collect.mjs reads MAWS Actions/Contents.
GCP Secret Manager, project ssfskim-ci-kit, ci-kit-app-key and ci-kit-app-id, enabled version 1 Shared GCE/EC2 launcher; both ci-kit-bake and ci-kit-bake-check; operator tools gce/tools/boot-sample.mjs and gce/tools/app-hook.mjs. Explicit secret-level access is granted to [email protected], also the bake/check identity; inherited owner/admin access may exist.
Existing Hetzner snapshot disks Historical builder embedded /etc/ci-kit/app.pem, /etc/ci-kit/app_id, /etc/ci-kit/hcloud_token. Those copies survive a source-code deletion until the snapshots are deleted; no live pool repo uses them.
AWS / GCE runner images No App-private-key store is part of the current design: builders receive short-lived installation tokens (GCE metadata; EC2 user-data), not the private key. No image disk was mounted or forensically inspected.

The recorded GitHub-secret/retired-image key is SHA256:yj//oTVKm3OJamD12RO3JYnGFdQxzGoFYRmFkD90cYU=; the recorded Secret Manager key is SHA256:qQgu9FOJPM9maxPvDhd8nV+AyYS+tXW6+mp2RGiXvAg=. Revoking the first without replacing ci-kit and sandbox's secrets breaks their surviving consumers. Rotation is not mandated by this PR.

If the owner chooses to rotate the GCP key, adding a Secret Manager version alone is insufficient: the launcher caches its PEM for process lifetime. Restart/redeploy it and verify a successful tick from the new process before revoking the old key. Fresh bake/check executions read latest; allow old-key executions to finish first. No image rebuild is needed solely for App-key rotation.

Read-only cloud metadata found no Secrets Manager secrets or SSM parameters in configured AWS account 290475840169, region us-east-2; its only S3 bucket is ci-kit-ec2-reports-290475840169, with reports/ objects. Other enabled regions deny secret metadata through an organization SCP, so account-wide absence is not certified. No local PEM files, other cloud accounts/projects, secret values, App key-pair browser page or image contents were inspected. The GCP webhook secret is separate and is not an App private key.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)

Remove provider-only provisioning, bake, guard, agent, config and tests while retaining GCE/EC2 shared runtime and credentials. Keep pool-ensure as a no-op for existing callers.

Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)
@SSFSKIM
SSFSKIM marked this pull request as ready for review October 26, 2026 16:35
@SSFSKIM
SSFSKIM merged commit e9ebb63 into main Oct 26, 2026
3 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T16:37:40.471667Z dd63b7f Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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