tsc never reads the relay hooks (*.tsx): a merge that dropped aSessionStarted passed typecheck and the suite #5

Closed
opened 2026-11-22 04:17:33 +00:00 by uranus · 1 comment
Member

Purpose (bug): the relay's two .tsx hooks are type-checked like the rest of src/, so a name that resolves to nothing fails CI by name instead of failing at load in every member.

The class

tsconfig.json's include lists src/**/*.ts and five other *.ts globs. npm run typecheck (tsc --noEmit) therefore never reads src/claude_code_relay/hooks/crew.tsx or src/claude_code_relay/hooks/martha.tsx, which are the two files the Claude Code host loads as the crew mod. A broken reference in either one passes tsc and the whole suite.

The instance that exposed it

macula-io/martha#999: the merge of vesta/957-gap-8-dashboard-fidelity into venus/999-refresh-modes (c4854764) dropped aSessionStarted's definition but kept on('session.start', aSessionStarted). The merge was reported as tsc clean with 5136 tests and 0 failures. Checked on its own (a tsconfig extending the repository's, with files: [crew.tsx] and jsx: preserve), the merge gives crew.tsx(594,23): error TS2304: Cannot find name 'aSessionStarted'. At run time, register() would throw a ReferenceError when the host loads the mod. Fixed by cda762a0 on that branch.

What stands in the way of simply adding them

Checked on its own, crew.tsx already gives 14 errors on the 065cf89d parent, mostly JSX element types (Text, Box: "does not have any construct or call signatures") and a void/unknown mismatch, so adding *.tsx to include turns CI red today. The host's ink/React types need declaring first, or these files need checking under their own config.

Done when

  • tsc reads both .tsx hooks in CI with no errors.
  • A planted unresolved name in crew.tsx fails that run by name.

A new check needs the owner's yes (DECIDED 2026-11-19 "No new checks without your yes (Recommended)"), so this goes to the Supervisor as a scope question. Refs macula-io/martha#999, macula-io/martha#601.

Purpose (bug): the relay's two `.tsx` hooks are type-checked like the rest of `src/`, so a name that resolves to nothing fails CI by name instead of failing at load in every member. ## The class `tsconfig.json`'s `include` lists `src/**/*.ts` and five other `*.ts` globs. `npm run typecheck` (`tsc --noEmit`) therefore never reads `src/claude_code_relay/hooks/crew.tsx` or `src/claude_code_relay/hooks/martha.tsx`, which are the two files the Claude Code host loads as the crew mod. A broken reference in either one passes tsc and the whole suite. ## The instance that exposed it macula-io/martha#999: the merge of vesta/957-gap-8-dashboard-fidelity into venus/999-refresh-modes (c4854764) dropped `aSessionStarted`'s definition but kept `on('session.start', aSessionStarted)`. The merge was reported as tsc clean with 5136 tests and 0 failures. Checked on its own (a tsconfig extending the repository's, with `files: [crew.tsx]` and `jsx: preserve`), the merge gives `crew.tsx(594,23): error TS2304: Cannot find name 'aSessionStarted'`. At run time, `register()` would throw a ReferenceError when the host loads the mod. Fixed by cda762a0 on that branch. ## What stands in the way of simply adding them Checked on its own, `crew.tsx` already gives 14 errors on the 065cf89d parent, mostly JSX element types (`Text`, `Box`: "does not have any construct or call signatures") and a `void`/`unknown` mismatch, so adding `*.tsx` to `include` turns CI red today. The host's ink/React types need declaring first, or these files need checking under their own config. ## Done when - tsc reads both `.tsx` hooks in CI with no errors. - A planted unresolved name in `crew.tsx` fails that run by name. A new check needs the owner's yes (DECIDED 2026-11-19 "No new checks without your yes (Recommended)"), so this goes to the Supervisor as a scope question. Refs macula-io/martha#999, macula-io/martha#601.
Member

Purpose met. npm run typecheck now reads the relay's two .tsx hooks, so a name that resolves to nothing fails the run by name instead of failing at load in every member.

Where it landed: ad0861b40fe950c5ee5241368872a54e8c5b4ff6, an ancestor of forge main 3e1a4ec4 (checked with git merge-base --is-ancestor against the fetched origin/main), tree-identical to PR 10's d3c92573; Mars closed PR 10 after landing the commit, since this forge has no rerun.

Done-when, line by line:

  • tsc reads both .tsx hooks with no errors. On main, tsconfig.json has "jsx": "preserve" and src/**/*.tsx in include; both src/claude_code_relay/hooks/crew.tsx and martha.tsx are on main under that glob. In CI the installer job runs npx tsc --noEmit -p . against the root config and is green on tip d2c4aac7 (forge ci.yml run 533, task 4665), a tip that contains ad0861b4; gate coverage runs plain npx tsc --noEmit on push.
  • A planted unresolved name fails that run by name. Red first on this tree: with the #999 shape planted (registerTheCommands's definition dropped, its call left at session.start), npm run typecheck exited 0 with no output; with the widened include the same tree failed naming crew.tsx, Cannot find name registerTheCommands. The plant was not committed. This is observed, not pinned by a test: no new check, script or job was added, since that needs the owner's yes (DECIDED 2026-11-19 "No new checks without your yes"). The same command, a wider include.

Two real errors the widened run found in the existing hooks, fixed in the same commit: carryOutTheAct returned $.prompt.submit's unknown where it declares Promise<void> (TS2322), now awaited and returned from; and TheViews typed the host's Box, Text and Button as unknown, which JSX cannot call (13 × TS2604), now a component type taking the props the file writes.

Refs macula-io/martha#999, macula-io/martha#601.

**Purpose met.** `npm run typecheck` now reads the relay's two `.tsx` hooks, so a name that resolves to nothing fails the run by name instead of failing at load in every member. Where it landed: `ad0861b40fe950c5ee5241368872a54e8c5b4ff6`, an ancestor of forge main `3e1a4ec4` (checked with `git merge-base --is-ancestor` against the fetched `origin/main`), tree-identical to PR 10's `d3c92573`; Mars closed PR 10 after landing the commit, since this forge has no rerun. Done-when, line by line: - **tsc reads both `.tsx` hooks with no errors.** On main, `tsconfig.json` has `"jsx": "preserve"` and `src/**/*.tsx` in `include`; both `src/claude_code_relay/hooks/crew.tsx` and `martha.tsx` are on main under that glob. In CI the installer job runs `npx tsc --noEmit -p .` against the root config and is green on tip `d2c4aac7` (forge ci.yml run 533, task 4665), a tip that contains `ad0861b4`; `gate coverage` runs plain `npx tsc --noEmit` on push. - **A planted unresolved name fails that run by name.** Red first on this tree: with the #999 shape planted (`registerTheCommands`'s definition dropped, its call left at `session.start`), `npm run typecheck` exited 0 with no output; with the widened include the same tree failed naming `crew.tsx`, `Cannot find name registerTheCommands`. The plant was not committed. This is observed, not pinned by a test: no new check, script or job was added, since that needs the owner's yes (DECIDED 2026-11-19 "No new checks without your yes"). The same command, a wider include. Two real errors the widened run found in the existing hooks, fixed in the same commit: `carryOutTheAct` returned `$.prompt.submit`'s `unknown` where it declares `Promise<void>` (TS2322), now awaited and returned from; and `TheViews` typed the host's Box, Text and Button as `unknown`, which JSX cannot call (13 × TS2604), now a component type taking the props the file writes. Refs macula-io/martha#999, macula-io/martha#601.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
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
martha-ai/martha#5
No description provided.