Skip to content

fix(meta-rules): exclude .gen.tsx from source-text scan; close 3 test gaps#42

Merged
agjs merged 1 commit into
mainfrom
fix/scannable-tsx-and-test-gaps
Jun 22, 2026
Merged

fix(meta-rules): exclude .gen.tsx from source-text scan; close 3 test gaps#42
agjs merged 1 commit into
mainfrom
fix/scannable-tsx-and-test-gaps

Conversation

@agjs

@agjs agjs commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Harness review sweep (all 12 subsystems)

Full adversarial /harness-review all after v0.18.4. 11 subsystems clean, 0 P1s. This PR lands the one ship-worthy code finding plus three missing-regression-test gaps.

P2 (real, with masking test) — isScannableSource excludes .gen.tsx

src/meta-rules/rules/source-text/is-scannable.ts matched .tsx (/\.[cm]?tsx?$/u) but its generated-file exclusion (!/\.gen\.[cm]?ts$/u) had no x? — so a generated *.gen.tsx was scanned by no-eslint-disable-comments / no-ts-suppressions and flagged for its own vendored eslint-disable/@ts-nocheck banner.

Latent (no .gen.tsx producer in-tree today), but the existing regression test rigged itself around the gap: isScannableSource(\src/routeTree.gen.${ext === "tsx" ? "ts" : ext}`)quietly substituted.gen.tsfor thetsx` case. De-rigged — reverting the source fix now fails the test (verified).

  • Fix: !/\.gen\.[cm]?tsx?$/u + doc comment *.gen.{ts,tsx,mts,cts}.

P2 (missing regression tests for verified-but-unguarded contracts)

  • gate fallbackMessage() (src/validate/validate.ts) — 1200-char cap + eslint-JSON drop + truncation marker had zero coverage (the prior "vacuous cap test" suspicion). Now exported + unit-tested with >1200-char input.
  • lib/fs runArgvCommand() — missing binary → exit 127, never a throw (the Bun.spawn catch path).
  • inference wire — DeepSeek reasoning_content capture→replay round-trip, and omission for non-DeepSeek providers.

Verification

bun run validate: 1337 pass, 0 fail. Each new test confirmed to fail against the un-fixed code where applicable.

Subsystems verified clean

loop/turn, tools, gate, oracles, browser, inference, render/CLI, mcp, web-scaffold, setup/conventions, lib/fs — all invariants checked against source + tests with repros.

… gaps

isScannableSource matched `.tsx` but its generated-file exclusion regex
(`!/\.gen\.[cm]?ts$/u`) had no `x?`, so a generated `*.gen.tsx` was scanned
by no-eslint-disable-comments / no-ts-suppressions and flagged for its own
vendored banner. The regression test rigged itself around the gap
(`ext === "tsx" ? "ts" : ext`); de-rig it so it bites.

Also add regression tests for three verified-but-unguarded harness contracts
surfaced by the subsystem sweep:
- gate fallbackMessage(): 1200-char cap + eslint-JSON drop + truncation marker
- lib/fs runArgvCommand(): missing binary -> exit 127, never a throw
- inference wire: DeepSeek reasoning_content capture -> replay round-trip
  (and that it's omitted for non-DeepSeek providers)

fallbackMessage is now exported for direct unit testing.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the isScannableSource helper to correctly ignore generated .tsx files, exports and adds unit tests for the fallbackMessage utility, adds tests for DeepSeek reasoning_content capturing and replaying, and introduces a test to ensure running a missing binary returns exit code 127 instead of throwing. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@agjs agjs merged commit 593d5eb into main Jun 22, 2026
8 checks passed
@agjs agjs deleted the fix/scannable-tsx-and-test-gaps branch June 22, 2026 06:14
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