Repository navigation
docs: fix awk/jq→Python and Nix sandbox spec - #1246
Conversation
|
This change is part of the following stack:
Change managed by git-spice. |
|
Caution Review failedFailed to post review comments 📝 WalkthroughSummary by CodeRabbit
WalkthroughDocumentation updates clarify test-suite profiling methodology across the design rationale and specification. The design document explains that ChangesTest-suite profiling documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the test suite efficiency documentation to reflect the transition from a shell-based pipeline to a Python script and clarifies that ranking output files are generated during local execution. Feedback indicates that the design document contains inconsistent references to the old shell implementation and that the 'locally' qualifier in the specification is redundant within its current scenario context.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 39: The doc contains a contradiction: Line 39 declares the analyzer is
Python but Line 116 still describes a shell pipeline and references
dev-scripts/profile-tests.sh; update that section to describe the Python
implementation instead. Replace mentions of the shell pipeline and
dev-scripts/profile-tests.sh with the Python analyzer (e.g.,
dev-scripts/analyze_tests.py or whatever script name you added), describe using
the test runner's -json output consumed by that Python script, and state that
the script writes the baseline to
openspec/changes/less-tests/baseline-timings.txt (not committed). Ensure the
steps, examples, and file names in that paragraph match the Python workflow and
remove any remaining shell-specific commands.
🪄 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: 0b741098-00a8-462c-af04-9e62e5f625af
📒 Files selected for processing (2)
openspec/changes/archive/2026-05-23-less-tests/design.mdopenspec/specs/test-suite-efficiency/spec.md
3280a3d to
b021b1c
Compare
6d7ca28 to
d22f70c
Compare
b021b1c to
865bd36
Compare
d22f70c to
d85d6da
Compare
865bd36 to
aafc660
Compare
d85d6da to
31d8ac1
Compare
aafc660 to
001e3bc
Compare
31d8ac1 to
d6108f2
Compare
001e3bc to
57df5d2
Compare
d6108f2 to
5df3846
Compare
57df5d2 to
c10ebf4
Compare
5df3846 to
0cd6538
Compare
c10ebf4 to
51b21ab
Compare
0cd6538 to
88ea6bf
Compare
51b21ab to
3479580
Compare
88ea6bf to
08793ed
Compare
Address two review comments from PR #1245: - design.md: The profiling tool was implemented as Python (dev-scripts/profile-tests.py), not an awk/jq pipeline. Update the D1 rationale to reflect the actual implementation. - spec.md: The "writes the ranking to a file" step contradicts running inside nix flake check, where the source tree is read-only (Nix sandbox). Qualify the requirement as local execution only so the spec no longer contradicts itself.
08793ed to
4193fe9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1246 +/- ##
=====================================
Coverage 5.50% 5.50%
=====================================
Files 6 6
Lines 400 400
=====================================
Hits 22 22
Misses 374 374
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- 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]>
…1251) ## 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 - **cache:** touch `nar_file` by fetched row ID, not by narURL fields — `getNarFileFromDB` can return a `compression=none` fallback whose key differs from `narURL`, causing stale `last_accessed_at` and LRU regressions (#1206) - **cache:** fail fast on `nil` eager-loaded chunk edges in `streamCompleteChunks` and `streamProgressiveChunks` instead of silently `continue`-ing, which caused count mismatches or infinite re-streaming (#1207) - **cache:** include `narURLsToRemove` in the LRU early-return guard so orphaned `NarFile` blobs are passed to `parallelDeleteFromStores` instead of being silently leaked in storage (#1215) - **cache:** log a warning when LRU candidate fetch hits the `maxFetchRows` cap so operators know eviction scanned only a partial window (#1206) - **cache/relink:** lower `relinkBatchSize` from 500 → 499 to stay under SQLite's 999-placeholder limit (500 rows × 2 binds = 1000 > 999) (#1208) - **database:** close `*sql.DB` in `Open()` when `NewClient` fails (#1208) - **migrate/adopt:** use `ErrUnknownState` (not `ErrUnknownDialect`) for unrecognised `State` values — fixes false-positive `errors.Is` checks (#1188) - **generate-migrations:** `parseSkip` validates dialect names, returning an error on unknown values like `"myslq"` instead of silently skipping them (#1187) - **generate-migrations:** `--sql-only` path now calls `ensureAtlasSum` after writing the stub so `atlas.sum` stays in sync (#1187) - **generate-migrations:** `runDialect` now returns the generated file path and prints it to stdout; `main()` warns when a second boundary falls between dialect runs so callers know to re-run for a consistent timestamp set (#1215) - **generate-migrations:** add `"empty"` to `validateName` reject list (#1185) - **nix/ent-lint-check:** add `set -o pipefail` so `ent-lint | tee` propagates a non-zero exit through the pipeline (#1221) - **e2e:** fix docstring path (`var/ncps/e2e-results/` → `.e2e-results/`); `mc mb` and `redis-cli flushall` now use `check=True` so reset failures abort the test immediately (#1233) - **e2e:** `stop_ncps` now verifies the port closes within timeout; `wait_ready` exits early if the child process dies before becoming ready (#1233) - **run.py:** guard `dbmate` usage with a `shutil.which` check so a missing binary fails fast with a clear message instead of an obscure error (#1234) - **CI:** pin all external GitHub Action refs to immutable commit SHAs to prevent supply-chain mutation (#1223) - **CI:** remove `release-*` from pull_request/push triggers; add `go.mod` and `go.sum` to the ent paths-filter (#1235) - **docs:** replace distroless-incompatible `wget` healthcheck in Docker Compose example with `garage status` (#1223) ### Test fixes - Replace non-fatal `assert.Len` → `require.Len` before indexing `stamps[0..2]` in `generate-migrations` tests (#1185) - Add 60 s timeout to the one-time `go build` in the test setup (#1241) - Fix `cache_prefetch_test.go` to look up `nar_file` by `(hash, compression, query)` instead of hard-coded `id=1` (#1218) - Apply `NarSize` fallback when `FileSize == 0` in `testhelper/sqlite.go` to avoid impossible `file_size=0` fixture rows for `compression=none` narinfos (#1218) - Increase `chunkingDelay` from 500 ms → 1 s in `cdc_test.go` to reduce flakiness on slow CI machines (#1217) - Replace `Lock`-with-timeout with `TryLock` in `cache_distributed_test.go` to avoid spurious failures when the lock-hold window is tight (#1217) ### Docs / skills - Quote PostgreSQL DSNs in shell-command examples to prevent `?`-glob expansion by shells (#1234) - `migrate-new/SKILL.md`: ent-lint checks A1, A2, A4 — not all five invariants as previously stated (#1225) - `migrate-down/SKILL.md`: clarify that `DROP COLUMN` is sensitive/forbidden DDL per 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 (#1225) - `openspec/changes/archive/2026-05-23-less-tests/`: fix stale paths, add `bash` fence tag, replace "branch coverage" with "statement/block coverage" (#1245) - `openspec/specs/test-suite-efficiency/spec.md`: same coverage terminology fix (#1245) - `openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/design.md`: add language tag to decision-tree fence block; fix grammar (#1186) - `openspec/changes/archive/2026-05-21-migrate-to-ent-and-atlas/tasks.md`: update §10.1/§11.1 notes to reflect that `*database.Client` threading was completed in §11, not deferred (#1191, #1192) ## Test plan - [x] `nix flake check` (includes all unit + integration tests, lint, ent-lint, atlas-sum, helm-unittest, schema-equivalence) - [x] `go test -race ./...` locally with `eval "$(enable-integration-tests)"` - [x] Verify all referenced GitHub threads are marked resolved 🤖 Generated with [Claude Code](https://claude.ai/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Address two review comments from PR #1245:
design.md: The profiling tool was implemented as Python
(dev-scripts/profile-tests.py), not an awk/jq pipeline.
Update the D1 rationale to reflect the actual implementation.
spec.md: The "writes the ranking to a file" step contradicts
running inside nix flake check, where the source tree is
read-only (Nix sandbox). Qualify the requirement as local
execution only so the spec no longer contradicts itself.