glimmung-native migration: drop GHA self-hosted runner, add SSH-over-Tailscale flow #180

Merged
nelsong6 merged 1 commit from glimmung-native-migration into main 2026-05-28 23:44:00 -07:00
nelsong6 commented 2026-05-28 23:42:43 -07:00 (Migrated from github.com)

Summary

Completes the spirelens migration onto Glimmung-managed k8s_job phases as locked in #179. The verify loop continues to run on the warm Slay the Spire 2 install on the gaming laptop, but the cluster-side orchestrator pod now reaches it over a per-run ephemeral Tailscale tailnet using a short-TTL OpenSSH user certificate minted by Glimmung's remote-host execution primitives (nelsong6/glimmung#632 — merged + deployed).

Deletions (per glimmung migration policy — no compat, no soak)

  • .github/workflows/issue-agent.yaml
  • .github/workflows/sts2-host-smoke.yml (host probe folded into env-prep.sh's probe-ssh + probe-mod-set steps)
  • .github/workflows/opentofu-issue-agent-screenshot-storage.yml + the entire infra/opentofu/issue-agent-screenshot-storage/ module. Per-project screenshot blob is obsolete; verify.sh uploads into the shared romaineglimmungartifacts account (ambience's pattern).
  • .github/scripts/publish-issue-agent-screenshots.ps1 (upload moves cluster-side).

Additions

  • scripts/glimmung-native/{lib,env-prep,test-plan,implement,verify,env-destroy}.sh — the cluster-side phase scripts. Each branches on $GLIMMUNG_STEP_SLUG; lib.sh contains the shared dispatcher, lease-callback wrappers (ssh-cert, tailscale-authkey), tailscaled bring-up, SSH/scp wrappers, and per-run keypair generation.
  • docs/glimmung-workflow.md — the registration spec the operator POSTs to glimmung.romaine.life/v1/workflows. Mirrors ambience's phase shape exactly (env-prep → llm-work → llm-verify → evidence-gate → cleanup_early → touchpoint → touchpoint_gate → cleanup_final).

In-place env-var rename (no compat shim)

.github/scripts/{prepare-issue-agent-job,run-issue-agent-phases,restart-sts2}.ps1 switch from GHA env vars to glimmung env vars:

Old New
GITHUB_RUN_ID GLIMMUNG_RUN_ID
GITHUB_RUN_ATTEMPT GLIMMUNG_ATTEMPT_INDEX
GITHUB_REPOSITORY GLIMMUNG_PROJECT_REPO
RUNNER_TEMP GLIMMUNG_WORKING_DIR
GITHUB_WORKSPACE GLIMMUNG_REPO_ROOT

grep -rn confirms no GHA env-var stragglers under .github/scripts/.

AGENTS.md

  • Drops the stale D:\repos\STS2MCP reference (confirmed gone in #179 Section 4).
  • Adds an "Issue-agent execution model" section describing the new orchestrator + SSH-over-Tailscale + laptop pwsh contract.
  • Mod policy (BaseLib + SpireLens + SpireLensMcp) unchanged.

Operator follow-ups (not in this PR)

  1. Destroy the screenshot-storage tofu state at nelsontofu/spirelens/issue-agent-screenshot-storage.tfstate.
  2. Register the workflow in Glimmung's Postgres via POST /v1/workflows using the JSON in docs/glimmung-workflow.md.
  3. Confirm the laptop's tag:spirelens-host tag is applied (#179 laptop step L2/L6). Without it, env-prep's resolve-host-ip aborts with host_unavailable and the run queues until next manual sign-in.
  4. Decommission the two GHA self-hosted runners under C:\actions-runner-card-utility-stats* on the laptop (#179 step L9).

Test plan

  • bash -n scripts/glimmung-native/*.sh clean.
  • grep -rn GITHUB_RUN_ID|GITHUB_RUN_ATTEMPT|GITHUB_REPOSITORY|RUNNER_TEMP|GITHUB_WORKSPACE against .github/scripts/ returns nothing.
  • After workflow registration + first dispatch: env-prep phase emits ssh_endpoint, tailnet_ip, working_dir, bridge_ready. Verify against the corresponding Run row in Glimmung.
  • After first verify-loop run: verification.json lands in the Run's evidence + screenshots appear under romaineglimmungartifacts/artifacts/spirelens/<run_ref>/sts2-screenshots/.

🤖 Generated with Claude Code

## Summary Completes the spirelens migration onto Glimmung-managed `k8s_job` phases as locked in [#179](https://github.com/nelsong6/spirelens/issues/179). The verify loop continues to run on the warm Slay the Spire 2 install on the gaming laptop, but the cluster-side orchestrator pod now reaches it over a per-run ephemeral Tailscale tailnet using a short-TTL OpenSSH user certificate minted by Glimmung's remote-host execution primitives ([nelsong6/glimmung#632](https://github.com/nelsong6/glimmung/pull/632) — merged + deployed). ## Deletions (per glimmung migration policy — no compat, no soak) - `.github/workflows/issue-agent.yaml` - `.github/workflows/sts2-host-smoke.yml` (host probe folded into `env-prep.sh`'s `probe-ssh` + `probe-mod-set` steps) - `.github/workflows/opentofu-issue-agent-screenshot-storage.yml` + the entire `infra/opentofu/issue-agent-screenshot-storage/` module. Per-project screenshot blob is obsolete; verify.sh uploads into the shared `romaineglimmungartifacts` account (ambience's pattern). - `.github/scripts/publish-issue-agent-screenshots.ps1` (upload moves cluster-side). ## Additions - `scripts/glimmung-native/{lib,env-prep,test-plan,implement,verify,env-destroy}.sh` — the cluster-side phase scripts. Each branches on `$GLIMMUNG_STEP_SLUG`; `lib.sh` contains the shared dispatcher, lease-callback wrappers (`ssh-cert`, `tailscale-authkey`), tailscaled bring-up, SSH/scp wrappers, and per-run keypair generation. - `docs/glimmung-workflow.md` — the registration spec the operator POSTs to `glimmung.romaine.life/v1/workflows`. Mirrors ambience's phase shape exactly (`env-prep → llm-work → llm-verify → evidence-gate → cleanup_early → touchpoint → touchpoint_gate → cleanup_final`). ## In-place env-var rename (no compat shim) `.github/scripts/{prepare-issue-agent-job,run-issue-agent-phases,restart-sts2}.ps1` switch from GHA env vars to glimmung env vars: | Old | New | |---|---| | `GITHUB_RUN_ID` | `GLIMMUNG_RUN_ID` | | `GITHUB_RUN_ATTEMPT` | `GLIMMUNG_ATTEMPT_INDEX` | | `GITHUB_REPOSITORY` | `GLIMMUNG_PROJECT_REPO` | | `RUNNER_TEMP` | `GLIMMUNG_WORKING_DIR` | | `GITHUB_WORKSPACE` | `GLIMMUNG_REPO_ROOT` | `grep -rn` confirms no GHA env-var stragglers under `.github/scripts/`. ## AGENTS.md - Drops the stale `D:\repos\STS2MCP` reference (confirmed gone in #179 Section 4). - Adds an "Issue-agent execution model" section describing the new orchestrator + SSH-over-Tailscale + laptop pwsh contract. - Mod policy (BaseLib + SpireLens + SpireLensMcp) unchanged. ## Operator follow-ups (not in this PR) 1. Destroy the screenshot-storage tofu state at `nelsontofu/spirelens/issue-agent-screenshot-storage.tfstate`. 2. Register the workflow in Glimmung's Postgres via `POST /v1/workflows` using the JSON in `docs/glimmung-workflow.md`. 3. Confirm the laptop's `tag:spirelens-host` tag is applied (#179 laptop step L2/L6). Without it, env-prep's `resolve-host-ip` aborts with `host_unavailable` and the run queues until next manual sign-in. 4. Decommission the two GHA self-hosted runners under `C:\actions-runner-card-utility-stats*` on the laptop (#179 step L9). ## Test plan - [x] `bash -n scripts/glimmung-native/*.sh` clean. - [x] `grep -rn GITHUB_RUN_ID|GITHUB_RUN_ATTEMPT|GITHUB_REPOSITORY|RUNNER_TEMP|GITHUB_WORKSPACE` against `.github/scripts/` returns nothing. - [ ] After workflow registration + first dispatch: `env-prep` phase emits `ssh_endpoint`, `tailnet_ip`, `working_dir`, `bridge_ready`. Verify against the corresponding Run row in Glimmung. - [ ] After first verify-loop run: `verification.json` lands in the Run's evidence + screenshots appear under `romaineglimmungartifacts/artifacts/spirelens/<run_ref>/sts2-screenshots/`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/spirelens!180
No description provided.