Dependency Maintenance
How the monorepo's dependencies are kept current: one ledger of every direct dependency across the stack, a weekly check that belongs to Monday but is caught up on the first run after a missed Monday, clear rules for what is updated at once and what waits, and a two-week deferral for updates that break something before the migration (including its code changes) is done.
The procedure for agents is the skill .agents/skills/github-backup-automation-system/dependency-maintenance.md; this page is the operator's view.
The ledger
docs/dependencies/ledger.json, written by scripts/deps-ledger.py (Python standard library only, python3 >= 3.9):
| What | Where it comes from |
|---|---|
| Direct Go modules | go.mod (// indirect lines left out) |
Direct packages of the three apps and the browser tests, with the version the lockfile resolved, and pnpm.overrides | src/apps/*/package.json, tests/e2e/package.json and their pnpm-lock.yaml |
Direct packages of the Observatory, with the version uv.lock resolved | src/services/github-backup-observatory/pyproject.toml and uv.lock |
| Base images | every Dockerfile (FROM, stage references left out, ARG defaults filled in) |
| Compose images | third-party images the compose files pin (deploy/selfhost/compose*.yaml, docker-compose.yml), this project's own images left out |
| GitHub Actions | uses: owner/action@ref in .github/workflows/*.yml |
Every entry carries the date it last changed. The ledger also records when the weekly check last ran, the updates that were applied (history) and the updates that are waiting (deferred, each with a reason and a revisit date). make deps-scan reports new, removed and changed direct dependencies, and every pnpm.overrides entry that was added, removed or given another value (an exact pin turned into a caret range counts). tests/test_deps_ledger.py fails when the committed ledger and the committed manifests disagree in either, so a dependency or override change is always recorded.
When
- The check is weekly and belongs to Monday. The first agent session of the week runs it, whatever day that is:
make deps-duesays whether it is due or already done this week, and lists deferred updates whose revisit date has come (scripts/deps-ledger.py due --strictexits2when not due, for scripts). A missed Monday is caught up on the next run, never postponed to the next week. - A red Security Audit run or a Dependabot alert is handled at once, on any day.
- Dependabot opens no pull requests (
open-pull-requests-limit: 0on every entry in.github/dependabot.yml); the weekly check applies every update itself. Dependabot alerts stay on.
Rules
| Situation | What happens |
|---|---|
Advisory at high or critical with a fixed release | Updated at once. A transitive package whose dependents pin the vulnerable range is forced with pnpm.overrides (">=<fixed>") and verified with the app's build and tests. |
| Advisory without a fixed release | Deferred with the reason; revisited in 14 days. |
| Patch or minor release, tests and builds green | Updated. |
| Major release, or breaking changes that touch our code | The changelog is read. Bounded code changes are made in the same change, with tests. Otherwise the update is deferred for 14 days (upstream often fixes or documents the migration in that time); at the revisit date the migration is done, including the code or SDK changes it needs. |
| Base images, compose images, GitHub Actions | Updated by hand in the weekly check (new tag, or new commit SHA with its # vX.Y.Z comment), merged when CI is green and recorded in the ledger. |
| The design-system packages | Only through the design-system-update.yml pull request (DESIGN_SYSTEM_RELEASES.md). |
| pnpm itself | corepack use pnpm@<version> in src/apps/* and tests/e2e, which writes packageManager with the tarball's sha512 after checking npm's signature, then node scripts/verify-pnpm-signature.mjs (all four pins equal, signature verified). CI installs exactly those bytes (CI skill, rule 16). |
"Safe" means every affected suite passes (Go with the database tests, pytest and pyright, Vitest, tsc, Biome, the Next.js and Docusaurus builds), the audits pass, and no documented behaviour changed.
Commands
make deps-due # due this week?
make deps-check # scan, outdated versions, audits
make deps-scan-record # write the manifests' state into the ledger
make deps-report # Markdown summary (deferred updates, recent changes)
scripts/deps-ledger.py --help
What the ledger says today
make deps-report prints the current state. The first check (2026-10-06) forced four transitive packages of the apps to fixed releases through pnpm.overrides (source-map-js in all three apps; tinypool, serialize-javascript and http-cache-semantics in the docs site) and deferred braces, which has no fixed release yet.