You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(bugbash 2026-05-21): NATS AccountSeed for post-restart revocation + test alignment (#14)
* fix(queueprovider/nats): A04-F3 — expose AccountSeed for post-restart revocation
Migration 060 added resources.queue_account_seed_encrypted to make NATS account
revocation survive a provisioner pod restart, but IssueTenantCredentials was
discarding the freshly-minted account seed (`_ = accountSeed`). Without the
seed reaching the api caller, the column was never populated and RevokeWith
Seed could never re-sign the account claim after a restart wiped the in-memory
accountCache.
This change:
- Adds TenantCreds.AccountSeed (documented as a secret; NEVER log).
- Populates AccountSeed in nats.IssueTenantCredentials.
- Adds round-trip test proving RevokeWithSeed works without accountCache
(simulates the post-restart path that migration 060 was built for).
Cross-repo: api + worker must (a) bump common, (b) AES-256-GCM-encrypt
AccountSeed via the existing keyring and persist to queue_account_seed_
encrypted, (c) decrypt + pass to RevokeWithSeed on teardown. Tracked
separately. Forward-compatible: AccountSeed is only populated on isolated
provisions, so legacy_open prod is unaffected.
Coverage block (rule 17):
Symptom: queue_account_seed_encrypted always NULL; revocation no-ops post-restart
Enumeration: rg -n 'AccountSeed|queue_account_seed_encrypted' common/
Sites found: 3 (TenantCreds field, IssueTenantCredentials return, RevokeWithSeed param)
Sites touched: all 3 (RevokeWithSeed already accepted seed; populating it now activates the path)
Coverage test: TestNATS_IssueExposesAccountSeed_AndRevokeWithSeed_RoundTrips
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(test): growth tier DeploymentsAppsLimit asserts 50 (wave-3 BugBash value)
Wave-3 BugBash bumped growth tier deployments_apps from 5 → 50 in plans.yaml; test
was not updated. Test fix only — plans.yaml + common/plans/plans.go defaultYAML
are the authoritative source.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
// (1) AccountSeed is populated and looks like a NATS account seed.
259
+
require.NotEmpty(t, creds.AccountSeed,
260
+
"AccountSeed must be exposed on TenantCreds — without it migration 060's queue_account_seed_encrypted column is dead weight and post-restart revocation silently no-ops")
0 commit comments