Complete Wave 1 contract credibility #22

Merged
pdurlej merged 5 commits from codex/wave1-contract-credibility into codex/prewave-deterministic-contract 2026-05-17 00:18:47 +02:00
Collaborator

Canary Context Pack

Product story

Wave 1 makes the first fallow-ts output contract credible enough for agents to consume without guessing. The tool remains intentionally small: module syntax coverage, package/workspace metadata, golden output tests, and schema docs.

What changed

  • Added module syntax fixture coverage for ESM, CommonJS, dynamic imports, type imports/exports, side-effect imports, and re-exports.
  • Added root package.json metadata to the report.
  • Added npm/yarn/pnpm workspace declaration metadata without resolver magic.
  • Added byte-for-byte golden JSON/text output tests.
  • Documented report schema v0.

Why it changed

This completes Wave 1 from docs/roadmap.md after the pre-wave fixes from issue #17. The goal is contract credibility before Wave 2 adds graph behavior.

Files touched

  • src/analyze.ts
  • src/types.ts
  • src/index.ts
  • README.md
  • docs/report-schema-v0.md
  • tests/analyze.test.mjs
  • tests/golden.test.mjs
  • tests/fixtures/module-syntax/**
  • tests/fixtures/golden-basic/**
  • tests/golden/**

Relevant context

Stacked on PR #21 (codex/prewave-deterministic-contract). Earlier pre-wave PRs address governance, parser correctness, hostile input handling, and deterministic root/schema behavior.

Runtime evidence

  • npm run build
  • npm test
  • node dist/cli.js analyze --root . --format json --output /tmp/fallow-ts-report.json
  • npm pack --dry-run
  • git diff --check

Known constraints

The parser is still regex-based. Workspace metadata is shallow and does not imply package resolution. No findings/categories are added in this PR.

Explicit out-of-scope

No resolver, no dependency policy, no unused export analysis, no MCP server, no package graph semantics.

Requested decision

Review and approve as the Wave 1 merge-train PR after PR #18, #19, #20, and #21 are merged bottom-up.

Merge blockers

Broken golden contract, untrue schema docs, or any accidental claim that v0 resolves workspaces/imports semantically.

Closes #2.
Closes #3.
Closes #4.
Closes #5.
Closes #6.
Refs #17.

## Canary Context Pack ### Product story Wave 1 makes the first fallow-ts output contract credible enough for agents to consume without guessing. The tool remains intentionally small: module syntax coverage, package/workspace metadata, golden output tests, and schema docs. ### What changed - Added module syntax fixture coverage for ESM, CommonJS, dynamic imports, type imports/exports, side-effect imports, and re-exports. - Added root package.json metadata to the report. - Added npm/yarn/pnpm workspace declaration metadata without resolver magic. - Added byte-for-byte golden JSON/text output tests. - Documented report schema v0. ### Why it changed This completes Wave 1 from docs/roadmap.md after the pre-wave fixes from issue #17. The goal is contract credibility before Wave 2 adds graph behavior. ### Files touched - src/analyze.ts - src/types.ts - src/index.ts - README.md - docs/report-schema-v0.md - tests/analyze.test.mjs - tests/golden.test.mjs - tests/fixtures/module-syntax/** - tests/fixtures/golden-basic/** - tests/golden/** ### Relevant context Stacked on PR #21 (`codex/prewave-deterministic-contract`). Earlier pre-wave PRs address governance, parser correctness, hostile input handling, and deterministic root/schema behavior. ### Runtime evidence - npm run build - npm test - node dist/cli.js analyze --root . --format json --output /tmp/fallow-ts-report.json - npm pack --dry-run - git diff --check ### Known constraints The parser is still regex-based. Workspace metadata is shallow and does not imply package resolution. No findings/categories are added in this PR. ### Explicit out-of-scope No resolver, no dependency policy, no unused export analysis, no MCP server, no package graph semantics. ### Requested decision Review and approve as the Wave 1 merge-train PR after PR #18, #19, #20, and #21 are merged bottom-up. ### Merge blockers Broken golden contract, untrue schema docs, or any accidental claim that v0 resolves workspaces/imports semantically. Closes #2. Closes #3. Closes #4. Closes #5. Closes #6. Refs #17.
Cover ESM, CommonJS, dynamic imports, side-effect imports, type imports, multiline imports, and re-exports with fixture-backed analyzer assertions.

Closes #2.

Verified:

- npm run build

- npm test

- git diff --check
Read root package.json fields needed for later graph work while keeping current analysis semantics unchanged and malformed metadata non-fatal.

Closes #3.

Verified:

- npm run build

- npm test

- git diff --check
Closes #4.

Verified:

- npm run build

- npm test

- node dist/cli.js analyze --root tests/fixtures/module-syntax --format json --output /tmp/fallow-ts-module-syntax.json

- git diff --check
Closes #5.

Verified:

- npm run build

- npm test

- node dist/cli.js analyze --root tests/fixtures/golden-basic --format json --output /tmp/fallow-ts-golden-basic.json

- cmp -s tests/golden/basic-report.json /tmp/fallow-ts-golden-basic.json

- git diff --check
Document v0 report contract
Some checks failed
CI / test (push) Failing after 13s
CI / test (pull_request) Failing after 13s
ff975d73cd
Closes #6.

Verified:

- npm run build

- npm test

- git diff --check
pdurlej merged commit 17fbae61e7 into codex/prewave-deterministic-contract 2026-05-17 00:18:47 +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!22
No description provided.