Skip to content

fix(lint): exclude gitignored scripts/dev from the widened lint/typecheck scope - #930

Merged
admarble merged 1 commit into
mainfrom
fix/lint-scope-excludes-gitignored-scripts-dev
Aug 10, 2026
Merged

admarble merged 1 commit into
mainfrom
fix/lint-scope-excludes-gitignored-scripts-dev

Conversation

@admarble

@admarble admarble commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #928, which widened npm run lint to scripts/ and added tsconfig.scripts.json. Both then reached scripts/dev/ — gitignored developer scratch with zero tracked files (.gitignore:65).

That directory does not exist in CI, so CI went green while npm run lint failed for every developer who has it:

scripts/dev/tui-demo.tsx
  0:0  error  Parsing error: "parserOptions.project" has been provided for @typescript-eslint/parser.
  The file was not found in any of the provided project(s): scripts/dev/tui-demo.tsx

The eslint override #928 added matches scripts/**/*.ts, so the .tsx file had no project to resolve against. Rather than extend the override to .tsx, the directory is excluded from both tools: linting untracked scratch is meaningless, and any rule applied there can only ever fail locally and never in CI.

A second trap, worth recording

Adding exclude to tsconfig.scripts.json surfaced this: exclude replaces the inherited list rather than extending it. The first attempt dropped the base's **/*.test.ts entry, pulled test files into the project, and surfaced three pre-existing errors in lint-skill-calls.test.ts. The base entries are now repeated verbatim with a comment explaining why they cannot be omitted.

Worth knowing generally: any extends + exclude combination in this repo has the same hazard.

Verification

Gate Result
npm run lint ✅ (was failing on main)
npm run typecheck:scripts ✅
npx tsc --noEmit ✅
npm run build ✅
scripts/spec/ suite ✅ 50 tests

CI behavior is unchanged by construction — scripts/dev/ is absent there, so both settings are no-ops in CI. That asymmetry is exactly what made the original defect invisible, so it is stated here rather than inferred from a green run.

🤖 Generated with Claude Code

…heck scope

#928 widened `npm run lint` to `scripts/` and added `tsconfig.scripts.json`.
Both then reached `scripts/dev/` — gitignored developer scratch with zero
tracked files (.gitignore:65). That directory does not exist in CI, so CI
went green while `npm run lint` failed for every developer who had it:

    scripts/dev/tui-demo.tsx
      0:0  error  Parsing error: "parserOptions.project" has been provided
      The file was not found in any of the provided project(s)

The eslint override added in #928 matches `scripts/**/*.ts`, so the `.tsx`
file had no project to resolve against. Rather than extend the override to
`.tsx`, the directory is excluded outright from both tools: linting
untracked scratch is meaningless, and any rule applied there can only ever
fail locally and never in CI.

Adding `exclude` to `tsconfig.scripts.json` exposed a second trap: `exclude`
REPLACES the inherited list rather than extending it. The first attempt
dropped the base's `**/*.test.ts` entry and pulled test files into the
project, surfacing three pre-existing errors in `lint-skill-calls.test.ts`.
The base entries are now repeated verbatim with a comment saying why.

Verified: lint, typecheck, typecheck:scripts, build and the scripts/spec
suite (50 tests) all pass. CI behavior is unchanged — `scripts/dev/` is
absent there, so both settings are no-ops in CI by construction.

Entire-Checkpoint: e57435dd8109
@admarble
admarble merged commit 93a7483 into main Aug 10, 2026
5 checks passed
@admarble
admarble deleted the fix/lint-scope-excludes-gitignored-scripts-dev branch August 10, 2026 05:43
admarble added a commit that referenced this pull request Aug 21, 2026
…ossy prose-scrape gap channel (#954)

* feat(qa/loop/ready): structured gap findings (#937)

Replace the lossy prose-scrape gap channel between /qa, /loop, and
`sequant ready` with a finite six-category taxonomy carrying required
evidence, emitted as a SEQUANT_QA_GAPS marker and consumed by every
existing gap consumer.

- GapFinding schema (run-log-schema.ts): six categories, required
  evidence, recommendedAction of fix_now/document/pause_for_human.
- qa-gaps-marker.ts parses the marker; parseQaSummary unions marker
  findings with the legacy prose scrape (never replaces), so an
  unclassifiable finding is never dropped.
- /qa's Simple Fix and Standard templates (all three skill dirs) emit
  the marker via new §6j.
- /loop and ready-gate.ts/batch-executor.ts exclude document/
  pause_for_human findings from the fix loop (selectFixableGaps) — the
  structural fix for the #930 regression class. /loop's dead
  `### Required Fixes` extraction (a heading no QA template ever
  emitted) is replaced with marker parsing.
- ReadyGapItem gains the taxonomy fields; sequant ready persists its
  final gap report (with marker) as an issue comment on any terminal
  state carrying a QA verdict, closing the terminal-scrollback hole.

Closes #937

* fix(loop): strip fenced/inline code before matching SEQUANT_QA_GAPS marker

/loop's shell-side marker extraction (grep -oE + sed) had no fenced-code-
block awareness, unlike every TS-side parser for the durable-marker family
(parseQaGapsMarker, parseMutationMarkers, parsePhaseMarkers), which all call
stripMarkdownCode first. A marker quoted inside a code fence — e.g. this
skill's own "QA Log Example" — would be mistaken for a real one.

Replace the grep/sed + node-JSON.parse two-step with a single node -e that
strips fenced/inline code (mirroring stripMarkdownCode's regexes) before
matching, and picks the LAST marker if more than one survives (latest-wins,
matching parseQaGapsMarker's semantics). Verified against 6 samples,
including the fence-quoted marker and a stress case with both a fenced fake
marker and a real trailing one.

Follow-up from #937 QA (PR #954).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant