100 lines
5.2 KiB
Markdown
100 lines
5.2 KiB
Markdown
# Session 0011.0 — Transcript
|
||
|
||
> App: engineering
|
||
> Start: 2026-06-10T10-10 (PST)
|
||
> End: 2026-06-10T10-20 (PST)
|
||
> Type: planning-and-executing
|
||
> Claude-Session: 14e70ece-05cd-43df-b5c3-7ffd71534ef5
|
||
> Status: **FINALIZED**
|
||
|
||
## Launch prompt
|
||
|
||
```
|
||
Implement SLICE-1 (off-host GCS bucket + write access) of the Gitea-forge backup feature, per specs/gitea-forge-backups.md §7.2 (engineering#30). Operator chose: do the no-downtime prep now (create the backup GCS bucket + IAM + a dedicated gcloud config for project wiggleverse) and DEFER the disruptive VM stop/scope-change to a coordinated window (session 0009 was live).
|
||
```
|
||
|
||
## Plan
|
||
|
||
> Anchor: design specs/gitea-forge-backups.md (graduated; R2a) — engineering#30.
|
||
|
||
Scope (operator chose "prep now, defer VM stop"): the no-downtime portion of
|
||
**SLICE-1** — create the off-host backup GCS bucket (versioned, lifecycle,
|
||
uniform access, public-access enforced), grant the VM SA `objectCreator`, create
|
||
a dedicated `gitea` gcloud config, document it. Defer the disruptive VM-scope
|
||
change (stop/set-scopes/start) to a coordinated maintenance window because
|
||
session 0009 was live.
|
||
|
||
Worktree: isolated in `worktree-session-0011` (live concurrent session 0009).
|
||
|
||
## Pre-state
|
||
|
||
- `main` clean and in sync. Spec `specs/gitea-forge-backups.md` graduated in
|
||
session 0010.
|
||
- `gitea` VM (project `wiggleverse`, RUNNING) on the default compute SA with scope
|
||
**`devstorage.read_only`** — can read GCS, cannot write.
|
||
- No dedicated gcloud config for the forge project (§8.4 gap).
|
||
- Session 0009 still live on this app throughout.
|
||
|
||
## Session arc (turn by turn)
|
||
|
||
1. Operator asked to "do the VM service-account scope fix now." Surfaced that the
|
||
fix needs a VM stop/start → `git.wiggleverse.org` downtime, which would break
|
||
the **live session 0009**. Asked how to proceed; operator chose **"prep now,
|
||
defer VM stop."**
|
||
2. Opened this planning-and-executing session (claimed 0011), eligibility ELIGIBLE
|
||
(R2a, anchored on the graduated design), isolated in worktree
|
||
`worktree-session-0011`.
|
||
3. Created the dedicated **`gitea` gcloud config** (project `wiggleverse`,
|
||
`--no-activate`). **Slip + immediate fix:** accidentally ran
|
||
`gcloud config configurations activate gitea`, which rewrote the shared
|
||
on-disk active pointer (§8.4 says never to); reverted by re-activating
|
||
`benstull-infra`. Thereafter used per-process `CLOUDSDK_ACTIVE_CONFIG_NAME=gitea`.
|
||
4. Created **`gs://wiggleverse-gitea-backups`** (project `wiggleverse`,
|
||
`us-central1`): uniform bucket-level access, public-access-prevention enforced,
|
||
versioning on, lifecycle (30d delete + 7d noncurrent) from a committed
|
||
`infra/gitea-backup-bucket-lifecycle.json`. Granted the VM SA
|
||
`roles/storage.objectCreator` (create-only). Verified all settings.
|
||
5. Documented the bucket + IAM + the **PENDING** VM-scope change in
|
||
`infra/deploy-gitea-on-gcp.md`. Committed; PR **#33** → merged to `main`.
|
||
|
||
## Cut state (final)
|
||
|
||
- **On `main`** (merge `4d72bb1`, PR #33): `infra/gitea-backup-bucket-lifecycle.json`
|
||
+ the "Backups (off-host forge recovery)" section in `infra/deploy-gitea-on-gcp.md`.
|
||
- **Cloud (project `wiggleverse`):** bucket `gs://wiggleverse-gitea-backups`
|
||
configured as above; VM SA has `objectCreator`; dedicated `gitea` gcloud config
|
||
exists (inactive; on-disk active pointer left as `benstull-infra`).
|
||
- **Not shipped via an app pipeline** — bootstrap-infra provisioning (the bucket is
|
||
the deploy); no localhost→PPE→prod stage applies, no flotilla.
|
||
- Worktree + local/remote review branch removed; `main` clean.
|
||
|
||
## Deferred decisions
|
||
|
||
- **gcloud active-pointer slip (fixed in-session).** Briefly activated the `gitea`
|
||
config, rewriting the shared active pointer (§8.4 violation); caught and reverted
|
||
to `benstull-infra`. No lasting effect. Flagging the foot-gun: `gcloud config set`
|
||
with `CLOUDSDK_ACTIVE_CONFIG_NAME=<cfg>` does NOT require activating.
|
||
- **Retention window = 30 days** (default; +7d noncurrent). Not an operator-set
|
||
number — chosen as a sensible default for a small forge at 3 snapshots/day (~90
|
||
recovery points). Tunable via the committed lifecycle file; revisit if cost or
|
||
recovery-depth needs change.
|
||
- **VM-scope change deferred to a maintenance window** (operator's explicit choice,
|
||
because session 0009 was live). The exact stop→set-service-account→start commands
|
||
are in `infra/deploy-gitea-on-gcp.md`. This is the next `/goal`.
|
||
- **Worktree isolation** for the live-0009 concurrency (skill Step 6b); 0009's scope
|
||
not inspected.
|
||
|
||
## Operator plate (what's left)
|
||
|
||
- **The one operator-coordinated action ahead:** schedule the brief
|
||
`git.wiggleverse.org` maintenance window to raise the VM SA scope to
|
||
`cloud-platform` — until then the scheduled backup (SLICE-2) cannot upload.
|
||
- Nothing parked beyond the next `/goal`; SLICES 2–5 are in the spec §7.2 and
|
||
tracked under issue #30.
|
||
|
||
## Next-session prompt
|
||
|
||
```
|
||
/goal Do the gitea VM service-account scope maintenance window (stop → set-service-account --scopes=cloud-platform → start, per infra/deploy-gitea-on-gcp.md Backups box), then finish SLICE-1 (verify the VM can write to gs://wiggleverse-gitea-backups) and build SLICE-2 scheduled dump+upload, per specs/gitea-forge-backups.md §7.2 (engineering#30)
|
||
```
|