Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs(changelog): wall-clock timing flake sweep

garrytanf842f042e899
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80a55ecfb6..601bc4d2f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,20 @@ credits are retained; no result has been reassigned to another provider. Origina
identifiers and attribution are available in the pre-removal Git revision
`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).
+## [0.60.241.0] - 2026-10-15
+
+**Timing tests that guard CPU-bound work no longer fail on a busy CI machine (tests only, no behavior change).** Tests that bound how long a parser, scanner or redactor may take used to measure wall-clock time, so a loaded runner could fail them without any regression. On a loaded runner `chunker-spans-linear` read 3.50 against its bound of 3. Under 6 busy loops at nice 10, `relational-plan`'s 50 ms bound failed 4 runs of 5. These tests now measure CPU time on the test's own thread, which counts the work rather than how long the scheduler made it wait. The bounds and correctness asserts are unchanged.
+
+### Itemized changes
+
+- **Shared helper** (`test/helpers/cpu-time.ts`): `cpuMs(fn)` times a synchronous call with `process.threadCpuUsage`, the same clock `test/entity-card-perf.slow.test.ts` and `src/core/progress.ts` already use. It leaves out the engine's GC and JIT threads and other work in the process.
+- **30 asserts in 15 files converted:** `fence-marker-code-context`, `search/output-redaction`, `bounded-lead`, `chunker-spans-linear`, `eval-capture-scrub`, `relational-plan`, `attendance-retrieval`, `frontmatter-alias-bomb`, `line-grammar`, `mentions-policy-aliases`, `remote-body`, `timeline-citations`, `cycle-synthesize-verify`, `fence-extraction` and `redos-hardening`. `secret-scan-perf` moves to the shared helper. Thread CPU advances in about 4 ms steps on Linux, so `secret-scan-perf`'s scaling ratio now repeats each timed call until the window holds at least 40 ms.
+- **Three asserts keep process CPU time**, each with its reason in the file:
+ - The `output-redaction` PEM-scan bound and the `secret-scan-perf` repetitive-tail bound. An injected regression that allocated heavily ran about 40% of its cost on GC threads (2151 vs 3582 ms, and 1712 vs 3231 ms) and passed on thread time.
+ - The `line-grammar` ratio that runs in a child process. The 4 ms steps put it anywhere from 3.0 to 7.0 against a bound of 8, and 40 ms windows overran the child's 5 s timeout under load.
+- **Probe results:** every converted assert fails an injected busy-loop regression and an injected allocation regression, then passes 5 of 5 runs under 6 busy loops at nice 10. Before the change, the same load failed `relational-plan` 4/5, three `fence-marker-code-context` bounds 5/5, 4/5 and 3/5, and the `chunker-spans-linear` chat-log ratio 1/5. The other converted asserts did not fail at that load, because their bounds sit 30 to 3000 times above their idle cost.
+- **Left on the wall clock on purpose:** asserts that bound waiting stay as they are. That covers deadlines, timeouts, cancellation, backoff, subprocesses, database and network waits, and lower bounds that prove a wait happened. Asserts that time an awaited span also stay. Of the 164 test files that measure a time difference, 151 have only such asserts. The known residual risk is `line-grammar`'s 5 s child-process timeouts and a set of awaited PGLite spans that guard complexity (`write-gate-perf` p95, `relational-chain-hub`, `traverse-walk-cap`, `sync-delete-batch`, `eval-longmemeval` p50 and others), which need an async-safe measure first.
+
## [0.60.240.0] - 2026-10-15
**Before a meeting or a reply, your agent can now get a short "Before you start" note with up to three dated things the brain knows about the person (off until you turn it on).** When you tell Claude Code to draft a reply to someone or prepare for a call, it usually starts cold: it doesn't know you promised that person a term sheet last week, or that they changed jobs on Friday. With the brief on, the brain notices that you named a person or company it knows and that the task is a reply or a meeting. It can also see that a meeting with them starts within 12 hours. It then adds at most three dated items, each with the page it came from, ahead of the rest of the context. A prompt that just mentions someone ("what is Alice's title?") gets nothing extra. Nothing changes for anyone who leaves it off.