Skip to content

fix: address unresolved review comments from merged PRs #1179-#1246 - #1251

Merged
kalbasit merged 18 commits into
mainfrom
gs-comments-1179-1246
May 24, 2026
Merged

kalbasit merged 18 commits into
mainfrom
gs-comments-1179-1246

Conversation

@kalbasit

@kalbasit kalbasit commented May 24, 2026 •

Copy link
Copy Markdown
Owner

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

Test fixes

Docs / skills

Test plan

  • nix flake check (includes all unit + integration tests, lint, ent-lint,
    atlas-sum, helm-unittest, schema-equivalence)
  • go test -race ./... locally with eval "$(enable-integration-tests)"
  • Verify all referenced GitHub threads are marked resolved

🤖 Generated with Claude Code

@kalbasit

kalbasit commented May 24, 2026 •

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working documentation Improvements or additions to documentation go Pull requests that update go code labels May 24, 2026
@coderabbitai

coderabbitai Bot commented May 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Validates 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.

Changes

Mixed maintenance and tooling improvements

Layer / File(s) Summary
generate-migrations: validation & atlas.sum
cmd/generate-migrations/main.go, cmd/generate-migrations/main_test.go
Validate --skip dialects, normalize tokens, return per-dialect generated SQL path ("" for no-op), ensure/refresh atlas.sum in --sql-only mode, reject more placeholder names; tests add 60s build timeout and stricter .sql count assertion.
Migration docs and skills
.agent/skills/migrate-down/SKILL.md, .agent/skills/migrate-new/SKILL.md
Document expand-contract sequence including final DROP COLUMN step and update NOT NULL multi-migration recipe; clarify ent-lint verifies invariants A1/A2/A4 (A3/A5 via review).
Cache core: streaming guards & ops
pkg/cache/cache.go
Add errMissingChunkEdge and fail when eager-loaded chunk edges are missing; reduce relink batch 500→499; require all three LRU candidate lists empty to early-exit; warn on maxFetchRows cap; update touch to use UpdateOneID.
Cache streaming pipeline termination
pkg/cache/cache.go
Terminate pipeline with explicit errors in complete and progressive chunk-streaming when link.Edges.Chunk is nil (include link ID).
Cache tests & locks
pkg/cache/cache_prefetch_test.go, pkg/cache/cache_distributed_test.go
Prefetch test resolves NarFile by (hash,compression,query) and requires ≥2 chunks; distributed lock test uses TryLock and expects acquired==false when held.
DB init and migration state
pkg/database/database.go, pkg/database/migrate/state.go, pkg/database/migrate/adopt.go
Open closes *sql.DB on NewClient error; add exported ErrUnknownState and use it for unhandled adopt states.
Testhelper sqlite NarInfo fixes
testhelper/sqlite.go
Ensure nar_files.file_size non-zero with fallback to ni.NarSize; add updatePlaceholderNarInfo and update placeholder handling.
E2E & migration run scripts
dev-scripts/test-migration-e2e.py, dev-scripts/run.py
E2E results path -> .e2e-results/; reset subprocesses raise on failure; stop_ncps enforces port close; wait_ready accepts proc and aborts if process exits; idempotency parsing raises on mismatch; run_db_migration checks for dbmate on non-sqlite.
CI, docs, nix, infra
.github/workflows/*, docs/..., nix/*, openspec/..., nix/process-compose/init-garage.sh
Pin several GitHub Actions to SHAs; trigger CI pushes only on main; include go.mod/go.sum in ent paths-filter; quote DB DSNs in docs/docker-compose; enable set -o pipefail in ent-lint buildPhase; redact S3 secret in init banner; update openspec archived paths and coverage metric wording; pin release workflow actions to SHAs.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • kalbasit/ncps#1221: Related Nix ent-lint-check work that introduced the check this change tightens.
  • kalbasit/ncps#1241: Overlaps test binary build/test-helper changes used by generate-migrations tests.
  • kalbasit/ncps#1225: Overlapping migration skill/documentation edits regarding expand-contract guidance.

Suggested labels

merge-stack

Poem

"A rabbit hops through patches wide and neat,
Dialects checked and atlas sums made sweet.
Chunks that miss an edge now loudly cry,
Tests and scripts stand firmer — secrets hide.
I nibble bugs and bounce — the tree grows strong and spry."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: address unresolved review comments from merged PRs #1179-#1246' is clear, specific, and accurately summarizes the main change: consolidating and fixing issues from previous PR reviews across a series of merged pull requests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description comprehensively explains the consolidation of unresolved review threads with specific bug fixes, test improvements, documentation updates, and clear references to source PRs and thread IDs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

@kalbasit kalbasit changed the title fix(generate-migrations): validate skip dialects fix: address unresolved review comments from merged PRs #1179-#1246 May 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Update 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

📥 Commits

Reviewing files that changed from the base of the PR and between 001e23f and 4cb3da0.

📒 Files selected for processing (18)
  • .agent/skills/migrate-down/SKILL.md
  • .agent/skills/migrate-new/SKILL.md
  • cmd/generate-migrations/main.go
  • cmd/generate-migrations/main_test.go
  • dev-scripts/test-migration-e2e.py
  • docs/docs/User Guide/Configuration/Database/PostgreSQL Configuration.md
  • docs/docs/User Guide/Installation/Docker Compose.md
  • nix/checks/flake-module.nix
  • nix/process-compose/init-garage.sh
  • openspec/changes/archive/2026-05-23-less-tests/design.md
  • openspec/changes/archive/2026-05-23-less-tests/tasks.md
  • openspec/specs/test-suite-efficiency/spec.md
  • pkg/cache/cache.go
  • pkg/cache/cache_prefetch_test.go
  • pkg/database/database.go
  • pkg/database/migrate/adopt.go
  • pkg/database/migrate/state.go
  • testhelper/sqlite.go

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkg/cache/cache.go Resolved
Comment thread pkg/cache/cache.go Resolved
@codecov

codecov Bot commented May 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 4.86%. Comparing base (211083d) to head (51a48ad).

Files with missing lines Patch % Lines
testhelper/sqlite.go 0.00% 56 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

kalbasit and others added 16 commits May 23, 2026 20:41
- 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]>
@kalbasit
kalbasit force-pushed the gs-comments-1179-1246 branch from 4cb3da0 to 8f3c7bd Compare May 24, 2026 03:42

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4cb3da0 and 8f3c7bd.

📒 Files selected for processing (26)
  • .agent/skills/migrate-down/SKILL.md
  • .agent/skills/migrate-new/SKILL.md
  • .github/workflows/ci.yml
  • .github/workflows/releases.yml
  • cmd/generate-migrations/main.go
  • cmd/generate-migrations/main_test.go
  • dev-scripts/run.py
  • dev-scripts/test-migration-e2e.py
  • docs/docs/User Guide/Configuration/Database/PostgreSQL Configuration.md
  • docs/docs/User Guide/Installation/Docker Compose.md
  • nix/checks/flake-module.nix
  • nix/process-compose/flake-module.nix
  • nix/process-compose/init-garage.sh
  • openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/design.md
  • openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/tasks.md
  • openspec/changes/archive/2026-05-22-swap-minio-with-garage/design.md
  • openspec/changes/archive/2026-05-23-less-tests/design.md
  • openspec/changes/archive/2026-05-23-less-tests/tasks.md
  • openspec/specs/test-suite-efficiency/spec.md
  • pkg/cache/cache.go
  • pkg/cache/cache_distributed_test.go
  • pkg/cache/cache_prefetch_test.go
  • pkg/database/database.go
  • pkg/database/migrate/adopt.go
  • pkg/database/migrate/state.go
  • testhelper/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

Comment thread .github/workflows/ci.yml Resolved
@github-actions

Copy link
Copy Markdown
Contributor

- 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]>
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation go Pull requests that update go code size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant