New monthly database partitions stop being created after a server's first start-up; item writes would eventually fail
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the partition creation logic in app/src/lib/db/migrate.ts around line 1842 and decision record 0012, then trace how the pipeline runs scheduled work. Add a frozen-clock test that checks the next month's partition after the last pre-created month; done when that test passes and decision record 0012 describes the actual behavior.
Written by the indexing model from the issue text.
Description
Found in the 2026-11-29 whole-repo review. The once-only flag is verified; the consequence was traced by a reviewer and should be confirmed with a test.
Problem
Two tables are split into one partition per month (the catalog change log item_events and audit_log). The code that creates upcoming partitions lives in the start-up migration routine, which is guarded by let migrated = false; ... if (migrated) return; (app/src/lib/db/migrate.ts ~line 1842). So it runs once per server process. Decision record 0012 assumes it runs on any request. The pipeline never creates partitions and there is no catch-all partition.
How it goes wrong
A server that stays up for a few months without a redeploy runs out of partitions. The trigger that records catalog changes then fails, which aborts every item write; audit inserts fail silently.
Suggested fix
Create partitions on a schedule (a pipeline timer or a scheduled job), separate from the once-only migrations. Add a catch-all partition as a safety net and alert if it ever receives rows.
Acceptance criteria
- Test with a frozen clock: after the process has been up past the last pre-created month, the next month's partition exists
- Decision record 0012 matches the behaviour
- Dominant language
- Python
- Stars
- 0
- Forks
- 2
- Avg merge
- 8h 26m
- Merged PRs (30d)
- 47
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TechTraverse/stac-higher
-
ci
Difficulty 1/5 Under an hour Newbie friendliness 85/100
TechTraverse/stac-higher#261 ·
Maintainers usually reply within 1 day
-
ready
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TechTraverse/stac-higher#258 ·
Maintainers usually reply within 1 day
-
Error messages hide the server's reason: users see only '400 Bad Request'Possibly taken @aman-code-io claimed this 3 days ago. Openbug good first issue ready
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
TechTraverse/stac-higher#232 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TechTraverse/stac-higher#225 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TechTraverse/stac-higher#216 ·
Maintainers usually reply within 1 day
All issues in TechTraverse/stac-higher
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day