Repository navigation
fix(artifact): stop run checks filling D1 and prune old Resolutions - #688
Merged
Merged
Conversation
The skilld run sweep re-checked every runnable Skill about hourly. Each check wrote a Resolution with about 60 KB of attestations, and nothing deleted them. The 10 GB database filled on 2026-11-04 and every write since has failed. Check a ready Skill weekly and a failing one daily. Before each sweep, delete one batch of settled public Resolutions older than three days that no run check, grant, or newest Artifact attestation needs. The prune runs before the observed run records its start, so it frees space while the database is full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
🤖 MERGED
GitHub merged this pull request.
49682fcd-ad6f-4c5f-bda8-b7e24ca48eab Selected findings run after merge and open separate pull requests. |
Contributor
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
This was referenced Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
Related to #126 (daily check-in: database capacity incident)
❓ Type of change
📚 Description
skilld-dbreached D1's 10 GB limit on 2026-11-04. Writes have failed since then: 22 scheduled tasks are stale and ingestion has stopped.The cause is the
sweep-skill-runstask. It re-checked each of about 140 runnable Skills roughly every 50 minutes. Each check wrote a new Resolution with its attestation (about 34 KB) and a second copy inartifact_attestations(about 24 KB). Nothing deleted these rows.artifact_resolutionsandartifact_attestationshold an estimated 6 GB, from sampled row sizes.This change does two things:
pruneSettledResolutionsdeletes up to 500 settled public Resolutions older than three days. It keeps any Resolution that a run check, a download grant, or the newest attestation of an Artifact still needs. Cascades remove the attestation, check results, and requester rows.The prune runs before the observed run inserts its start row. That way it can free space while the database is full. The CLI uses a Resolution ID only while it polls one run, so a three-day window is safe.
🤖 Generated with Claude Code