Repository navigation
feat(#69): add lib-checked typecheck script and AGENTS.md policy - #70
Conversation
tsconfig.json sets skipLibCheck, so `tsc` hides .d.ts errors caused by the repo being held on TypeScript 4.9 (react-scripts 5 peer range). @types/node 22.20.5 passed that way (#61) but fails with TS2502 when lib checking is on. - package.json: add `typecheck` (tsc --project tsconfig.typecheck.json). - tsconfig.typecheck.json: extends tsconfig.json with skipLibCheck: false. build/start still use tsconfig.json unchanged. - typecheck/ts4.9-shims.d.ts: styled-components 6.6.0 typings use the global NoInfer type (TS 5.4+), which made the lib-checked run fail on main with 7 TS2304 errors. Declare the same fallback that styled-components exports, loaded only by the typecheck config. - AGENTS.md: document the TS 4.9 dependency policy, how to check typeScriptVersion and the ts4.9 dist-tag, the @types/node pin, the validation command, and the exit condition. Verified: typecheck passes on main. With @types/node@22.20.5 plain `tsc --noEmit` passes but `npm run typecheck` fails (TS2502). With @types/jest@30.0.0 it fails too (TS2726). lint, build and CI=true npm test pass. .github/dependabot.yml is unchanged to avoid conflicting with #68; the @types/jest guidance is recorded in AGENTS.md instead. Closes #69 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 12:40 PM UTC · Completed 1:07 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $5.17 |
|
<!-- fullsend:risk-assessment --> DetailsBot-authored docs-and-config PR with small blast radius and all acceptance criteria met; held at moderate rather than low because of one protected path (AGENTS.md), one dependency manifest touched (package.json, script-only), and package.json's high recent churn. |
ReviewFindingsMedium
Low
Labels: PR adds an AGENTS.md policy document and typecheck tooling, matching the documentation label on linked issue #69. Next steps:
|
|
🤖 Finished Fix · ✅ Success · Started 1:08 PM UTC · Completed 1:13 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $0.62 |
- AGENTS.md exit condition: remove the NoInfer shim only once TypeScript is >= 5.4, matching the shim's own comment (TS 5.0-5.3 lack NoInfer). - AGENTS.md validation: list the four commands separately and say to run the last three even if one fails, so each result can be reported. - Shim comment and AGENTS.md: note that src must not use NoInfer, since the shim hides it from typecheck while build/start/test would fail. Not changed: the protected-path finding on AGENTS.md is a merge gate that needs human approval, not a content edit. Addresses #70 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔧 Fix agent — iteration 1 (bot-triggered)Fixed all three low-severity findings: the exit condition now removes the NoInfer shim only once TypeScript is 5.4 or later, the validation commands run separately so each result can be reported, and the shim comment and AGENTS.md say src must not use NoInfer. Disagreed with the protected-path finding because it is a merge gate that needs human approval. npm run typecheck, npm run lint and CI=true npm test (19 suites, 40 tests) pass, and prettier passes on the changed files. Fixed (4):
Disagreed (1):
Tests: passed CI inspections (3):
Conflict update: skipped; strategy Decision points
Next steps:
|
|
🤖 Finished Review · ❌ Failure (validation failed after 1 iteration(s)) · Started 1:14 PM UTC · Completed 1:21 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $2.92 |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 1:28 PM UTC · Completed 1:37 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $3.75 |
|
🤖 Finished Retro · ✅ Success · Started 1:35 PM UTC · Completed 1:49 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $4.33 |
|
Review skipped — this PR is already merged. The Posted by fullsend post-review check |
Retro: PR #70 (lib-checked
|
* docs(#71): list @types/jest ignore rule, fix npm test claim AGENTS.md drifted from .github/dependabot.yml: PR #64 added a Dependabot ignore rule for @types/jest >=28 while PR #70 was open, so the merged AGENTS.md never mentioned it. - Pinned versions: note that Dependabot ignores @types/jest >=28, and document the react-scripts major-update ignore rule so every npm ignore entry is described. - Exit condition: add the @types/jest rule, relaxed only when react-scripts/Jest 27 is replaced, not when only TypeScript is raised. - NoInfer paragraph: only build and start type-check (via fork-ts-checker) and fail with TS2304; CI=true npm test uses babel-jest, which strips types, so it still passes. npm run build is the step that catches it. Docs-only change. Verified with prettier 3.9.10 --check. Closes #71 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(#71): address review feedback on PR #72 Narrow the NoInfer guidance in AGENTS.md: `npm run build` catches a NoInfer only in application code. CRA 5.0.1 configures fork-ts-checker to skip test files (*.test.*, *.spec.*, __tests__/, setupTests.*, setupProxy.*), so no validation command catches it there. Tell agents not to use NoInfer in test files either. The protected-path finding needs no change (human approval of the AGENTS.md edit is a merge gate, not a content change). Verification: npx prettier@3.9.10 --check AGENTS.md passes. npm test and eslint were not run: documentation-only change and node_modules is not installed in the sandbox. Addresses #72 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: fullsend-code <278716306+fullsend-ai-coder[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
This adds a
typechecknpm script that checks third-party typings, and a repo-rootAGENTS.mdthat records the TypeScript 4.9 dependency policy for agents and humans.package.json"typecheck": "tsc --project tsconfig.typecheck.json"tsconfig.typecheck.jsontsconfig.jsonand setsskipLibCheck: false.build/startstill usetsconfig.json, unchanged.typecheck/ts4.9-shims.d.tsNoInferfallback, loaded only by the typecheck config (see the exception below).AGENTS.mdtypeScriptVersionand thets4.9dist-tag, the@types/nodepin, the validation command, the missing CI, and the exit condition.Why the script isn't just
tsc --noEmit --skipLibCheck falseThe issue suggested that literal command. On main (
38faaa8) it fails with 7 errors, all instyled-components@6.6.0:This is the same TS-version problem, not an unrelated one. styled-components 6.5+ uses the global
NoInferutility type, which only exists in TypeScript 5.4+. Version 6.1.19 defined its own; 6.5.0 and 6.6.0 rely on the built-in. TodayskipLibCheck: truehides it, so in the normal build those types quietly turn intoany.How it's scoped:
typecheck/ts4.9-shims.d.tsdeclarestype NoInfer<T> = [T][T extends any ? 0 : never], the same fallback styled-components exports fromdist/utils/noInfer. Onlytsconfig.typecheck.jsonincludes it. Remove it when TypeScript is raised to 5.4 or later. AGENTS.md documents this. I didn't downgrade styled-components because that is outside this issue's scope.No other
.d.tserrors came up. Several auto-included typings declaretypeScriptVersion5.x but still lib-check cleanly under 4.9 (@types/react@19.3.0,@types/react-dom@19.3.0,@types/ws,@types/semver,@types/estree). So AGENTS.md callstypeScriptVersionadvisory and treatsnpm run typecheckas the authoritative check. A strict "must declare ≤4.9" rule would already be broken on main by@types/react, whichreact@19needs.Testing
All runs used TypeScript 4.9.5 and Node 22.22.1.
npm run typecheckon this branch: passes (exit 0)npm install --no-save @types/node@22.20.5:npx tsc --noEmit(default config): passes. This is the false green from fix(#60): restore TypeScript 4.9 and ignore TS majors in dependabot #61.npm run typecheck: fails with 2× TS2502npm install --no-save @types/jest@30.0.0(PR chore(deps-dev): bump @types/jest from 27.4.1 to 30.0.0 #64):npm run typecheckfails. It reports TS2726Cannot find lib definition for 'esnext.disposable'in the bundledjest-mocktypings, plus TS2339 for the removedtoBeCalledTimesalias insrc/commons/Checkbox/Checkbox.test.tsx.npm ci,npm run typecheckpasses again.npm run lint,npm run buildandCI=true npm testall pass: 19 suites, 40 tests, 13 snapshots.prettier --checkpasses on all changed files. commitlint passes on the commit message.Notes
@types/jestDependabot ignore) is not included. The registry shows@types/jest'sts4.9dist-tag is29.5.14, and30.0.0declarestypeScriptVersion5.1. The triage noted that open PR ci(deps): label npm Dependabot PRs for the fullsend fix agent #68 also edits.github/dependabot.yml. To avoid a conflict, the guidance is in AGENTS.md instead: keep@types/jeston 27.x to match thejest@27runtime from react-scripts 5, and 30.0.0 fails typecheck. A follow-up can addversions: [">=28"]if maintainers want it enforced..github/workflows/files are touched.🤖 Generated with Claude Code
Closes #69
Post-script verification
agent/69-typecheck-agents-md)38faaa85ae9a8b518aba9eed734a8e7ce07869b9..HEAD)