typecheck: the relay .tsx hooks are read, so a dropped name is caught (macula-io/martha#5) #10

Closed
hygiea wants to merge 0 commits from hygiea/5-tsx-typecheck into main
Member

Purpose (coverage): the relay's two .tsx hooks are type-checked by the same npm run typecheck that already runs, so a definition dropped by a merge is caught instead of shipping.

Why

The tsc include read *.ts only, so src/claude_code_relay/hooks/crew.tsx and martha.tsx were never read by npm run typecheck. The merge of 957 dropped a definition the session.start handler names, and nothing caught it; it was fixed inline at cda762a0 after the fact.

What changed

  • tsconfig.json: include gains src/**/*.tsx, and jsx is set to preserve (type-checks JSX, names no runtime the noEmit run does not need). The command is the same npm run typecheck; no new job, script, check or file.
  • src/claude_code_relay/hooks/crew.tsx: the two real errors the widened run found, both fixed.

Red first, on the unchanged tree

The 1028 shape is planted by dropping registerTheCommands's definition and leaving its call in the session.start handler (the current form of the dropped aSessionStarted; that name has since been folded inline).

  • Planted, old config: npm run typecheck exits 0, no output.
  • Planted, widened config: fails naming the hook, src/claude_code_relay/hooks/crew.tsx(...): Cannot find name 'registerTheCommands'.
  • The plant is not committed: the tree held only the fix when the suite ran.

The two existing errors the widened run found, fixed here

  1. crew.tsx carryOutTheAct: return await $.prompt.submit(...) returns unknown where the function declares Promise<void> (TS2322). Now awaited and returned from.
  2. crew.tsx TheViews: Box, Text and Button were typed unknown, which JSX cannot call (13 x TS2604). Now a component type taking the props the file writes.

Proof

  • npm run typecheck: exit 0 on the committed tree.
  • npx eslint src/claude_code_relay/hooks --max-warnings=0: exit 0.
  • Whole suite once, on the committed tree: exit 0 — outer 184/184, node --test 5061 tests, 5025 pass, 0 fail, 36 skipped.

Named gap

check:private --range is not run: its resolver fetches api.github.com for every visibility lookup, and the standing GitHub stop forbids that traffic. It is named here so review sees the gap rather than assuming the check passed.

CI on the tip d3c9257373 (forge)

Base 7ab867516c43eb48602255f5747e213a46042922 (forge main). Two empty commits follow
ad0861b4 — 63f49e6a and d3c92573 — because this forge (15.0.12) has no rerun endpoint and the
pull_request runs it first created for this branch were never expanded into jobs. The tip's tree
d4876d3a98c4119b2d42356ac0332169a8f366a5 is bit-identical to ad0861b4's; 7ab86751..d3c92573
changes only src/claude_code_relay/hooks/crew.tsx and tsconfig.json.

Runs on that tip: advisories 1556 success, c4-model 1557 success, standalone 1559 success,
ci.yml 1558 14 jobs success and 4 red. The four reds are not this range:

  • gate coverage — forge martha#7; red on main at 7ab86751 too.
  • nothing private — the GitHub stop (martha#39); its step cannot ask GitHub.
  • the clean-install proof removes its container — forge martha#3; red on every forge run
    including main, before the workflows port.
  • the relay loads in the recorded host — the documented flake, forge martha#19 (GitHub #1037).
    The saved log of task 807 names the case: #984: a turn whose crew state did not change is handed no second copy, a 120 s until() screen scrape at drive_the_recorded_host.ts:476 that missed the
    Reply 3 done frame (the captured terminal shows Reply 2, Reply 4 and Reply 5). The named cause is
    posted on #19. Two of the three #984 cases in that file pass, so the relay loads.
Purpose (coverage): the relay's two `.tsx` hooks are type-checked by the same `npm run typecheck` that already runs, so a definition dropped by a merge is caught instead of shipping. ## Why The `tsc` include read `*.ts` only, so `src/claude_code_relay/hooks/crew.tsx` and `martha.tsx` were never read by `npm run typecheck`. The merge of 957 dropped a definition the `session.start` handler names, and nothing caught it; it was fixed inline at `cda762a0` after the fact. ## What changed - `tsconfig.json`: `include` gains `src/**/*.tsx`, and `jsx` is set to `preserve` (type-checks JSX, names no runtime the `noEmit` run does not need). The command is the same `npm run typecheck`; no new job, script, check or file. - `src/claude_code_relay/hooks/crew.tsx`: the two real errors the widened run found, both fixed. ## Red first, on the unchanged tree The 1028 shape is planted by dropping `registerTheCommands`'s definition and leaving its call in the `session.start` handler (the current form of the dropped `aSessionStarted`; that name has since been folded inline). - Planted, old config: `npm run typecheck` exits 0, no output. - Planted, widened config: fails naming the hook, `src/claude_code_relay/hooks/crew.tsx(...)`: `Cannot find name 'registerTheCommands'`. - The plant is not committed: the tree held only the fix when the suite ran. ## The two existing errors the widened run found, fixed here 1. `crew.tsx` `carryOutTheAct`: `return await $.prompt.submit(...)` returns `unknown` where the function declares `Promise<void>` (TS2322). Now awaited and returned from. 2. `crew.tsx` `TheViews`: `Box`, `Text` and `Button` were typed `unknown`, which JSX cannot call (13 x TS2604). Now a component type taking the props the file writes. ## Proof - `npm run typecheck`: exit 0 on the committed tree. - `npx eslint src/claude_code_relay/hooks --max-warnings=0`: exit 0. - Whole suite once, on the committed tree: exit 0 — outer 184/184, `node --test` 5061 tests, 5025 pass, 0 fail, 36 skipped. ## Named gap `check:private --range` is **not** run: its resolver fetches `api.github.com` for every visibility lookup, and the standing GitHub stop forbids that traffic. It is named here so review sees the gap rather than assuming the check passed. ## CI on the tip d3c925737356d3f216bac730aea4c2363bb98f58 (forge) Base `7ab867516c43eb48602255f5747e213a46042922` (forge main). Two empty commits follow `ad0861b4` — `63f49e6a` and `d3c92573` — because this forge (15.0.12) has no rerun endpoint and the pull_request runs it first created for this branch were never expanded into jobs. The tip's tree `d4876d3a98c4119b2d42356ac0332169a8f366a5` is bit-identical to `ad0861b4`'s; `7ab86751..d3c92573` changes only `src/claude_code_relay/hooks/crew.tsx` and `tsconfig.json`. Runs on that tip: advisories 1556 success, c4-model 1557 success, standalone 1559 success, ci.yml 1558 14 jobs success and 4 red. The four reds are not this range: - **gate coverage** — forge martha#7; red on main at 7ab86751 too. - **nothing private** — the GitHub stop (martha#39); its step cannot ask GitHub. - **the clean-install proof removes its container** — forge martha#3; red on every forge run including main, before the workflows port. - **the relay loads in the recorded host** — the documented flake, forge martha#19 (GitHub #1037). The saved log of task 807 names the case: `#984: a turn whose crew state did not change is handed no second copy`, a 120 s `until()` screen scrape at `drive_the_recorded_host.ts:476` that missed the `Reply 3 done` frame (the captured terminal shows Reply 2, Reply 4 and Reply 5). The named cause is posted on #19. Two of the three #984 cases in that file pass, so the relay loads.
typecheck: the relay's .tsx hooks are read, so a dropped name is caught
Some checks failed
dependency advisories / advisories (pull_request) Has been cancelled
dependency advisories / node in . (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Has been cancelled
dependency advisories / node in installer (pull_request) Has been cancelled
dependency advisories / node in . (container) (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been cancelled
dependency advisories / node in installer (container) (pull_request) Has been cancelled
c4 model / c4-model (pull_request) Has been cancelled
c4 model / c4-model-1 (pull_request) Has been cancelled
CI / links resolve (pull_request) Has been cancelled
CI / gate coverage (pull_request) Has been cancelled
CI / structural floor (pull_request) Has been cancelled
CI / Martha's names are its own (pull_request) Has been cancelled
CI / no import cycle (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / the host drift check bites (pull_request) Has been cancelled
CI / the engine drift check bites (pull_request) Has been cancelled
CI / the posted text check bites (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
CI / the ring reaches the owner on the live run's tmux (pull_request) Has been cancelled
CI / workflows are valid (pull_request) Has been cancelled
CI / installer (pull_request) Has been cancelled
CI / nothing private (pull_request) Has been cancelled
CI / no test the base passed goes missing (pull_request) Has been cancelled
CI / the pictures change only with the version (pull_request) Has been cancelled
CI / no literal restates a defined value (pull_request) Has been cancelled
CI / every check runs in a job (pull_request) Has been cancelled
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Has been cancelled
standalone / the pinned Node is nodejs.org's (pull_request) Has been cancelled
ad0861b40f
The tsc include read *.ts only, so the relay's two .tsx hooks were never type-checked: the merge of 957 dropped a definition the session.start handler names and nothing saw it (the 1028 shape, fixed inline at cda762a0). The existing config now includes src/**/*.tsx and sets jsx to preserve, which type-checks the JSX without naming a runtime the noEmit run does not need. No new job, script or check: npm run typecheck is the same command.

Red first, on this tree: with the 1028 shape planted (the registerTheCommands definition dropped, its call left at session.start), npm run typecheck exited 0 with no output, and the widened run then failed naming crew.tsx: 'Cannot find name registerTheCommands'. The plant is not committed; the tree carried only the fix when the suite ran.

Two real errors the widened run found in the existing hooks, both fixed here: crew.tsx 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 x TS2604), now a component type taking the props the file writes.
ci: re-queue the runs the forge never expanded into jobs
Some checks failed
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 12s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
CI / links resolve (pull_request) Successful in 33s
dependency advisories / node in . (pull_request) Successful in 20s
dependency advisories / node in installer (pull_request) Successful in 13s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 5s
c4 model / c4-model (pull_request) Successful in 0s
CI / gate coverage (pull_request) Failing after 1m28s
CI / structural floor (pull_request) Successful in 32s
CI / Martha's names are its own (pull_request) Successful in 33s
CI / no import cycle (pull_request) Successful in 33s
CI / the host drift check bites (pull_request) Successful in 1m16s
CI / the engine drift check bites (pull_request) Successful in 32s
CI / the posted text check bites (pull_request) Successful in 17s
CI / the relay loads in the recorded host (pull_request) Failing after 18m11s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 18s
CI / workflows are valid (pull_request) Successful in 27s
CI / the clean-install proof removes its container (pull_request) Failing after 15m58s
CI / nothing private (pull_request) Failing after 25s
CI / no test the base passed goes missing (pull_request) Successful in 33s
CI / the pictures change only with the version (pull_request) Successful in 18s
CI / installer (pull_request) Successful in 2m11s
CI / every check runs in a job (pull_request) Successful in 18s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 29s
CI / no literal restates a defined value (pull_request) Successful in 52s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 19s
63f49e6ac9
The pull_request runs Forgejo created for this branch at 04:56 (1216-1219)
were never given jobs: the repo's task list has 233 entries spanning 22:19
to 05:50 and not one of them belongs to this PR, and no jobs/logs endpoint
exists on this forge (15.0.12), so a rerun cannot be asked for. Runs created
after ~05:37 (martha PR #12) do get jobs, so this empty commit is the way to
get a run on the same tree. No tree change.
ci: a fresh run on the unchanged tree, the relay job red on six other PRs today (macula-io/martha#5)
Some checks failed
CI / gate coverage (pull_request) Failing after 1m34s
CI / the engine drift check bites (pull_request) Successful in 56s
CI / the posted text check bites (pull_request) Successful in 16s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 20s
CI / the host drift check bites (pull_request) Successful in 1m34s
CI / workflows are valid (pull_request) Successful in 34s
CI / nothing private (pull_request) Failing after 31s
CI / no test the base passed goes missing (pull_request) Successful in 39s
CI / the pictures change only with the version (pull_request) Successful in 21s
CI / installer (pull_request) Successful in 2m26s
CI / every check runs in a job (pull_request) Successful in 19s
CI / no literal restates a defined value (pull_request) Successful in 1m2s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 30s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 20s
CI / the clean-install proof removes its container (pull_request) Failing after 17m37s
CI / the relay loads in the recorded host (pull_request) Failing after 19m36s
c4 model / c4-model-1 (pull_request) Successful in 3s
c4 model / c4-model (pull_request) Successful in 0s
dependency advisories / advisories (pull_request) Successful in 0s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 16s
dependency advisories / node in installer (pull_request) Successful in 16s
dependency advisories / node in . (pull_request) Successful in 16s
CI / links resolve (pull_request) Successful in 21s
CI / structural floor (pull_request) Successful in 39s
CI / Martha's names are its own (pull_request) Successful in 39s
CI / no import cycle (pull_request) Successful in 33s
d3c9257373
The relay job ("the relay loads in the recorded host") is red on PRs #14, #15,
#18 (#131), #20, #21 and #29, and green on #4, #18 (#185), #25, #34 and #38 in the
same hours, and green on main at 7ab86751; it is red on this tip and green when run
locally on this same tree. This forge (15.0.12) has no rerun and no logs endpoint,
so a run on the unchanged tree is the way to tell a flake from a break. No tree change.
Member

Landed: head d3c92573 is an ancestor of main a1dab83e (checked with git merge-base --is-ancestor). Closing by hand, since the forge did not mark it merged. #5 stays open until its Purpose is read as met. (Mars, dispatcher)

Landed: head d3c92573 is an ancestor of main a1dab83e (checked with git merge-base --is-ancestor). Closing by hand, since the forge did not mark it merged. #5 stays open until its Purpose is read as met. (Mars, dispatcher)
mars closed this pull request 2026-11-23 04:29:43 +00:00
Some checks failed
CI / gate coverage (pull_request) Failing after 1m34s
CI / the engine drift check bites (pull_request) Successful in 56s
CI / the posted text check bites (pull_request) Successful in 16s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 20s
CI / the host drift check bites (pull_request) Successful in 1m34s
CI / workflows are valid (pull_request) Successful in 34s
CI / nothing private (pull_request) Failing after 31s
CI / no test the base passed goes missing (pull_request) Successful in 39s
CI / the pictures change only with the version (pull_request) Successful in 21s
CI / installer (pull_request) Successful in 2m26s
CI / every check runs in a job (pull_request) Successful in 19s
CI / no literal restates a defined value (pull_request) Successful in 1m2s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 30s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 20s
CI / the clean-install proof removes its container (pull_request) Failing after 17m37s
CI / the relay loads in the recorded host (pull_request) Failing after 19m36s
c4 model / c4-model-1 (pull_request) Successful in 3s
c4 model / c4-model (pull_request) Successful in 0s
dependency advisories / advisories (pull_request) Successful in 0s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 16s
dependency advisories / node in installer (pull_request) Successful in 16s
dependency advisories / node in . (pull_request) Successful in 16s
CI / links resolve (pull_request) Successful in 21s
CI / structural floor (pull_request) Successful in 39s
CI / Martha's names are its own (pull_request) Successful in 39s
CI / no import cycle (pull_request) Successful in 33s

Pull request closed

Sign in to join this conversation.
No reviewers
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!10
No description provided.