PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
REFACTOR (tooling): Keep agents off the full backend suite and give them just test-package, so every task closes on local tests that also start on Fedora
Rostislav Dugine688e7822d19
diff --git a/.agent-hooks/implementation-prompt.md b/.agent-hooks/implementation-prompt.mdindex b5bd2638..eea6c2e1 100644--- a/.agent-hooks/implementation-prompt.md+++ b/.agent-hooks/implementation-prompt.md@@ -24,7 +24,7 @@ Review only the requirements of your delta spec.### Role: documentation and tasks-- For every task in `tasks.md` check that everything it says was done, including its verification. A claim that cannot be true for this code is a problem.+- For every task in `tasks.md` check that everything it says was done, including its verification. A claim that cannot be true for this code is a problem. Do not ask for the full backend suite (`just test`) to be run; local tests of the touched packages and of the packages that test the same feature are enough.- Check documentation consistency per the section "Documentation consistency" in `AGENTS.md`: `AGENTS.md`, the module docs, `adr/`, `docs/`, the repository's own skills, the READMEs and code comments agree with each other and with the code. Search the repository for mentions of what the change changed.- Check the edits to agent instructions the change made, per the same section. Report an inventory of what exists, the state of the code, a description of how something works or a retelling of another document in `AGENTS.md` or an own skill as a `docs` finding, and name the place to move it to from that section's table. A rule of agent behavior that is written nowhere else is not a finding.diff --git a/.agent-hooks/proposal-prompt.md b/.agent-hooks/proposal-prompt.mdindex e3134c3a..5fed01bb 100644--- a/.agent-hooks/proposal-prompt.md+++ b/.agent-hooks/proposal-prompt.md@@ -35,6 +35,7 @@ Review only the requirements of your delta spec.- Check that every scenario of the delta specs is covered by a task with a test.- Check that every task has a verification: a test, a command or a repository search.+- Check that every task closes without the user and without the full backend suite. Local tests of the touched packages and of the packages that test the same feature are enough. A task that runs `just test` or `just test-filesystem`, or waits on the user, CI or a push, is a `tasks` finding. Never ask for the full suite to be added.- Check that the task order can be followed: no task relies on something that appears only in a later one.### Role: repeat reviewdiff --git a/AGENTS.md b/AGENTS.mdindex cea6d17d..77acec29 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -34,6 +34,7 @@ Work happens on a Fedora host; any other host distro is on its own. Tool version|---|---|| `just run` | Start the app locally: dev database, test fixtures, WAL backup source with its load generator, backend and frontend || `just test` | Run the full backend suite |+| `just test-package <packages>`, run in `backend/` | Run the given backend test packages || `just test-filesystem` | Run the Docker filesystem suite, mostly left to CI || `just pull-testcontainers` | Pull the database images the backend tests use || `just lint` | Check every module without changing files |@@ -47,7 +48,7 @@ Work happens on a Fedora host; any other host distro is on its own. Tool versionSeveral agents may work on this repo at once, in different worktrees, sharing one Docker daemon, one set of test containers and one pool of test metadata databases. Don't let that stop you from running tests — simultaneous runs are rare and usually harmless. Two habits keep them that way:- Lint and format whenever you want: the linters, the formatters and the frontend's `pnpm test` touch nothing shared.-- Test the package you touched with `go test ./internal/features/<feature>/... -count=1`; the database slot it claims is described in [`backend/internal/config/config.go`](backend/internal/config/config.go). Leave `just test` for the end of a change, because it resets the test containers and slot databases every other agent uses. A fresh environment needs one full run first.+- Test the packages you touched, and the packages that test the same feature, with `just test-package ./internal/features/<feature>/...` in `backend/`; the database slot it claims is described in [`backend/internal/config/config.go`](backend/internal/config/config.go). An agent never runs `just test`, not even at the end of a change, and never makes finishing a task depend on it: it resets the test containers and slot databases every other agent uses. The full suite is for the developer and CI. A fresh environment needs one full run first, which the developer starts.When a failure makes no sense — a container that vanished, a database that emptied itself — a parallel run is worth suspecting in maybe one case in twenty. Re-run before hunting the bug.diff --git a/backend/AGENTS.md b/backend/AGENTS.mdindex ad763836..c74f93d6 100644--- a/backend/AGENTS.md+++ b/backend/AGENTS.md@@ -303,7 +303,7 @@ Generate the migration stub with the goose create command from the [command tabl**Always run tests after writing them and verify they pass.**-Run the package you touched (`go test ./internal/features/<feature>/... -count=1`) and keep `just test` for the end of a change — see [Several agents, one set of containers](../AGENTS.md#several-agents-one-set-of-containers).+Run the packages you touched and the ones that test the same feature (`just test-package ./internal/features/<feature>/...`). Never run `just test` — see [Several agents, one set of containers](../AGENTS.md#several-agents-one-set-of-containers).### Namingdiff --git a/backend/Justfile b/backend/Justfileindex e358aa4c..7fbc617f 100644--- a/backend/Justfile+++ b/backend/Justfile@@ -7,6 +7,16 @@ lint:format:golangci-lint fmt ./cmd/... ./internal/...+# The libedit shim lets the bundled PostgreSQL clients start on Fedora; without it a package that+# checks them at startup exits before its first test.+# Run the given test packages, e.g. just test-package ./internal/features/intervals/...+test-package +packages:+ #!/usr/bin/env bash+ set -euo pipefail+ source ../scripts/fedora.sh+ apply_libedit_shim+ go test -count=1 {{ packages }}+clean-testcontainers:#!/usr/bin/env bashset -euo pipefaildiff --git a/openspec/config.yaml b/openspec/config.yamlindex a18472db..500d8959 100644--- a/openspec/config.yaml+++ b/openspec/config.yaml@@ -51,8 +51,8 @@ rules:- Say which module AGENTS.md rules the approach is constrained by.tasks:- Humanize all prose in embedded mode before writing the artifact.- - Each task's verification is a local command the agent runs itself, never "should work". Valid checks are the touched package's tests (go test ./internal/features/<feature>/... -count=1), just lint at the root or in a module, just build and just test in agent/verification, pnpm lint, pnpm typecheck, pnpm test, pnpm build, or an automated test that pins the behavior.- - Every task is one the agent can complete and verify on its own. Keep these out of tasks and out of other tasks' verification - the full backend suite (just test at the root), the Docker filesystem suite (just test-filesystem), deploys, CI pipeline runs, any check that needs a push, and manual app runs or browser clicking. AGENTS.md leaves the full backend suite for the end of a change, because it resets the test containers other agents share.+ - Each task's verification is a local command the agent runs itself, never "should work". Valid checks are the tests of the touched packages and of the packages that test the same feature (just test-package ./internal/features/<feature>/... in backend/), just lint at the root or in a module, just build and just test in agent/verification, pnpm lint, pnpm typecheck, pnpm test, pnpm build, or an automated test that pins the behavior.+ - Every task is one the agent can complete and verify on its own. Every task closes without the user stepping in and without the full backend suite. Keep these out of tasks and out of other tasks' verification, including a final verification task - the full backend suite (just test at the root), the Docker filesystem suite (just test-filesystem), deploys, CI pipeline runs, any check that needs a push, and manual app runs or browser clicking. The full backend suite resets the test containers other agents share, so it is left to the developer and CI.- Order by dependency, smallest slice first when the work is repetitive.- End the task list at the pre-commit boundary. The change is complete when implementation, required documentation, verification and mandatory review are finished, and the working tree is ready to commit.- Never add tasks for committing, pushing, creating or updating a pull request, requesting pull request review, merging, or any later Git or repository-hosting workflow. Completion status updates must be ready for inclusion in the same commit as the implementation.