ci: integration tests + boot backfill for legacy skill versions#21
Merged
segidev merged 2 commits intoJun 1, 2026
Merged
Conversation
Add Postgres-backed integration job that runs make test-integration on every PR to main. The target provisions docker-compose.test.yml and sets REQUIRE_TEST_DB=true so an unreachable DB fails the job instead of silently skipping. Closes #20
Skills imported before the version system carry a 0.0.0 placeholder and no active-version pointer. Add an idempotent boot job that repoints each to 1.0.0 (S3 copy + DB rename + approval rows), deletes the legacy key, then sets is_active on one version per skill. Mirrors aigent's S3KeyBackfill: per-skill errors are logged and the pass continues, so a later boot retries. Collisions (1.0.0 already present) are skipped, leaving the legacy row intact.
3 tasks
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.
What
Two changes, both gated by the new integration CI job:
CI: run integration tests (closes ci: run integration tests in CI (Postgres-backed, no silent skip) #20). New
integrationjob runsmake test-integrationon every PR tomain: provisions Postgres viadocker-compose.test.yml, setsREQUIRE_TEST_DB=trueso an unreachable DB fails the job instead of silently skipping.Boot backfill for legacy skills. Skills imported before the version system carry a
0.0.0placeholder and nois_activepointer (prod: 9 skills all0.0.0; staging: 3). New idempotent boot job (internal/backfill) repoints each0.0.0 → 1.0.0(S3 copy viaregistry.CopyVersion+ DB rename acrossskills,approval_requests,tenant_approved_skills), deletes the legacy S3 key, then setsis_activeon one resolved version per skill (newest available, else newest byuploaded_at). Mirrors aigent'sS3KeyBackfill: per-skill errors are logged and the pass continues, so a later boot retries. Collisions (1.0.0already present) are skipped, legacy row left intact.Why backfill on boot, not a SQL migration
The version is part of the S3 key (
<tenant>/skills/<name>/<version>/skill.zip), so renaming the DB version without moving the artifact breaks skill download. A goose migration has no S3 access; the boot job has both store + registry.Test
internal/backfill/skills_integration_test.go): rename + activate + approval repoint + collision-skip.is_activeguarded byNOT EXISTS active.🤖 Generated with Claude Code