Skip to content

docs: fix awk/jq→Python and Nix sandbox spec - #1246

Merged
kalbasit merged 1 commit into
mainfrom
gs-comments-1241-1245
May 23, 2026
Merged

kalbasit merged 1 commit into
mainfrom
gs-comments-1241-1245

Conversation

@kalbasit

Copy link
Copy Markdown
Owner

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.

@coderabbitai

coderabbitai Bot commented May 23, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Updated design documentation to clarify test output analysis approach.
    • Updated test suite efficiency specification to explicitly define output file requirements for local profiling runs.

Walkthrough

Documentation updates clarify test-suite profiling methodology across the design rationale and specification. The design document explains that go test -json output is analyzed with a small Python script rather than awk/jq, while the specification explicitly requires deterministic output file placement under designated directories.

Changes

Test-suite profiling documentation

Layer / File(s) Summary
Profiling methodology and spec clarifications
openspec/changes/archive/2026-05-23-less-tests/design.md, openspec/specs/test-suite-efficiency/spec.md
Design doc updated to specify Python script analysis of -json output; spec clarified to explicitly require deterministic output file placement under dev-scripts/ or openspec/changes/<change>/.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through words with care,
Python scripts dance in the air,
Output files now clearly placed,
Profiling paths elegantly traced! 🐰📝

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main changes: fixing documentation to reflect Python implementation instead of awk/jq, and clarifying the Nix sandbox spec constraint.
Description check ✅ Passed The description directly relates to the changeset by explaining the two key updates made to design.md and spec.md, referencing the review comments they address.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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


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

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

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3280a3d and 6d7ca28.

📒 Files selected for processing (2)
  • openspec/changes/archive/2026-05-23-less-tests/design.md
  • openspec/specs/test-suite-efficiency/spec.md

@kalbasit
kalbasit force-pushed the chore-archive-less-tests branch from 3280a3d to b021b1c Compare May 23, 2026 21:51
@kalbasit
kalbasit force-pushed the gs-comments-1241-1245 branch from 6d7ca28 to d22f70c Compare May 23, 2026 21:51
@kalbasit
kalbasit force-pushed the chore-archive-less-tests branch from b021b1c to 865bd36 Compare May 23, 2026 22:03
@kalbasit
kalbasit force-pushed the gs-comments-1241-1245 branch from d22f70c to d85d6da Compare May 23, 2026 22:03
@kalbasit
kalbasit force-pushed the chore-archive-less-tests branch from 865bd36 to aafc660 Compare May 23, 2026 22:17
@kalbasit
kalbasit force-pushed the gs-comments-1241-1245 branch from d85d6da to 31d8ac1 Compare May 23, 2026 22:17
@kalbasit
kalbasit force-pushed the chore-archive-less-tests branch from aafc660 to 001e3bc Compare May 23, 2026 22:28
@kalbasit
kalbasit force-pushed the gs-comments-1241-1245 branch from 31d8ac1 to d6108f2 Compare May 23, 2026 22:28
@kalbasit
kalbasit force-pushed the chore-archive-less-tests branch from 001e3bc to 57df5d2 Compare May 23, 2026 22:45
@kalbasit
kalbasit force-pushed the gs-comments-1241-1245 branch from d6108f2 to 5df3846 Compare May 23, 2026 22:45
@kalbasit
kalbasit force-pushed the chore-archive-less-tests branch from 57df5d2 to c10ebf4 Compare May 23, 2026 22:58
@kalbasit
kalbasit force-pushed the gs-comments-1241-1245 branch from 5df3846 to 0cd6538 Compare May 23, 2026 22:58
@kalbasit
kalbasit force-pushed the chore-archive-less-tests branch from c10ebf4 to 51b21ab Compare May 23, 2026 23:11
@kalbasit
kalbasit force-pushed the gs-comments-1241-1245 branch from 0cd6538 to 88ea6bf Compare May 23, 2026 23:11
@kalbasit
kalbasit force-pushed the chore-archive-less-tests branch from 51b21ab to 3479580 Compare May 23, 2026 23:25
@kalbasit
kalbasit force-pushed the gs-comments-1241-1245 branch from 88ea6bf to 08793ed Compare May 23, 2026 23:25
Base automatically changed from chore-archive-less-tests to main May 23, 2026 23:37
@dosubot dosubot Bot removed the size:XS This PR changes 0-9 lines, ignoring generated files. label May 23, 2026
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label May 23, 2026
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.
@kalbasit
kalbasit force-pushed the gs-comments-1241-1245 branch from 08793ed to 4193fe9 Compare May 23, 2026 23:37
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels May 23, 2026
@kalbasit
kalbasit enabled auto-merge (squash) May 23, 2026 23:37
@codecov

codecov Bot commented May 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 5.50%. Comparing base (4bbf78b) to head (4193fe9).

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.
📢 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
kalbasit merged commit 6a7ec88 into main May 23, 2026
23 checks passed
@kalbasit
kalbasit deleted the gs-comments-1241-1245 branch May 23, 2026 23:50
kalbasit added a commit that referenced this pull request May 24, 2026
- 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]>
kalbasit added a commit that referenced this pull request May 24, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation merge-stack size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant