Repository navigation
Closed
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)Ordinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Description
fix(pm-stack backup): pmp_links backup source resolution and offsite assertions — follow-up to merged PR #5315 (for #1744)
Bounded follow-up to unresolved review findings on merged PR #5315, filed by triage task 11960 (issue #1744) so the fix has a fresh dedupe key.
Problem
The merged PR #5315 pmp_links archive path still has unresolved source-selection and verification gaps:
DATABASE_URLhandling may select the wrong entry or local database (last-assignment parsing, CR/edge-whitespace and quote handling).- Remote/unsupported non-file URLs can silently fall through to a local default instead of failing explicitly;
file:URL paths are not decoded before existence checks. - Relative/default DB resolution can miss the active projector file under
PM_PROJECTOR_DIRbefore falling back to the state directory. - The upload test can pass when only one offsite destination (R2 or Drive) was called — it must require both.
This weakens the backup evidence needed for issue #1744 criterion 3 (one backup target covers the stack's data).
Evidence
- PR feat(backup): archive pmp_links-only export on all three PM dashboard backup legs (#1744) #5315 is MERGED; its CodeRabbit review on commit 7c34d0a has unresolved findings for: last
DATABASE_URLassignment/parsing, file URL decoding, unsupported non-file URL fallback,PM_PROJECTOR_DIRdefault resolution, and requiring both R2 and Drive upload calls in the test. - Files:
nixos/home/pm-dashboard-backup.sh,nixos/home/pm-dashboard-backup-pmp-links.test.sh(at main edef348 when scoped). - Issue pm stack: centralize all service data as shared tables in one database schema #1744: acceptance criteria 1-2 checked; criterion 3 remains unchecked.
Acceptance criteria
- Resolve
DATABASE_URLusing the last matching environment-file assignment; trim CR/edge whitespace plus one matching quote pair without altering interior path characters. - Decode
file:URL paths before existence checks; do not silently fall back to a local database for an unsupported non-fileDATABASE_URL(fail explicitly unless remote export is implemented). - Resolve the active relative/default projector database under
PM_PROJECTOR_DIRbefore using the existing state-directory fallback. - The with-database archive test passes only when the stub log records
copytocalls to both R2 and Drive. - Targeted tests pass:
nixos/home/pm-dashboard-backup-pmp-links.test.shandnixos/home/pm-dashboard-backup-manifest.test.sh. - Out of scope: re-implementing the merged pmp_links export, migrating service data, changing issue pm stack: centralize all service data as shared tables in one database schema #1744's architecture or criteria.
Metadata
Metadata
Assignees
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)Ordinary priority (the default)task/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
dezren39 commentedon Nov 8, 2026
agent-note:v1 picked up — queue task 12738 (lane 7b47536b, worker repo-worker-code).
Revalidated fresh: #7096 OPEN, #1744 OPEN (criterion 3 still unchecked), #5315 MERGED at c002ae6. No competing branch or PR exists for this follow-up. Starting from origin/main b5ddb39; worktree on the laptop, branch
queue/12738-7096-pmp-links-backup-source. Scope: DATABASE_URL last-assignment/quoted parsing, file: URL decoding + explicit failure for unsupported non-file URLs, PM_PROJECTOR_DIR-relative active DB resolution, and requiring both R2 and Drive copyto calls in the pmp-links test.fix(pm-stack backup): resolve pmp_links source DB correctly and asser…
dezren39 commentedon Nov 8, 2026
agent-note:v1 pr opened — PR #7363 (
queue/12738-7096-pmp-links-backup-source, head 4f1908f) implements all five acceptance items: last env-file assignment + edge-only trimming/quotes, file: URL percent-decode with explicit failure for remote DSNs (scheme only, no credential leak), PM_PROJECTOR_DIR-relative/default resolution before the state-dir fallback, and a with-db test that passes only when both R2 and Drive copyto calls are recorded. Local: pmp-links suite 21/21, manifest/copy/date/prune/record/base suites all rc=0. Awaiting basic CI tier.dezren39 commentedon Nov 8, 2026
agent-note:v1 parked (30m) — PR #7363 is open and mergeable (MERGEABLE) with all five acceptance items implemented and the pmp-links suite green locally (21/21) plus manifest/copy/date/prune/record/base. The basic PR-tier checks were still
queuedwith no runner after ~6 minutes (fleet-search-parity-guard, proxy port fallbacks, scripts-test 3.12/3.14), so a fresh lane will re-read CI, merge on green, and close the task. Resume artifacts: branchqueue/12738-7096-pmp-links-backup-source, head 4f1908f, worktree ~/git/fleet/12738. The pmp_links fix is NOT yet in main; do not treat #1744 criterion 3 as satisfied until #7363 merges.Merge pull request #7363 from developing-today/queue/12738-7096-pmp-l…
dezren39 commentedon Nov 8, 2026
🤖 Agent note · done