Repository navigation
fix: address unresolved review comments from merged PRs #1179-#1246 - #1251
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
📝 WalkthroughWalkthroughValidates migration dialect tokens and bootstraps atlas.sum; tightens cache chunk-streaming and LRU behavior; fixes DB init resource cleanup; hardens e2e and migration scripts; updates docs, CI, and small infra scripts. ChangesMixed maintenance and tooling improvements
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
openspec/specs/test-suite-efficiency/spec.md (1)
48-61:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUpdate scenarios to match the requirement's coverage metric.
The requirement on line 48 was updated to use "statement/instrumented-block coverage" instead of "branch coverage", but the scenarios on lines 55 and 59 still reference "branch coverage". This inconsistency could lead developers to implement or validate against the wrong metric.
📝 Proposed fix to align scenarios with requirement
#### Scenario: Removing a test passes the coverage gate - **WHEN** a batch of test removals is proposed for package `pkg/X` - **AND** `go test -coverpkg=./... -coverprofile=cover-after.out -race ./pkg/X/...` is run on the post-change tree - **THEN** line coverage of `cover-after.out` is greater than or equal to line coverage of the pre-change `cover-before.out` -- **AND** branch coverage of `cover-after.out` is greater than or equal to `cover-before.out` minus 1 percentage point +- **AND** statement/instrumented-block coverage of `cover-after.out` is greater than or equal to `cover-before.out` minus 1 percentage point #### Scenario: A batch fails the coverage gate -- **WHEN** a batch of test removals causes line coverage to drop or branch coverage to drop by more than 1 percentage point for any affected package +- **WHEN** a batch of test removals causes line coverage to drop or statement/instrumented-block coverage to drop by more than 1 percentage point for any affected package - **THEN** the batch MUST be reverted in full - **AND** the offending removal MUST be re-evaluated against the four-gate rule before any further attempt🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openspec/specs/test-suite-efficiency/spec.md` around lines 48 - 61, The scenarios' wording is inconsistent: update the two scenario paragraphs titled "Scenario: Removing a test passes the coverage gate" and "Scenario: A batch fails the coverage gate" to replace references to "branch coverage" with "statement/instrumented-block coverage" (to match the requirement in the paragraph that uses "statement/instrumented-block coverage"), and adjust the comparison language (e.g., "branch coverage of cover-after.out is greater than or equal to cover-before.out minus 1 percentage point") to the same metric so both scenarios reference "statement/instrumented-block coverage" with the same inequality and threshold semantics as the existing line-coverage checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@openspec/changes/archive/2026-05-23-less-tests/design.md`:
- Line 20: The coverage gate is inconsistent: the sentence "Keep coverage
parity: line coverage MUST NOT drop; statement/block coverage MUST NOT drop by
more than 1pp per package." and the D5 requirement (Lines 88–90 referencing
branch coverage) must use the same metric; pick one metric (either "line
coverage" or "branch coverage") and update both places so they match—e.g., if
you choose branch coverage, change the Line 20 sentence to require branch
coverage parity and update D5 text to the same wording, or vice versa; ensure
wording and thresholds are identical across both locations.
In `@openspec/changes/archive/2026-05-23-less-tests/tasks.md`:
- Line 64: The checklist entry currently references profile-tests.py while
another task (8.6) references dev-scripts/profile-tests.sh, causing inconsistent
tool naming; update the task line that reads "Re-run `profile-tests.py`..." to
use the canonical script name used elsewhere (dev-scripts/profile-tests.sh) or
vice versa—whichever is the actual script in the repo—so both references (the
one in this file and the one in task 8.6) consistently use the same tool name;
locate the string "profile-tests.py" in this file (tasks.md) and replace it with
the agreed canonical name (e.g., dev-scripts/profile-tests.sh).
---
Outside diff comments:
In `@openspec/specs/test-suite-efficiency/spec.md`:
- Around line 48-61: The scenarios' wording is inconsistent: update the two
scenario paragraphs titled "Scenario: Removing a test passes the coverage gate"
and "Scenario: A batch fails the coverage gate" to replace references to "branch
coverage" with "statement/instrumented-block coverage" (to match the requirement
in the paragraph that uses "statement/instrumented-block coverage"), and adjust
the comparison language (e.g., "branch coverage of cover-after.out is greater
than or equal to cover-before.out minus 1 percentage point") to the same metric
so both scenarios reference "statement/instrumented-block coverage" with the
same inequality and threshold semantics as the existing line-coverage checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: dbe5a6e7-c29f-4f16-980b-541693067b60
📒 Files selected for processing (18)
.agent/skills/migrate-down/SKILL.md.agent/skills/migrate-new/SKILL.mdcmd/generate-migrations/main.gocmd/generate-migrations/main_test.godev-scripts/test-migration-e2e.pydocs/docs/User Guide/Configuration/Database/PostgreSQL Configuration.mddocs/docs/User Guide/Installation/Docker Compose.mdnix/checks/flake-module.nixnix/process-compose/init-garage.shopenspec/changes/archive/2026-05-23-less-tests/design.mdopenspec/changes/archive/2026-05-23-less-tests/tasks.mdopenspec/specs/test-suite-efficiency/spec.mdpkg/cache/cache.gopkg/cache/cache_prefetch_test.gopkg/database/database.gopkg/database/migrate/adopt.gopkg/database/migrate/state.gotesthelper/sqlite.go
There was a problem hiding this comment.
Code Review
This pull request introduces several improvements across migration tooling, documentation, and cache management. Key updates include stricter dialect validation in migration generation, enhanced SQLite compatibility by adjusting batch sizes and handling zero-size files, and improved robustness in cache streaming by explicitly checking for missing chunk edges. Additionally, the PR addresses potential database connection leaks and strengthens CI pipelines with pipefail. Review feedback identifies potential goroutine leaks in the cache prefetch pipeline where error reporting to a channel should be context-aware to prevent blocking if the consumer has already exited.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1251 +/- ##
========================================
- Coverage 5.50% 4.86% -0.64%
========================================
Files 6 6
Lines 400 452 +52
========================================
Hits 22 22
- Misses 374 426 +52
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- parseSkip validates and normalises each dialect token, returning an error on unknown values (e.g. "myslq") instead of silently skipping nothing and running the dialect anyway. - --sql-only path now calls ensureAtlasSum after writing the stub so atlas.sum stays in sync when only empty stubs are generated. - Replace non-fatal assert.Len with require.Len in TestSQLOnlyEmitsThreeDialects so the test fails cleanly before indexing stamps[0..2] when fewer than 3 files are produced. - Wrap the one-time go build in a 60-second context instead of context.Background() to prevent an indefinite hang. Addresses PR #1187 (PRRT_kwDONV6tZs6EK6w5), PR #1185, PR #1241 (PRRT_kwDONV6tZs6EVhVP). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
adopt.go default case was wrapping ErrUnknownDialect (meant for database.Type) around a State value, giving callers a false positive when checking errors.Is(err, ErrUnknownDialect). Introduce ErrUnknownState sentinel in state.go and use it in the adopt() default branch so error identity correctly reflects an unrecognised State, not an unknown dialect. Addresses PR #1188 (PRRT_kwDONV6tZs6ELFch). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
relinkBatchSize was 500, but the upsert binds 2 values per row (narinfoID + narFileID), producing 1000 placeholders per batch — one over older SQLite's hard limit of 999. Lower to 499 (998 placeholders) to stay safely under the limit. Also close the *sql.DB in database.Open when NewClient fails, so the connection pool is not leaked on rare init-path errors. Addresses PR #1208 (PRRT_kwDONV6tZs6EQXUg). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The pipeline ./ent-lint | tee masked ent-lint's exit code: tee always exits 0, so a failing lint run appeared successful. Add set -o pipefail so a non-zero exit from ent-lint propagates through the pipeline and fails the Nix derivation. Addresses PR #1221 (PRRT_kwDONV6tZs6ESKvB, PRRT_kwDONV6tZs6ESKvC). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
cache_prefetch_test.go was querying NarFileChunks with a hard-coded nar_files.id=1, which breaks when another row is created first (e.g. by a parallel test). Query NarFile by (hash, compression, query) to get the correct ID, and assert at least 2 chunks so the missing-chunk path is always exercised. testhelper/sqlite.go was passing ni.FileSize directly to SetFileSize. For Compression:none narinfos, FileSize is 0 (omitted from the wire format), producing impossible nar_files.file_size=0 rows in test fixtures. Fall back to ni.NarSize when FileSize is 0, mirroring the narFileSize() helper in pkg/cache/cache.go. Addresses PR #1218 (PRRT_kwDONV6tZs6ER7H5). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Printing NCPS_TEST_S3_SECRET_ACCESS_KEY in plaintext leaks the credential into process-compose logs and any CI output capture. Replace with [redacted] — the value is already exported into the environment for tools that need it. Addresses PR #1240 (PRRT_kwDONV6tZs6ERepp). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Addresses PR #1233 thread PRRT_kwDONV6tZs6EU7OQ. The module docstring said results go to var/ncps/e2e-results/<timestamp>/ but RESULTS_ROOT (line 45) is actually .e2e-results/ — fix the docstring to match. mc mb and redis-cli flushall now use check=True so a failure in the reset step aborts immediately rather than silently leaving the environment broken and continuing the test. Teardown-only commands (dbmate drop, mc rb --force) keep check=False because they may legitimately fail on a first run when no database or bucket yet exists. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Addresses PR #1234 threads PRRT_kwDONV6tZs6EVEtd and PRRT_kwDONV6tZs6EVH5U. Unquoted ?sslmode=disable in copy-pasteable shell commands can be glob-expanded by shells that have matching files. Quote the DSN value in: - docs/docs/User Guide/Configuration/Database/PostgreSQL Configuration.md (migration example at line 115) - docs/docs/User Guide/Installation/Docker Compose.md (migrate-on-init container command at line 177) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Addresses PR #1225 threads PRRT_kwDONV6tZs6ET_2b, PRRT_kwDONV6tZs6EUS9L, and PRRT_kwDONV6tZs6EUS9S. migrate-new/SKILL.md: ent-lint only enforces A1, A2, A4 today; A3 and A5 are enforced by code review. Saying "five codegen invariants" overstated CI coverage. migrate-down/SKILL.md expand-contract step 4: DROP COLUMN is classified as sensitive/forbidden DDL by the migration spec (spec line 179); clarify the step only applies as the terminal move once no deployed binary references the old column. migrate-down/SKILL.md NOT NULL recipe: the recipe was missing the mandatory "deploy code that always writes a non-null value" step between Migration A and the backfill stub. Without this step, newly-written rows can remain null and the NOT NULL constraint will fail or produce incorrect data at Migration C. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Addresses PR #1245 threads PRRT_kwDONV6tZs6EV3Z6, PRRT_kwDONV6tZs6EV3Z7, PRRT_kwDONV6tZs6EV3Z8, PRRT_kwDONV6tZs6EV3Z_, PRRT_kwDONV6tZs6EV3aA, PRRT_kwDONV6tZs6EV3aB. archive/2026-05-23-less-tests/design.md: - Fix baseline output path: openspec/changes/less-tests/ → openspec/changes/archive/2026-05-23-less-tests/ (matches the archived change directory). - Add `bash` language tag to the fenced code block (MD040). - Replace "branch coverage" with "statement/block coverage" — Go's go test -coverprofile reports instrumented-block coverage, not source-level branch coverage per the official cover docs. archive/2026-05-23-less-tests/tasks.md: - Fix baseline path to match archived directory (line 5). - Add blank line before table to satisfy MD058. - Fix task 7.1: profile-tests.sh → profile-tests.py; fix output path to point to the archived directory. openspec/specs/test-suite-efficiency/spec.md: - Replace "Branch coverage" with "Statement/instrumented-block coverage" throughout to match what go test -coverprofile actually measures. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Addresses PR #1206 thread PRRT_kwDONV6tZs6EQJXV: Use UpdateOneID(nr.ID) to touch the nar_file row instead of re-filtering by narURL fields. getNarFileFromDB may return a compression=none fallback row whose key differs from narURL, so the old Where(...HashEQ/CompressionEQ/QueryEQ...) filter could silently miss it and leave last_accessed_at stale. Addresses PR #1207 thread PRRT_kwDONV6tZs6ERJA1: Treat link.Edges.Chunk == nil as corruption instead of silently skipping the chunk. In streamCompleteChunks this produced a count mismatch error anyway; in streamProgressiveChunks the continue left chunkIndex behind, risking re-streaming or an infinite loop on the same index. All three callsites now return the errMissingChunkEdge sentinel wrapped with the link ID. Addresses PR #1215 thread PRRT_kwDONV6tZs6ERsSu: Add len(narURLsToRemove) == 0 to the early-return guard in the LRU eviction loop. Previously, if only orphaned NarFile rows were deleted (no narinfos and no chunks), parallelDeleteFromStores was skipped and the backing blobs remained leaked in storage. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Addresses PR #1218 threads PRRT_kwDONV6tZs6ER7IC and PRRT_kwDONV6tZs6ER7IE. MigrateNarInfoToDatabase was passing ni.FileSize directly to getOrCreateNarFile. For compression=none narinfos, FileSize is 0 (omitted from the wire format), producing impossible nar_files.file_size=0 fixture rows. Apply the NarSize fallback to match the narFileSize() helper in pkg/cache/cache.go. getOrCreateNarInfo was returning an existing placeholder row (created by RegisterNarInfoAsUnmigrated, which intentionally omits the URL) unchanged when MigrateNarInfoToDatabase was called for the same hash. This meant migrated fields (URL, hashes, sizes) were never written into the DB row. Add updatePlaceholderNarInfo: when the fetched row has no URL, update it with the full narinfo data before returning. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Remove release-* from ci.yml triggers (PR #1235 PRRT_kwDONV6tZs6EVXg7): CLAUDE.md mandates main-only CI to keep stacked-PR workflows efficient. - Pin stefanzweifel/git-auto-commit-action to commit SHA 04702edda… (v7) (PR #1223 PRRT_kwDONV6tZs6EUFjb): prevents supply-chain mutation via mutable tag. - Add go.mod/go.sum to ent paths-filter (PR #1235 PRRT_kwDONV6tZs6EVXhI): Ent version bumps also require codegen re-run. - Update tasks.md 13.6 (PR #1223 PRRT_kwDONV6tZs6EUFjd): remove stale "no edits expected" note. - Replace wget healthcheck with /garage status (PR #1240 PRRT_kwDONV6tZs6EReph): wget absent in distroless image. - Remove mkdir -p with undefined vars (PR #1240 PRRT_kwDONV6tZs6ERepn): start-garage.sh already creates the dirs after deriving GARAGE_DATA_DIR/META_DIR. - Update D6 credential format (PR #1240 PRRT_kwDONV6tZs6ERepq): reflect actual GK-prefix key ID and 64-char hex secret used in implementation. - Fix profile-tests.sh to .py in design.md (PR #1246 PRRT_kwDONV6tZs6EViwJ): profiler is Python, not shell. - Remove redundant "when run locally" in spec.md (PR #1246 PRRT_kwDONV6tZs6EViwK): scenario heading already scopes to local execution. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
dev-scripts/test-migration-e2e.py (PR #1233): - PRRT_kwDONV6tZs6EU7OZ: raise in stop_ncps if port never closes (was silently ignored). - PRRT_kwDONV6tZs6EU7Ob: raise on unparseable idempotency output instead of downgrading to a WARN log. - PRRT_kwDONV6tZs6EVEfJ: wait_ready() takes the process handle and exits early when ncps dies before becoming ready, avoiding the full 120s timeout. dev-scripts/run.py (PR #1232): - PRRT_kwDONV6tZs6EU663: guard dbmate create with shutil.which(), matching the existing pattern for perform_clean(); raises FileNotFoundError with a clear message instead of a confusing FileNotFoundError from subprocess. pkg/cache/cdc_test.go (PR #1241): - PRRT_kwDONV6tZs6EVhVS: increase chunkingDelay 500ms→1s to reduce flakiness under -race on loaded CI. pkg/cache/cache_distributed_test.go (PR #1244): - PRRT_kwDONV6tZs6EVZVc: replace Lock+200ms timeout with TryLock (non-blocking) for lock-contention check; deterministic and immune to slow Redis round-trips. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
PR #1235 thread PRRT_kwDONV6tZs6EVXhB and PR #1235 thread PRRT_kwDONV6tZs6EVXhJ: pin every external 'uses:' in ci.yml and releases.yml to an immutable commit SHA (tag kept as comment) to prevent supply-chain mutation via mutable tag refs. Pinned: - actions/checkout@v6 → de0fac2e - dorny/paths-filter@v4 → fbd0ab8f - cachix/install-nix-action@v31 → b97f05dc - cachix/cachix-action@v17 → 02b16339 - cloudflare/wrangler-action@v4 → ebbaa158 - actions/github-script@v9 → 373c709c - softprops/action-gh-release@v3 → b4309332 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- runDialect returns (string, error); snapshots the migration directory before and after NamedDiff to detect the newly-created file and print its path to stdout — mirrors the sql-only path behavior. - main() collects each file's 14-char timestamp prefix and warns when a second boundary falls between dialect runs so callers know to re-run. - validateName: add "empty" to the placeholder reject list. Addresses PR #1215 thread PRRT_kwDONV6tZs6ERsSs. - pkg/cache: log a warning when LRU candidate fetch hits the maxFetchRows cap so operators know eviction scanned only a partial window. Addresses PR #1206 LRU row-cap comment. - openspec tasks.md §10/§11: update notes — database.Client threading was completed in §11, not deferred. - openspec design.md: add language tag to decision-tree fence; fix grammar ("requires named CHECKs" → "requires CHECK constraints to be named"). Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
4cb3da0 to
8f3c7bd
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 50-51: The checkout steps for non-push workflows are persisting
credentials unnecessarily; locate the steps that call uses: actions/checkout@...
which are used by the "filter" (dorny/paths-filter) step and the
"deploy-docs-pages" step and add a with: block setting persist-credentials:
false to each actions/checkout usage (e.g., under the steps that reference uses:
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd) so those jobs do not
retain git push credentials.
In `@openspec/specs/test-suite-efficiency/spec.md`:
- Line 48: The spec currently updates the gate at the top (the requirement
introduced around "When tests are removed or restructured..." mentioning
"Statement/instrumented-block coverage") but still refers to "branch coverage"
in the later scenario lines; update the wording in the scenario lines (the two
occurrences that currently say "branch coverage" around the later paragraphs) to
instead read "statement/instrumented-block coverage" (matching the exact phrase
used in the gate) so all references are consistent with the new gate definition.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cc7efc66-86a5-4919-b592-d246ecdab131
📒 Files selected for processing (26)
.agent/skills/migrate-down/SKILL.md.agent/skills/migrate-new/SKILL.md.github/workflows/ci.yml.github/workflows/releases.ymlcmd/generate-migrations/main.gocmd/generate-migrations/main_test.godev-scripts/run.pydev-scripts/test-migration-e2e.pydocs/docs/User Guide/Configuration/Database/PostgreSQL Configuration.mddocs/docs/User Guide/Installation/Docker Compose.mdnix/checks/flake-module.nixnix/process-compose/flake-module.nixnix/process-compose/init-garage.shopenspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/design.mdopenspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/tasks.mdopenspec/changes/archive/2026-05-22-swap-minio-with-garage/design.mdopenspec/changes/archive/2026-05-23-less-tests/design.mdopenspec/changes/archive/2026-05-23-less-tests/tasks.mdopenspec/specs/test-suite-efficiency/spec.mdpkg/cache/cache.gopkg/cache/cache_distributed_test.gopkg/cache/cache_prefetch_test.gopkg/database/database.gopkg/database/migrate/adopt.gopkg/database/migrate/state.gotesthelper/sqlite.go
💤 Files with no reviewable changes (1)
- nix/process-compose/flake-module.nix
✅ Files skipped from review due to trivial changes (4)
- docs/docs/User Guide/Configuration/Database/PostgreSQL Configuration.md
- .agent/skills/migrate-new/SKILL.md
- openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/design.md
- openspec/changes/archive/2026-05-23-less-tests/tasks.md
- pkg/cache: wrap both errMissingChunkEdge sends to chunkChan in a select/ctx.Done so the producer goroutine cannot block forever when the consumer has already exited (context cancellation or earlier error). Addresses PRRT_kwDONV6tZs6EWUTe and PRRT_kwDONV6tZs6EWUTf. - ci.yml: add persist-credentials: false to the filter and deploy-docs-pages checkout steps — neither job needs git push auth. Addresses PRRT_kwDONV6tZs6EWkPt. - design.md (less-tests): change D5 "Branch coverage" to "Statement/instrumented-block coverage" to match the goals section. Addresses PRRT_kwDONV6tZs6EWTzI. - spec.md (test-suite-efficiency): update the two scenario lines still saying "branch coverage" to "statement/instrumented-block coverage". Addresses PRRT_kwDONV6tZs6EWkPw. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Summary
Consolidation branch addressing unresolved reviewer threads left open across
merged PRs #1179–#1246. Each fix has its own atomic commit referencing the
source PR and thread ID; all threads are resolved on GitHub after each change.
Bug fixes
nar_fileby fetched row ID, not by narURL fields —getNarFileFromDBcan return acompression=nonefallback whose key differsfrom
narURL, causing stalelast_accessed_atand LRU regressions (feat(cache): polymorphic getNarFileFromDB on *ent.NarFileClient #1206)nileager-loaded chunk edges instreamCompleteChunksand
streamProgressiveChunksinstead of silentlycontinue-ing, which causedcount mismatches or infinite re-streaming (feat(cache): convert chunk-stream reads to Ent (junction-side) #1207)
narURLsToRemovein the LRU early-return guard so orphanedNarFileblobs are passed toparallelDeleteFromStoresinstead of beingsilently leaked in storage (feat(cache): convert LRU eviction + fixNarInfoFileSize to Ent #1215)
maxFetchRowscapso operators know eviction scanned only a partial window (feat(cache): polymorphic getNarFileFromDB on *ent.NarFileClient #1206)
relinkBatchSizefrom 500 → 499 to stay underSQLite's 999-placeholder limit (500 rows × 2 binds = 1000 > 999) (fix(ncps): drop dbURL from createDatabaseQuerier error wraps #1208)
*sql.DBinOpen()whenNewClientfails (fix(ncps): drop dbURL from createDatabaseQuerier error wraps #1208)ErrUnknownState(notErrUnknownDialect) forunrecognised
Statevalues — fixes false-positiveerrors.Ischecks (feat(migrate): ncps migrate up + adoption + Schema.Create path #1188)parseSkipvalidates dialect names, returning an erroron unknown values like
"myslq"instead of silently skipping them (feat(migrations): ent_baseline bridge + schema-equivalence test #1187)--sql-onlypath now callsensureAtlasSumafterwriting the stub so
atlas.sumstays in sync (feat(migrations): ent_baseline bridge + schema-equivalence test #1187)runDialectnow returns the generated file path andprints it to stdout;
main()warns when a second boundary falls betweendialect runs so callers know to re-run for a consistent timestamp set (feat(cache): convert LRU eviction + fixNarInfoFileSize to Ent #1215)
"empty"tovalidateNamereject list (feat(cmd): add generate-migrations with atlas-as-library #1185)set -o pipefailsoent-lint | teepropagatesa non-zero exit through the pipeline (feat(nix-checks): add ent-codegen-drift-check + ent-lint-check #1221)
var/ncps/e2e-results/→.e2e-results/);mc mbandredis-cli flushallnow usecheck=Trueso reset failuresabort the test immediately (test(dev-scripts): add e2e migration test orchestrator #1233)
stop_ncpsnow verifies the port closes within timeout;wait_readyexits early if the child process dies before becoming ready (test(dev-scripts): add e2e migration test orchestrator #1233)
dbmateusage with ashutil.whichcheck so a missingbinary fails fast with a clear message instead of an obscure error (fix(helm,docs): use
ncps migrate up, drop dbmate #1234)prevent supply-chain mutation (feat(nix-checks): add schema-equivalence-check + refresh ci.yml #1223)
release-*from pull_request/push triggers; addgo.modandgo.sumto the ent paths-filter (chore: migrate CI to kalbasit/gh-actions reusable workflow #1235)wgethealthcheck in Docker Composeexample with
garage status(feat(nix-checks): add schema-equivalence-check + refresh ci.yml #1223)Test fixes
assert.Len→require.Lenbefore indexingstamps[0..2]in
generate-migrationstests (feat(cmd): add generate-migrations with atlas-as-library #1185)go buildin the test setup (test: shrink go test wall time ~48% #1241)cache_prefetch_test.goto look upnar_fileby(hash, compression, query)instead of hard-codedid=1(chore(database): finish sqlc removal and Ent test migration #1218)NarSizefallback whenFileSize == 0intesthelper/sqlite.gotoavoid impossible
file_size=0fixture rows forcompression=nonenarinfos (chore(database): finish sqlc removal and Ent test migration #1218)chunkingDelayfrom 500 ms → 1 s incdc_test.goto reduceflakiness on slow CI machines (feat(analytics): switch reporter to *database.Client + Ent #1217)
Lock-with-timeout withTryLockincache_distributed_test.gotoavoid spurious failures when the lock-hold window is tight (feat(analytics): switch reporter to *database.Client + Ent #1217)
Docs / skills
?-glob expansionby shells (fix(helm,docs): use
ncps migrate up, drop dbmate #1234)migrate-new/SKILL.md: ent-lint checks A1, A2, A4 — not all five invariantsas previously stated (docs(skills): rewrite migration skills + add ent-schema skill #1225)
migrate-down/SKILL.md: clarify thatDROP COLUMNis sensitive/forbidden DDLper the migration spec and is only permissible as the terminal expand-contract
step; add the missing "deploy code that always writes non-null" step to the
NOT NULL recipe (docs(skills): rewrite migration skills + add ent-schema skill #1225)
openspec/changes/archive/2026-05-23-less-tests/: fix stale paths, addbashfence tag, replace "branch coverage" with "statement/block coverage" (chore(openspec): archive less-tests change #1245)
openspec/specs/test-suite-efficiency/spec.md: same coverage terminologyfix (chore(openspec): archive less-tests change #1245)
openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/design.md:add language tag to decision-tree fence block; fix grammar (docs(openspec): adopt option E for dbmate→Ent reconciliation #1186)
openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/tasks.md:update §10.1/§11.1 notes to reflect that
*database.Clientthreading wascompleted in §11, not deferred (feat(database): introduce *Client surface #1191, feat(cache): thread *database.Client into Cache #1192)
Test plan
nix flake check(includes all unit + integration tests, lint, ent-lint,atlas-sum, helm-unittest, schema-equivalence)
go test -race ./...locally witheval "$(enable-integration-tests)"🤖 Generated with Claude Code