Run typecheck in CI - #18
Draft
ada33-arch wants to merge 2 commits into
Draft
Conversation
ada33-arch
force-pushed
the
claude/agents-sdk-typescript-setup-wwe1a9
branch
from
August 2, 2026 19:18
64cf7a3 to
6a0a035
Compare
Nothing in the pipeline guarded the TypeScript, so a type error could land on main with CI green. Adds a typecheck job that sets up Node, installs from the lockfile with npm ci, and runs npm run typecheck. It is a separate job rather than a step on lifecycle-demo so the two run in parallel and a red check points at the TypeScript instead of the Actions demo. Note the Node setup goes here in the workflow, not in an action.yml — that is what broke CI in #14 and led to the revert in #15. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011TCU2WiTisr1w6HPuWuAco
#19 refreshed CLAUDE.md while this branch was open, so its CI description predates the typecheck job this branch adds. Update the ci.yml layout entry to name both jobs, and note that CI runs typecheck on every pull request. Also records the one gotcha #19 doesn't cover, and the only one here that has actually broken CI: the root "type": "module" applies to every .js file in the repo, including Actions scripts the runner executes directly with Node. That is the entire reason .github/actions/lifecycle-demo/package.json exists — deleting it as an apparently redundant two-line manifest breaks the JS action with an error that only half explains itself. Kept to main's existing bullet style rather than restructuring, since #19 is merged and this branch should not relitigate it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011TCU2WiTisr1w6HPuWuAco
ada33-arch
force-pushed
the
claude/agents-sdk-typescript-setup-wwe1a9
branch
from
August 8, 2026 10:54
6a0a035 to
3e8ddcf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #17, which added TypeScript but left nothing in the pipeline checking it — a type error could land on
mainwith CI green.Rebuilt on current
main(4b58087) to resolve a merge conflict; see Conflict resolution below for what changed.Change
Adds one job to
.github/workflows/ci.yml:A separate job rather than a step on
lifecycle-demo, so the two run in parallel and a red check points at the TypeScript instead of the Actions demo.npm cirather thannpm installinstalls exactly whatpackage-lock.jsonpins and fails if the lockfile has drifted.Plus two small
CLAUDE.mdtouch-ups that follow from it:ci.ymllayout entry now names both jobs, and the Commands section notes that CI runstypecheckon every PR — Refresh CLAUDE.md to match what the repo actually contains #19 was written before this job existed."type": "module"applies to every.jsin the repo, including Actions scripts the runner executes directly. That's the entire reason.github/actions/lifecycle-demo/package.jsonexists — delete it as an apparently redundant two-line manifest and the JS action dies withReferenceError: require is not defined in ES module scope.Both edits keep #19's existing bullet style rather than restructuring it.
Conflict resolution
This branch previously carried its own full
CLAUDE.mdrewrite. #19 landed the same refresh onmainwhile this PR sat in draft, so that commit was dropped rather than merged — it duplicated work that's already onmain, and resolving in its favour would have clobbered a merged change. What survived is the typecheck job, whichmainstill doesn't have, plus the two touch-ups above.On #14 / #15
#14 tried to add Node setup and was reverted after breaking CI — it pasted
actions/setup-nodeboilerplate, every option empty, into.github/actions/docker-demo/action.yml, a Docker action whoseruns:block takes an image and args rather than steps. This puts the setup in a workflow job and sets only the two options needed.Verification
npm run typecheckexits 0 on this branch.const broken: number = "not a number";toagent.tsmakes it exit 1 withTS2322, back to 0 once reverted.main's own documented action recipe still runs verbatim after the rebuild, producinggreeting=hello, world!.