Make per-file IO error test deterministic #44

Merged
pdurlej merged 1 commit from codex/unblock-ci-per-file-error-test into main 2026-05-18 23:16:32 +02:00
Collaborator

Canary Context Pack

Product story

The alpha release train is blocked because every open fork PR fails the same CI test. The failing test depends on chmod-based unreadability, which is not deterministic in Forgejo's Docker runner.

What changed

  • Added a narrow AnalyzeOptions.readSourceFile seam used only when indexing discovered source files.
  • Reworked the per-file IO error regression test to inject a deterministic EACCES for one discovered file instead of relying on chmod 000.
  • Exported the AnalyzeOptions type with the public analyze API.

Why it changed

The previous test passed locally but failed in CI because the runner could still read a chmod 000 file. This made PRs #40, #41, #42, and #43 fail for an environmental reason unrelated to their changes.

Files touched

  • src/analyze.ts
  • src/index.ts
  • tests/analyze.test.mjs

Relevant context

This is an unblocker PR for the parallel alpha release train. It should merge before #40-#43, then those PRs can be rebased or updated onto the fixed test.

Runtime evidence

  • npm run build
  • node --test tests/analyze.test.mjs
  • npm test — 32/32 passing
  • npm run release:smoke
  • node dist/cli.js analyze --root . --format json --output /tmp/fallow-ts-report.json
  • node dist/cli.js analyze --root examples/demo-project --format text
  • git diff --check

Known constraints

The new option is intentionally narrow: it only overrides source-file reads during indexing. Package metadata and workspace metadata still use the normal filesystem path.

Coordination notes

After this merges, update/rebase #40 first, then #43, #41, #42 in that order.

Explicit out-of-scope

No version changes, no package distribution changes, no CI matrix changes, no docs wave changes, no analyzer categories.

Requested decision

Approve merge if the test seam is acceptable as the smallest stable way to keep the per-file error behavior covered in CI.

Merge blockers

Public API concern around AnalyzeOptions, failing CI, or a simpler deterministic test mechanism that does not depend on runner permissions.

## Canary Context Pack ### Product story The alpha release train is blocked because every open fork PR fails the same CI test. The failing test depends on chmod-based unreadability, which is not deterministic in Forgejo's Docker runner. ### What changed - Added a narrow `AnalyzeOptions.readSourceFile` seam used only when indexing discovered source files. - Reworked the per-file IO error regression test to inject a deterministic `EACCES` for one discovered file instead of relying on `chmod 000`. - Exported the `AnalyzeOptions` type with the public analyze API. ### Why it changed The previous test passed locally but failed in CI because the runner could still read a `chmod 000` file. This made PRs #40, #41, #42, and #43 fail for an environmental reason unrelated to their changes. ### Files touched - `src/analyze.ts` - `src/index.ts` - `tests/analyze.test.mjs` ### Relevant context This is an unblocker PR for the parallel alpha release train. It should merge before #40-#43, then those PRs can be rebased or updated onto the fixed test. ### Runtime evidence - `npm run build` - `node --test tests/analyze.test.mjs` - `npm test` — 32/32 passing - `npm run release:smoke` - `node dist/cli.js analyze --root . --format json --output /tmp/fallow-ts-report.json` - `node dist/cli.js analyze --root examples/demo-project --format text` - `git diff --check` ### Known constraints The new option is intentionally narrow: it only overrides source-file reads during indexing. Package metadata and workspace metadata still use the normal filesystem path. ### Coordination notes After this merges, update/rebase #40 first, then #43, #41, #42 in that order. ### Explicit out-of-scope No version changes, no package distribution changes, no CI matrix changes, no docs wave changes, no analyzer categories. ### Requested decision Approve merge if the test seam is acceptable as the smallest stable way to keep the per-file error behavior covered in CI. ### Merge blockers Public API concern around `AnalyzeOptions`, failing CI, or a simpler deterministic test mechanism that does not depend on runner permissions.
Make per-file IO error test deterministic
All checks were successful
CI / test (push) Successful in 16s
CI / test (pull_request) Successful in 15s
1f6e3fc666
The previous test used chmod 000 to force EACCES, which is not reliable in Forgejo's Docker runner when tests execute with permissions that can still read the file. Add a narrow readSourceFile test seam to analyze() and inject a deterministic EACCES for the discovered file instead.

Verified:

- npm run build

- node --test tests/analyze.test.mjs

- npm test

- npm run release:smoke

- node dist/cli.js analyze --root . --format json --output /tmp/fallow-ts-report.json

- node dist/cli.js analyze --root examples/demo-project --format text

- git diff --check
codex requested review from claude 2026-05-18 23:12:33 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/fallow-ts!44
No description provided.