PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
1. Planning checkpoint
- 1.1 Run the mandatory plan reviewer against
proposal.md,design.md, all delta specs,AGENTS.md,backend/AGENTS.md,website/AGENTS.mdandadr/AGENTS.md; resolve everyCHANGES REQUIREDfinding before editing implementation files
2. Local cache
- 2.1 Replace the Valkey client in
backend/internal/util/cachewith theStorecontract and boundedMemoryStore; verify expiration, copied payloads, clear, capacity rejection, canceled operations and concurrent create-if-absent and read-and-delete throughgo test -race ./internal/util/cache - 2.2 Add the namespaced
JSONStore[T]wrapper with explicit serialization and provider errors; verify its default and custom TTL, namespace isolation, malformed payload and error cases throughgo test -race ./internal/util/cache - 2.3 Move restore metadata, restore tokens and stream locks to the new cache contract, make lock acquisition atomic and verify fail-open metadata reload plus fail-closed token and lock behavior through
go test -race ./internal/features/backups/backups/download/... ./internal/features/restores/...
3. Local publish-subscribe
- 3.1 Create
backend/internal/util/pubsubwith theBrokercontract andLocalBroker; verify immediate subscription readiness, fan-out, ordering, cancellation, publication errors, idempotent close and panic isolation throughgo test -race ./internal/util/pubsub - 3.2 Split the generic task-cancellation manager into its registration, request and listener responsibilities, inject
pubsub.Broker, delete the Valkey-specific readiness handshake and replace timing sleeps with synchronization; verify two cancellation components sharing one broker throughgo test -race ./internal/features/tasks/cancellation
4. Local rate limiting
- 4.1 Create
backend/internal/util/ratelimiterwith theCountercontract and cache-backedMemoryCounter; verify sliding-window boundaries, independent scopes, rejected-attempt accounting, invalid settings, expiration and one remaining concurrent allowance throughgo test -race ./internal/util/ratelimiter - 4.2 Inject
ratelimiter.Counterinto user and verification-agent request handling, propagate limiter failures as rejected requests without logging user identifiers and verify the behavior throughgo test -race ./internal/features/users/controllers ./internal/features/verification/agents
5. Remove Valkey infrastructure
- 5.1 Delete Valkey fields and examples from
backend/internal/config,.env.exampleand.gitignore; remove logical database selection, test cache namespaces, startup checks, healthcheck probes and external test cleanup while retaining PostgreSQL worker-slot isolation; verify the affected packages throughgo test -race ./internal/config ./internal/features/system/healthcheck ./internal/util/testing/... - 5.2 Remove
github.com/valkey-io/valkey-go, rungo mod tidyand verify active backend code has no Valkey or Redis imports or client types - 5.3 Remove the Valkey package repository and binary from
Dockerfile, remove its startup function fromdocker/start.shand remove the Compose service, CI readiness wait and remaining Valkey comments from.github/workflows/ci-release.yml; verify withdocker run --rm -v "$PWD:/mnt" koalaman/shellcheck:v0.10.0 docker/start.sh e2e/docker-storage/run.shanddocker run --rm -v "$PWD:/repo" -w /repo rhysd/actionlint:1.7.7 -color - 5.4 Update the Docker filesystem suite to expect only Databasus and PostgreSQL processes and no cache readiness stage; build the candidate image and verify
make test-filesystemspasses
6. Single-instance deployment and documentation
- 6.1 Delete the Helm
replicaCountvalue and documentation, remove Valkey references fromdeploy/helm/values.yamlanddeploy/helm/README.mdand render one StatefulSet replica directly; rundocker run --rm -v "$PWD:/repo" -w /repo alpine/helm:3.18.6 lint deploy/helmand verify the output ofdocker run --rm -v "$PWD:/repo" -w /repo alpine/helm:3.18.6 template databasus deploy/helmcontains exactly one application replica and no supported replica-count override - 6.2 In the English Advanced Config page, replace
Databasus, PostgreSQL, and Valkey use the same non-root operating-system account named <code>databasus</code>.withDatabasus and PostgreSQL use the same non-root operating-system account named <code>databasus</code>.Remove Valkey from the corresponding sentence in all five translated copies. Keep English copy free of Oxford commas. Verifynpm run lintandnpm run buildpass inwebsite/ - 6.3 Append dated replacement notes to ADR-0006 and ADR-0013 stating that Valkey-backed state was replaced by process-local cache, publish-subscribe and rate-limiting providers; preserve their decision bodies and verify no new ADR file is added
- 6.4 Apply the delta requirements to the current OpenSpec capabilities and verify them with
npx --yes @fission-ai/[email protected] validate --specs --strict
7. Final verification
- 7.1 Run
go test -race ./internal/util/cache ./internal/util/pubsub ./internal/util/ratelimiter ./internal/features/tasks/cancellation ./internal/features/backups/backups/download/... ./internal/features/restores/... ./internal/features/users/controllers ./internal/features/verification/agentsinbackend/; resolve every failure - 7.2 Run
make testandmake lintinbackend/; resolve every test, formatting and lint failure - 7.3 Build the production image and verify it starts healthy without Valkey configuration, packages, processes, ports or readiness logs
- 7.4 Run the mandatory post-implementation reviewer against the complete diff and every governing module document, resolve every
CHANGES REQUIREDfinding and leave the working tree ready to commit