Repository navigation
test: run the timing tests only in the integrator's checks - #1366
Merged
Merged
Conversation
Add a switch for tests whose result depends on wall-clock time or machine load. They run only with CG_TIMING_TESTS=1. - internal/testutil: RequireTiming(t) skips unless the switch is on. TimingEnabled() guards only the time check of a test that checks more than time. - 16 Go tests and 4 OpenCode node tests use the switch. 8 more Go tests guard only their elapsed-time assertion. - ci.yaml: build-test and record set CG_TIMING_TESTS=1. part-a.sh does too, by default. - local-tests.sh sets it only when the PR adds or changes a timing test (scripts/dev/timing-tests-needed.sh decides from the diff). The comment says which. - local-tests.sh also judges a FAILED step by its rerun log, as part-a.sh's flaky rule does. - CLAUDE.md and RELEASING.md say so. Owner decision (David Amid, 2026-11-24): "put the switch, but dont run them on local-tests.sh, only run them by integrator. if a PR contributes a new timing test then it runs the timing tests as well". Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Collaborator
Author
|
Go test results, macOS, Go 1.27.4. The load average was 325 to 365, not calm.
|
amiddavid
commented
Nov 24, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.331 | offload-review skill, @amiddavid's session | fresh | 2 of 2 | 1 of 2 | 184f46a42377 |
blocking |
Verdict: blocking
Findings
- opencode-plugin/test/helpers.mjs:13 — the node timing tests run nowhere after this PR
- What fails: 4 node tests are gated behind
CG_TIMING_TESTS=1(3 infailopen.test.mjs, 1 in
review1.test.mjs), but no runner sets the variable for them. The only runner of these files is
.github/workflows/opencode-plugin.yaml:35(node --test opencode-plugin/test/*.test.mjs), and
that workflow does not setCG_TIMING_TESTS. The runners that do set it run Go only:
ci.yamljobsbuild-testandrecord(make cover,go test), andpart-a.sh(vet, builds,
go test -racesteps — nonode --teststep). So the 4 tests never execute, on a PR or on
main. - Proof:
grep -rln CG_TIMING_TESTSover.github/,scripts/,opencode-plugin/,Makefile
lists onlyci.yaml,part-a.sh,timing-tests-needed.sh,local-tests.shand the two test
files themselves.grep "node --test" .github/workflows/*.yamlhits only
opencode-plugin.yaml. Before this PR those tests ran on everyopencode-plugin/**PR push.
The lost tests are fail-open behavior tests, not only timing bounds: "a restart that never gets
healthy waits about 5 s once, then goes direct" and "a restarted binary that exits at once fails
the restart at once" (failopen.test.mjs:339,370), "a restart that is healthy before the 5 s cap
sends the next request to the proxy" (failopen.test.mjs:479), "startProxy fails fast when its
own child exits" (review1.test.mjs:159). - Side effect of the same gap:
timing-tests-needed.shtreats a change to a.test.mjsfile as
"run", solocal-tests.shposts "timing tests: run (this PR adds or changes one)" for such a PR
— while the changed node tests still never ran. CLAUDE.md and RELEASING.md say "The integrator
runs them in heavy CI and in Part A". That is true for the Go tests only. - Fix: run them somewhere that sets the switch. Either set
CG_TIMING_TESTS: "1"in
opencode-plugin.yaml(formainpushes at least), or add anode --teststep topart-a.sh
under the existingCG_TIMING_TESTSdefault. Then the docs claim holds for both languages.
- What fails: 4 node tests are gated behind
Non-blocking
scripts/dev/local-tests.sh:97-101: when a rerun log exists but holds no--- FAIL:lines (a
panic or a build failure),flaky1still lists every 1st-run failure and the note says "passed on
the rerun". The step result is still fail, so only the note text is wrong.scripts/dev/timing-tests-needed.sh:16: the first check greps the whole diff, so a docs line or a
script comment that namesRequireTimingalso answers "run". The error direction is safe (it
never skips when it should run). No change needed.scripts/dev/local-tests.sh:70: with--reuseof a summary that saystiming-tests 0for a PR
that needs them, the comment says only "skipped (integrator runs them)". The normal path cannot
produce this (the script sets the variable itself before the run), so it stays a note.
What I checked
- The full diff
1d20435f..HEADand the code around each hunk:internal/testutil/testutil.goand
its tests, every gated Go test (plugin, dash, proxy, metricspush, litellm, shutdown), the node
helpers and both changed.test.mjsfiles,ci.yaml,part-a.sh,local-tests.sh,
local-tests_test.sh,timing-tests-needed.sh, CLAUDE.md and RELEASING.md. - Each gated test asserts a wall-clock bound or races a rate limit, which matches the new CLAUDE.md
rule. Tests that only check output keep running; only their bound is guarded (TimingEnabled() &&).
Tests with a fake clock or a safety-net timeout stay ungated. I found no wrongly gated test. failopen.test.mjs's last aggregate test: with the switch off it expects only
/refused the connection/, and the always-running test at line 97 produces that line
(opencode-plugin/index.js:988). No aggregate test inreview1.test.mjsdepends on the gated one.timing-tests-needed.sh: the^[+-][^+-]filter excludes the+++/---headers; deleted and
renamed timing tests are caught (removed lines match, or the file at head matches); a missing base
answers "run" (fail toward running). Thelocal-tests_test.shfixtures cover skip and run paths.local-tests.shrerun logic againstpart-a.sh:$name.rerun.logexists exactly when the 1st run
failed, so the rerun-decides rule matches the writer.set -uo pipefailwithout-e, so the
[ -f ... ] &&line is safe.notesis initialized before the loop.ci.yaml:build-testandrecordrun only onworkflow_dispatchandv*tags, so no PR run
turns the timing tests on.context-guru-pluginis in the root module, so the
internal/testutilimport is legal; all new imports are in_test.gofiles.- Fail-open, data dependence, binaries: no proxy or library behavior changes; no data-dependence row
needed; no binaries added.
amiddavid
commented
Nov 24, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.331 | offload-review skill, @amiddavid's session | fresh | 1 of 2 | 1 of 2 | 184f46a42377 |
blocking |
Verdict: blocking
Findings
- opencode-plugin/test/helpers.mjs:113 — the 4 gated node tests run nowhere after this PR
- What fails: a PR that breaks the plugin's restart and fail-open paths passes every check. The tests that would catch it never execute.
- Proof:
timingOnlyskips a test unlessCG_TIMING_TESTS=1. The only runner ofopencode-plugin/test/*.test.mjsis.github/workflows/opencode-plugin.yaml:35, and that workflow sets noCG_TIMING_TESTS(checked the whole file). The checks that do set it run Go only:ci.yamlbuild-testrunsmake cover(go test -race ./...),recordrunsgo test, and every step inscripts/release/part-a.shis agocommand. So "a restart that never gets healthy waits about 5 s once" and "startProxy fails fast when its own child exits" (fail-open properties) execute in no CI job and no laptop run. Before this PR they ran on every PR that touchedopencode-plugin/**. Two side effects: the CLAUDE.md and RELEASING.md claim "The integrator runs them in heavy CI and in Part A" is false for node tests, andtiming-tests-needed.shcounts*.test.mjsandhelpers.mjsas triggers, so a plugin-only PR getstiming tests: run (this PR adds or changes one)in the posted comment while no node timing test ran. - Fix: set
CG_TIMING_TESTS: "1"in theopencode-pluginworkflow's job env (it runs on GitHub runners, not the loaded laptop, and these tests passed there before this PR), or add a node step to the integrator's checks. Then the docs claim holds.
Non-blocking
scripts/dev/timing-tests-needed.sh:18— a changed line whose content starts with+or-(for example a markdown bullet+- ...) is dropped by the^[+-][^+-]filter, and the file-scan fallback covers only test files. Cosmetic: a docs-only change wantsskipanyway.scripts/dev/timing-tests-needed.sh:14— with an explicit<base>that git cannot resolve, bothgit diffcalls fail silently and the script printsskip, which contradicts its own header ("If the base cannot be found, print run"). Only the no-arg merge-base path is guarded. No current caller passes a bad base.- Gating is inconsistent at the margin:
failopen.test.mjs:413("a restart whose binary is missing returns at once") assertswaited < 1000and stays ungated, while the gated "exits at once" test allows 3000 ms.proxy/tooldefer_test.go:491andproxy/tooldefer_866_test.go:233assert 1 s bounds and stay ungated. The PR description names only 10–15 s safety nets as "not gated".
What I checked
- The full diff, commit by commit (one commit), and the code around each change.
internal/testutil:TimingEnabledandRequireTiminglogic, and both new tests intestutil_test.go. Traced theranflag through skip and non-skip paths: both assertions are sound.t.Setenvforces the switch inside each subtest, so the tests hold also when the integrator runs withCG_TIMING_TESTS=1.- Every gated Go test: each one runs in a step of
part-a.sh(race-proxy, race-dash, race-plugin, race-rest) and inbuild-test/recordwith the env set. The mid-test skip inTestRegistrationBucketIsPerIPv6Prefixkeeps the pureregBucketunit part running. TheTimingEnabled-guarded time checks match the CLAUDE.md rule (guard only the time check). failopen.test.mjsfinal log test:index.js:988writes "proxy refused the connection" from the non-gated test at line 97, so the reduced pattern list holds with the switch off.review1.test.mjshas no aggregate test that depends on its gated test.local-tests.shrerun logic: traced it againstpart-a.sh'sstep()(a.rerun.logexists only when the first run failed; FAILED means both runs failed). The rerun-decides rule, theflaky1note, and the known-failure fallthrough all behave as the fixture tests inlocal-tests_test.shclaim. Bothcomminputs are sorted.timing-tests-needed.sh: traced the four fixture cases inlocal-tests_test.shby hand (base→docs skip, docs→plain skip, plain→timingfile run, timingfile→newtiming run). Deleted test files are caught by the changed-lines grep.part-a.shsummary format:commitstays line 1, the newtiming-testsline is ignored by the step loop and by the sha check.- Where each suite runs:
ci.yaml(all jobs),opencode-plugin.yaml,heavy-ci.sh,Makefile(cover),part-a.sh. This is what proves finding 1. - The PR description names the extra
local-tests.shrerun fix and the owner decision for the timing switch. No user-facing behavior change; no data dependence; no binaries.
The 4 node tests that timingOnly gates ran nowhere: the opencode-plugin workflow does not set CG_TIMING_TESTS, and the heavy jobs and part-a.sh ran Go only. - part-a.sh: new step node-timing runs the node tests with CG_TIMING_TESTS=1. With CG_TIMING_TESTS=0 it writes a "skip" line instead. - ci.yaml: build-test (heavy, dispatch and tags only) installs node 22 and runs the node tests. It sets CG_TIMING_TESTS=1 already. - local-tests.sh: a "skip" step is a row that says the timing tests are off. A step line is still required for every step, also node-timing. The step list now allows indented steps. - CLAUDE.md and RELEASING.md: Go and node timing tests run in the integrator's checks. - local-tests_test.sh: fixtures for the skipped, failed and missing node-timing step. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Collaborator
Author
|
Fixed in 6f5950c: the 4 node timing tests now run in Part A (step |
amiddavid
commented
Nov 24, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.331 | offload-review skill, @amiddavid's session | resumed | 1 of 2 | 2 of 2 | 6f5950c8fd45 |
approve |
Verdict: approve
Findings
None.
Earlier findings
- Round 1, finding 1 (also reviewer 2, finding 1): the 4 gated node tests ran nowhere — fixed in 6f5950c.
scripts/release/part-a.sh:77runsstep node-timing env CG_TIMING_TESTS=1 node --test opencode-plugin/test/*.test.mjswhen the switch is on, and writes askipline when it is off. The step sits inside the exportedCG_TIMING_TESTSdefault, so Part A runs it..github/workflows/ci.yaml:68-73:build-test(dispatch and tags) installs node 22 and runs the same node test command under the job-levelCG_TIMING_TESTS=1.- The misleading-comment side effect is gone too: a PR that changes a
.test.mjsfile makestiming-tests-needed.shanswerrun, solocal-tests.shsets the switch andnode-timingruns on the laptop. The docs (CLAUDE.md, RELEASING.md) now name the step, and the claim is true. - I traced the wiring end to end; the tests now run in Part A and in the heavy
build-testjob.
Non-blocking
part-a.sh:77needsnodeon PATH and offers no fallback, unlikeGO. The header says "node 22 is needed", and the author ran the suite on the laptop. A box without node gets a FAILEDnode-timingrow, which is visible and honest.- The round-1 non-blocking notes stand as notes: the
^[+-][^+-]filter edge, the unresolvable-explicit-base path intiming-tests-needed.sh, and the margin of ungated 1 s bounds (failopen.test.mjs:413,tooldefertests). None blocks.
What I checked
- Last review: round 1, 184f46a, 2026-11-24T17:23:41Z.
- New commits read: 1 —
6f5950c8"test: run the OpenCode timing tests in the integrator's checks". - Read in full: 2 reviews, 2 comments, 0 inline comments (from
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt). - New items since my last review, and what I did:
- Reviewer 2's round-1 review (17:21:42Z): same finding 1 as mine. I checked the fix myself against both wordings; it covers both (Part A step plus heavy CI).
- Author comment (17:26:15Z): announces the fix in
6f5950c8. Verified against the diff. - Author comment (17:16:11Z, pre-dated my round 1): Go test results at load 325 to 365, all 16 gated tests pass with the switch on. Noted; matches the PR description.
- The fix commit hunk by hunk:
part-a.sh: theif [ "$CG_TIMING_TESTS" = 1 ]guard sits after the export, so the value is always set. Theskipline matches whatlocal-tests.shparses. The step runs throughstep(), so a failure gets the rerun and the FAILED line like any other step.local-tests.sh: the step list now matches the indentedstepline (^[[:space:]]*step) and accepts theskipstate;awk '{print $2}'still yields the step name on an indented line. A summary with onlyskiplines still fails thegrep -qE '^(ok|flaky|FAILED) 'guard, which is right: the Go steps always emit a result line.local-tests_test.sh: traced the three new fixtures by hand. Skipped step → row| node-timing | skipped, rc 0. FAILED step with a node TAP log (not ok, no Go--- FAIL:line) → emptyfailing→ the else branch → rc 1. Deleted step line → "no result line" → rc 1.ci.yaml: the node step runs beforemake cover, under the existing job env; the shell expands the glob.- Old Part A summaries have no
node-timingline, so--reuseof one now fails with "no result line". Correct: such a summary says nothing about the new step. The normal path always runs the newpart-a.sh.
- No proxy or library behavior change; no data dependence; no binaries.
amiddavid
commented
Nov 24, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.331 | offload-review skill, @amiddavid's session | resumed | 2 of 2 | 2 of 2 | 6f5950c8fd45 |
approve |
Verdict: approve
Findings
None. The one round-1 finding is fixed, and the fix commit adds no defect I can show.
Status of earlier findings
- Reviewer 2, round 1 (also reviewer 1, round 1): the 4 node timing tests ran nowhere.
Fixed in6f5950c8. I checked the fix myself:scripts/release/part-a.sh:80: the new stepnode-timingruns
node --test opencode-plugin/test/*.test.mjswithCG_TIMING_TESTS=1when the switch is on.
With the switch off it writes askipsummary line instead. Part A is the integrator's run,
andlocal-tests.shturns the switch on for a PR that adds or changes a timing test..github/workflows/ci.yaml:68-73:build-test(dispatch and tags only) installs node 22 and
runs the same node tests under the job'sCG_TIMING_TESTS: "1".local-tests.shnow accepts theskipstate, requires a line for every step including
node-timing, and its step scan allows the indented step. Theskipnoteline
("skipped TestBobReleasePythonSuite…") does not match^(ok|flaky|FAILED|skip), so it is not
read as a step row.- The new fixtures in
local-tests_test.shcover the skipped, failed and missingnode-timing
step. I traced the failed case: a node TAP log has no--- FAIL:lines, sofailingis empty
and the step fails through the else branch, as the fixture expects (rc 1). - CLAUDE.md and RELEASING.md now name the
node-timingstep, and the text matches the code.
- Reviewer 1's non-blocking notes (3): the
^[+-][^+-]filter, the explicit bad<base>path,
the gating at the margin. Not addressed by the author. I checked the bad-base one myself: an
explicit base that git cannot resolve makes bothgit diffcalls fail and the script prints
skip, against its own header. No caller passes a bad base (the only caller with args is the
fixture test, with valid tags), so it stays non-blocking. The other two I also confirm as
non-blocking. - My round-1 non-blocking notes (3): the flaky-note wording on a rerun without
--- FAIL:
lines, the diff grep matching docs text, the--reusetiming-line edge. Not addressed. All
three stay non-blocking; none changes a posted result.
Non-blocking
- None new.
What I checked
- Last review: round 1,
184f46a4237770e2a7a0ea4616479135eec59b60, 2026-11-24T17:21:42Z. - New commits read: 1 —
6f5950c8"test: run the OpenCode timing tests in the integrator's checks". - Read in full: 2 reviews, 2 comments, 0 inline comments (from the three files
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt). - New items since my last review, and what I did about each:
- Reviewer 1's round-1 review (17:23:41Z): same main finding as mine. I verified the fix for both.
- Comment by amiddavid (17:16:11Z), Go test results under load 325-365: 16 gated tests SKIP
without the switch and PASS with it. Evidence the gating works; nothing to act on. - Comment by amiddavid (17:26:15Z), the fix report: I verified each claim against the commit.
- Commit
6f5950c8: full diff read (6 files), plus the code around each hunk —part-a.sh
(step, skip line,run()handling),ci.yaml(job env and node setup),local-tests.sh
(skip state, indented-step scan),local-tests_test.sh(3 new fixtures), CLAUDE.md, RELEASING.md.
- The full diff
1d20435f..HEADfrom round 1 stays read; the new commit changes only the six files
above. part-a.shdetails: the step runs throughrun(), so it gets a log, a rerun on failure and a
FAILED line like every step.awk '{print $2}'drops the leading whitespace of the indented-step
match, so the step list is right. A missingnodebinary fails the step with a clear log, not a
hang.- Commit message: DCO sign-off present,
Assisted-By:attribution, conventional title. - No user-facing behavior change, so no human-permission item. No data-dependence row needed. No
binaries or LFS files added.
amiddavid
added a commit
that referenced
this pull request
Nov 24, 2026
Picks up #1366, so local-tests.sh skips the timing tests at this head. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
This was referenced Nov 24, 2026
amiddavid
added a commit
that referenced
this pull request
Nov 24, 2026
The rebase on e54d499 replayed an older "restore chain_test.go to main" step. That step dropped the testutil import that #1366 added. This commit takes the file from main again. The PR does not change chain_test.go. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
This was referenced Nov 24, 2026
amiddavid
added a commit
that referenced
this pull request
Nov 25, 2026
feat(modelinfo): add prompt-size price tiers (no caller yet) Some providers bill a whole request at higher rates when the prompt is large. Add the data and the rule. Nothing calls Price.At yet, so no figure or decision changes. - Price.Tiers and PriceTier hold the rates above a prompt size. - Price.At(promptTokens) returns the rates for that size. - PromptTokens(fresh, read, write) is the one definition of prompt size. - Built-in tiers: OpenAI GPT-5.4+ above 272k, Claude Haiku 5.5 above 100k. - litellm parses _above_<N>k_tokens keys. A rate the feed states wins. fix(modelinfo): keep Price comparable; fill partial tiers; tier operator prices - Tiers is a fixed [3]PriceTier array, so Price stays comparable with ==. Revert the DeepEqual edits. A test keeps it comparable. - A partial feed tier fills each missing rate from the built-in multiple, else from the input ratio. A negative rate drops the line. - The operator price file gets the built-in tiers too. - GPT54OrLater and GPT56OrLater share one version parser. - Tests: write-cost key, two tier lines, partial tier, negative rate. test(modelinfo): correct a stale comment on the partial-tier fill The unstated output rate of gpt-5.6-x now comes from the built-in 1.5x multiple, not from the input ratio. Only the comment changes. feat(modelinfo): add a flat key to the price file to turn built-in tiers off An operator entry with `flat: true` gets no built-in prompt-size tier. Use it for a gateway that bills one flat rate. Absent means the tiers apply, as before. The key is per entry. A non-bool value stops the load. fix(modelinfo): treat a tail that differs only in flat as ambiguous deriveBareTails compared price, window and compaction point but not flat. Two same-tail entries that differ only in flat let the bare id take the first entry's tier setting, by file order. Compare flat too. test(modelinfo): keep main's chain_test.go after the rebase The rebase on e54d499 replayed an older "restore chain_test.go to main" step. That step dropped the testutil import that #1366 added. This commit takes the file from main again. The PR does not change chain_test.go. No behavior change: prompt-size price tiers in modelinfo; nothing calls Price.At yet. Approvals still count (approval-still-valid: same change). Local tests waived (owner rule). Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[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.
Summary
Timing tests run only with
CG_TIMING_TESTS=1.scripts/dev/local-tests.shskips them unless the PR adds or changes one. The integrator's heavy CI and Part A run them.Owner decision (David Amid, 2026-11-24, integrator session): "put the switch, but dont run them on local-tests.sh, only run them by integrator. if a PR contributes a new timing test then it runs the timing tests as well".
Why
local-tests.shon one shared laptop. It has 10 CPUs. The load average is 136 to 390.TestMetricsCallLatency,TestRegistrationRateLimitedPerIP,TestMetricsDoNotChangeResponseTime, and 5 OpenCode plugin tests at load about 390.What changed
testutil.RequireTiming(t)skips unlessCG_TIMING_TESTS=1.testutil.TimingEnabled()guards only the time check of a test that checks more.ci.yaml:build-testandrecordsetCG_TIMING_TESTS: "1".part-a.shsets it by default (and writes atiming-testsline in its summary).local-tests.shsets it to 1 only whenscripts/dev/timing-tests-needed.shsaysrun: a changed line holdsRequireTiming,TimingEnabledortimingOnly, or a changed test file holds one. The comment ends withtiming tests: run (this PR adds or changes one)ortiming tests: skipped (integrator runs them).local-tests.shnow judges a FAILED step by its rerun log, as the flaky rule ofpart-a.shdoes. A test that fails only on the 1st run is listed as flaky. Real case: refactor(agent): one client.Identify entry point; label OpenCode and Pi #1331 at d4cd32e. Its 1strace-restrun failed 3 tests, the rerun failed only the knownTestNoHooksKeepsTheBinaryDefaults, and the result was fail. It is now pass with a flaky note. New fixture cases inlocal-tests_test.shfail on the old script.CLAUDE.mdandRELEASING.mdexplain the rule.Gated Go tests (whole test skips):
TestMetricsDoNotChangeResponseTime: p50 and p99 of request time against a ceiling.TestMetricsCallLatency: added latency per call against a ceiling.TestDashboardAddsNoRequestLatencyWithContentCapture: median spend budget, 30 ms.TestDashboardCaptureAddsNoRequestLatencyAtMaxContent: median spend budget, 25 ms.TestCaptureOverheadIsNegligible: per-request capture cost budget.TestOverviewStaysFastOnALargeWindow: query time bound.TestOverviewSessionScopedStaysFastWithManyOtherSessions: query time bound.TestStatuslineFinishesWithinItsBudgetOnASlowProxy: render time against floor plus allowance.TestRegistrationRateLimitedPerIP: races the per-minute rate limit under load.TestSignInAttemptsAreRateLimited: same race (argon2 cost per attempt).TestCheckHookFinishesInsideItsOwnTimeout: hook must finish inside half its timeout.TestStartHookBudgetsOnWallClockNotIterations: same, for SessionStart.TestRefusingCollectorDoesNotBlockRecording: 100,000 records in under 1 s.TestHangingCollectorDoesNotBlockRecording: same.TestASilentStreamingRequestIsResentOnANewConnection: resend in about 150 ms, under 2 s.TestRegistrationBucketIsPerIPv6Prefix: the unit part still runs. The end-to-end part (rate limit race) skips.Go tests where only the time check is guarded (the rest still runs):
TestStatuslineGoldenOutput,TestStatuslineGoldenMoney,TestStatuslineAgentNamesAreBounded,TestStatuslineGoldenWeeklyTip,TestStatuslineMoneyShowsWhenCachestateIsSlowerThanTheRender,TestStatuslineReportsLoadingNotDownOnATimeout, the shutdown test inproxyapp/shutdown_test.go(2 s), andTestLiteLLMConcurrentSingleFlight(100 ms).OpenCode node tests (4, via
timingOnlyinhelpers.mjs):The log-check test at the end of
failopen.test.mjsexpects the timing lines only when the switch is on.Not gated: tests with a 10 s or 15 s bound that is only a safety net, tests with a fake clock, and tests that skip themselves when "inconclusive".
How it was tested
macOS, Go 1.27.4. The load average was 230 to 325 during the run, so a result may be slower than on a calm machine.
go vet ./...,CGO_ENABLED=0 go build ./...: pass.scripts/dev/local-tests_test.sh: all cases pass, including the new timing and rerun cases.node --test opencode-plugin/test/*.test.mjs: without the variable 116 pass, 4 skip, 0 fail. WithCG_TIMING_TESTS=1: 120 pass.timing-tests-needed.sh: this PR givesrun; a docs-only diff givesskip.Behavior change
None for users. Tests and test scripts only.
Data dependence
None.