Skip to content

fix: hook tests pass inside an agent, and the Python weights warning is once per process - #33

Merged
jackulau merged 4 commits into
mainfrom
fix/weights-gaps
Nov 12, 2026
Merged

jackulau merged 4 commits into
mainfrom
fix/weights-gaps

Conversation

@jackulau

Copy link
Copy Markdown
Owner

Four small follow-ups to #32, one per commit.

  • Hook tests pass inside an agent or a host app. test/capture/hook.test.ts and test/cli/rebuild-redactions.test.ts passed the caller's environment to hook.sh. Run from inside Claude Code, Codex or T3 Code, the caller's variables (a thread id, a parent session id, a model base URL) sent the hook to hook.mjs and the tests failed, on main too. isolate() now drops them (CALLER_ENV), and a test fails when hook.sh reads a variable that is in neither list.
  • weights_edit() warns once per process. The Python SDK's docs said so and the TypeScript SDK does it, but the warning table lived on the transport, so every init() warned again. The new test fails without the fix (2 != 1).
  • The Python weights test that runs the CLI needs Node 22.16, as the CLI does; its gate said 22.15.
  • Docs. The stores reference says what happens when a sink or the forward sends a server its own sessions: the spans are stored as new events of the same session, so its counts double.

Checks

On macOS, with the calling agent's variables left set (the case the first commit fixes):

  • npm run check in packages/coding.sh: 6312 tests, 6303 pass, 0 fail, 9 skipped.
  • Python SDK with every extra required (CODING_SH_SDK_REQUIRE_ALL=1): 120 tests OK, no skips; mypy --strict clean.
  • apps/site: npm run build, then CODING_SH_REQUIRE_DIST=1 npm run check: 135 of 135, 0 skipped.
  • npm run lint: clean.

@jackulau
jackulau merged commit 7f09760 into main Nov 12, 2026
28 checks passed
@jackulau
jackulau deleted the fix/weights-gaps branch November 12, 2026 22:46
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