docs: plan for deploying main over the live release #15
Loading…
Reference in a new issue
No description provided.
Delete branch "heimdall/deploy-main-plan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan only; nothing deployed. Preconditions (root window, verified and restored DB backup, rollback rehearsal), ordered steps, live check (login, vote read, Persona picture), rollback. Notes Bifrost #11 rides the deploy and that Heimdall__AppSecret is new (absent: Discord/Patreon sign-in off).
Unverified in the plan, flagged inside it: the ConceptVotes__* required keys, and the live env contents (read from source, not the host).
🤖 Generated with Claude Code
Read-only check of this plan against the live Yggdrasil host, 2026-11-09 ~10:00Z, main at
244811cb. Nothing was changed. Env: key names only, no values read into this comment.Matches the host
/srv/bifrost/app/current->/srv/bifrost/app/releases/20261010043032-67072b2;REVISIONis67072b28...;bifrost.serviceactive, listening on127.0.0.1:5080.67072b2is an ancestor of main (141 commits).bifrost.service(User=bifrost,/usr/bin/dotnet /srv/bifrost/app/current/Bifrost.Web.dll); runtime is .NET 8.0.30, main targetsnet8.0. Samebifrost-watchdog-notice.timerexists; the plan does not mention it.__EFMigrationsHistoryends at20260705190000_AddPatronSupportProjectAttribution, so exactly the two migrations the plan lists are pending. BothUpbodies areCreateTable/CreateIndexonly (theDrop*calls are inDown), so the rollback-by-symlink claim holds for the schema.bifrost-publish.taris the Oct 10 tarball, which step 4 overwrites; the old release directory is what rollback uses, as planned.bifrostDB 9.4 MB, 918 GB free.pg_dump/pg_restoreare installed. A dump from the Oct 10 deploy exists (bifrost-20261010-043022.dump, root-owned).UserAccounts=3,Memberships=3,MemberProfiles=3,Motions=0,Votes=0.Where the host differs from the plan (blockers first)
ConceptVotes__NetworkTagSecretis absent from the live env, and main refuses to start without it.StartupConfigurationValidatorthrows outside Development/Testing unless it is set and at least 32 characters. The plan marks it "check"; it is a hard requirement. No otherConceptVotes__*key is required: the rest default (IPv4PrefixLength,IPv6PrefixLength,CastPermits,CastWindow,MintPermits,MintWindow,MaxTrackedKeys), andAllowedOriginsis validated only if present. Without the secret, step 5's restart crash-loops (Restart=always, 5 s) and the plan sends you to rollback. Add it to step 3 besideHeimdall__AppSecret, and to Precondition 6.Heimdall__AppSecretis absent too (as the plan says).Heimdall__AppSlug,BaseUrl,DiscordGuildId,DiscordAllowedRoleIds__0,PatreonTierTitleandPatronSupportIntakeSecretare present. MissingAppSecretis not a startup failure, so Discord/Patreon sign-in silently turns off; the live check catches it.journalctl -u bifrost.serviceshows nothing. The unit sends stdout/stderr to/srv/bifrost/log/bifrost.stdout.logand.stderr.log(root-owned, appended by systemd), and the journal has no bifrost entries. Steps 6, the live check's error-rate line and Rollback should tail those files, not journald. The stderr log was last written Oct 18 (an old Npgsql "Failed to connect" crash loop while Postgres was down), so take a line count before the window to have a baseline.Bifrost__Oidc__*is unset (as planned), andDataProtection__KeysPathis set; the key ring/srv/bifrost/data-protection-keysholds one key (Jul 15). Back that directory up too: it is outside/srv/bifrost/env, which Precondition 3 already hints at, but the runbook's env tar does not cover it.bifrostrole has noCREATEDB/superuser, socreatedb/pg_restoremust run aspostgres, as runbook section 8 does (sudo -u postgres ...). The plan'screatedb bifrost_rehearsalas written needs that prefix. The host has the .NET 10 SDK under/opt/commons/opt/dotnetbut/usr/bin/dotnetis runtime 8 only, sodotnet ef database updateis not available on the host: use the "one start of the target withApplyMigrationsOnStartup" route, with a separate env file (scratch connection string, a throwawayDataProtection__KeysPath, port other than 5080), or the rehearsal will touch live keys and bind the live port./home/gamecultadmin/deploy-bifrost-alpha.shis not readable from my account, so I could not compare it togamecult-ops/scripts/deploy-bifrost-alpha.sh. The repo copy does what the plan says (unpack,REVISION, symlink,daemon-reload, restart). It takes the tarball from/srv/bifrost/bifrost-publish.tar, so the upload in step 4 must land there.bifrost.gamecult.orgproxies to 5080 and setsX-Forwarded-Proto; main's forwarded-headers trust is loopback only, which matches. This is what makesSecure/__Host-cookies work behind TLS termination.Bifrost #11 ordering (
__Host-cookies, headc757acf5, mergeable, open).AspNetCore.Cookies->__Host-bifrost_session); in-flight GitHub/Heimdall attempts fail once; anonymous voters get a new device id. With 3 members this is cheap, now more than later.Heimdall__AppSecret: the live check's "an existing session survives the restart" will fail by design once #11 is in. Change that line to "everyone is signed out once; sign-in then sticks after a second restart".__Host-needsSecure+Path=/+ noDomain; fine through nginx TLS as above. Browser-test over https only; a plain-http check will never keep the cookie.Summary
The plan's shape is right and the migrations and rollback claim hold. Three fixes before a root window: add
ConceptVotes__NetworkTagSecret(hard start failure), read/srv/bifrost/log/*.loginstead of journald, and usesudo -u postgresplus a separate env for the rehearsal. The live check's session-survival line is wrong once #11 is in.55b742753e1bca76d555b74275(Libby's 11 points)' (#18) from eureka/deploy-plan-revise into heimdall/deploy-main-plan 0eb68e498e