Repository navigation
The suite no longer times the origin note or collides with its own fence ids - #269
Merged
Merged
Conversation
…nce ids `theHookStaysFast` asserted a median under 50 ms and a slowest call under 250 ms inside the parallel debug suite; on a Mac it takes 90 ms even alone, so it failed every run. The suite now checks what the cost comes from: the hook reads the book once per call, and the book at its limit stays under 512 KB (386 KB today). The timing moves to `mise run bench`, a release build that runs `Tests/HeedCoreTests/Bench` one test at a time, and AGENTS.md says a test in the suite never asserts a duration. `displayShowsOnlyText` checked that a prompt never contains "200" or "201", but every prompt carries a random 8-hex fence id, and one CI run drew d2016162. It renders with a fixed id now. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mpdreamz
added a commit
that referenced
this pull request
Nov 16, 2026
Part of keeping CI free of wall-clock flakes. - **ACPClientTests** (3 tests): a fixed `Task.sleep` of 50/30/20 ms followed by an assertion is now a `waitFor` on the condition (the refusal and cancel written, `session/new` on the wire, `session/cancel` sent). New shared helper `Tests/HeedCoreTests/WaitFor.swift`: polls, returns as soon as the condition holds, 30 s deadline that only a broken behaviour reaches. - **ApprovalTests** `aSlowAnswerTimesOutAndTheServerHearsTheHookLeft`: the 200 ms sleep before `gone.ids` is now a wait for the server to hear the hook left. - **anAgentThatGoesAway...**: stressed at 200 cases with the pool starved, it hit the request's own 60 s deadline before the poll resumed; the request gets an hour, since the agent going away is what ends it. Not changed: `theHookStaysFast` was already taken out of the suite by #269 (timings live in `mise run bench`). The three on-thread bounds in `PermissionRoundTripTests` are timed on the hook's own thread against a hook ceiling and passed 200/200 each with 6 CPU hogs per core plus pool-blocking tasks, so they stay as they are. Verified: 200-case parametrized loops under CPU hogs and pool-blocking tasks (before: refusal test failed 1-2 of 200; after: 0 of 1000), mutations (refusal not sent, cancel not sent, wrong close reason, `permissionGone` not called) each fail their test, `mise run test`, `lint`, `fmt`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Main is red:
theHookStaysFastfails on every local run (90 ms median even alone, against a 50 ms bound) anddisplayShowsOnlyTextfails when the random fence id contains "200"/"201".mise run bench(HEED_BENCH=1, release build, one at a time); AGENTS.md records the rule.displayShowsOnlyTextrenders with a fixed fence id.Making the hook itself cheaper (a prefilter before reading the book) is a separate change.
🤖 Generated with Claude Code