Skip to content

feat: add TypeScript command timing foundation - #1128

Open
roodboi wants to merge 17 commits into
nextfrom
claude-lead/engine-a1-timings
Open

roodboi wants to merge 17 commits into
nextfrom
claude-lead/engine-a1-timings

Conversation

@roodboi

@roodboi roodboi commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add the TypeScript reader and per-command collector for hack.timings/1.
  • Join native child records over an opt-in descriptor, separate from the command's stdout and stderr.
  • Keep the public CLI unchanged. No lifecycle state machine changes.

Verification

  • bun run check
  • bun run --cwd packages/cli typecheck
  • HACK_DAEMON_AUTOSTART_DISABLE=1 bun test tests/command-timings.test.ts tests/process-exit-holds.test.ts

The regression runs a child with collection off and on. It checks that the disabled path leaves stdout, stderr and the fixture directory unchanged, then checks the enabled child's trace and parent IDs. Native macOS verification and overhead measurements follow with the CLI integration.


Run Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hack-docs Ready Ready Preview Nov 23, 2026 3:04am UTC

Request Review

@roodboi
roodboi marked this pull request as ready for review November 23, 2026 03:25
@roodboi

roodboi commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Lead read and independent re-review of 8805c84: accepted. On this Mac with Bun 1.4.4 the two test files pass (3 of 3), and the reviewer's probe shows both socket ends non-blocking and close-on-exec in 200 of 200 tries with no blocked drain. With timings off nothing is read, written or inherited. Joins the batch after next.

Carried into the wiring PR: no long-lived child (daemon) goes through timedNativeSpawn; an output file that cannot be created is said once on stderr instead of silently running untimed; one TypeScript-written record parsed by Rust's Record::parse_line in a test.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
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