Repository navigation
Make the tee-logger file-write tests re-runnable and timing-free - #2
Merged
Merged
Conversation
Two defects in the same pair of tests. They slept a fixed 1300ms against a 1s flush interval. 300ms of margin is thin, and for the negative assertions a slip is worse than a failure: not.toContain passes trivially on a file that does not exist yet, so the leak guard could stop being able to fail. Now they poll for the markers they assert on, with a 4s deadline that sits under Bun's 5s per-test timeout so a real hang reports as a message rather than an opaque timeout. They also unlinked their own log file. platform/logger.ts caches the WriteStream by path in a module-level Map for the life of the process, so the unlink strands that stream on a deleted inode and no later run in the same process can recreate the file. Both tests passed once and failed on every repeat: invisible under a single bun test, reproducible with --rerun-each, and fatal under stryker, which re-runs the suite per mutant. Each test now uses a fresh logger name and does not unlink. Before: bun test --rerun-each 2 -> 2 fail. After: --rerun-each 3 -> 15 pass.
unicorn/consistent-function-scoping: readWhenFlushed does not close over anything in the describe callback, so it belongs at the outer scope. Caught by CI, which linted maximal-core for real once this branch invalidated the turbo cache entry that had been replaying.
Removing the fixed sleep outright would have destroyed the evidence: the intermittent maximal-core#test failure was never reproduced and that sleep was a suspect, so a run that would have failed on it must still say so. The 1300ms the old sleep allowed is now a warning, not a verdict. Polling backs off 256 -> 512 -> 1024 -> 2048 -> 4096ms, so the checks land near 0, 774, 1798 and 3840ms rather than spinning every 25ms. The warning compares the LAST UNSUCCESSFUL check against the threshold, not the elapsed total. A healthy ~1s flush is first SEEN at ~1798ms purely because of where the backoff lands, so warning on elapsed would fire on every green run and mean nothing. Asking 'was it still incomplete at a check after 1300ms?' fires only when the flush genuinely outran what the sleep permitted. Give-up moved to 20s with a 30s per-test budget, so the diagnostic message wins over Bun's 5s default rather than being cut off by it. Verified by forcing the threshold to 1ms: the warning fires and reports 'still incomplete 774ms in, seen at 1798ms'. At 1300ms it stays silent.
Passing a third argument to test() makes the call exceed one line, so prettier wants the name, the body and the timeout each on their own line. Formatted with the options the eslint config passes to prettier -- experimentalOperatorPosition start, experimentalTernaries, semi false -- since eslint --fix cannot run on this machine. Confined to the two test() calls; no semicolons introduced.
A failing run left nothing behind but console output, so a flake that did not reproduce could not be compared against a green run. Both suites now write a JUnit file and it is uploaded on always(), giving name, file, line and duration per test for all 2956 of them -- the artifact is worth most when the run is red. Bun's <failure> element carries no message, so the console remains where the diff and stack live. --reporter=junit only suppresses bun's ~1800 (pass) lines; every failure still prints in full, which is a net gain in signal. Split into two steps because the bun and vitest suites take different reporter flags. Passing the flags through turbo rather than editing four package.json files keeps the deviation count at zero and leaves > monimal@ test /Users/brian/github/stuffbucket/monimal > turbo run test --concurrency=1 • Packages in scope: @stuffbucket/maximal, @stuffbucket/maximal-core, @stuffbucket/maximal-electron, maximal-client • Running test in 4 packages • Remote caching disabled @stuffbucket/maximal-core:test: cache miss, executing ff83a71e17ba7772 @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: > @stuffbucket/[email protected] test /Users/brian/github/stuffbucket/monimal/packages/maximal-core @stuffbucket/maximal-core:test: > bun test @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: bun test v1.3.14 (0d9b296a) @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/claude-code-reconcile.test.ts: @stuffbucket/maximal-core:test: [info] claude-code: re-applied proxy base URL on boot (routing intent is on) @stuffbucket/maximal-core:test: (pass) reconcileClaudeCodeOnBoot > writes the proxy base URL when routing is intended [23.33ms] @stuffbucket/maximal-core:test: (pass) reconcileClaudeCodeOnBoot > is a no-op when routing is not intended [0.19ms] @stuffbucket/maximal-core:test: [info] claude-code: re-applied proxy base URL on boot (routing intent is on) @stuffbucket/maximal-core:test: (pass) reconcileClaudeCodeOnBoot > preserves sibling env keys when applying [2.08ms] @stuffbucket/maximal-core:test: [info] claude-code: removed proxy base URL for shutdown (routing intent persists for next boot) @stuffbucket/maximal-core:test: [warn] claude-code: routing intent is on, but a non-proxy ANTHROPIC_BASE_URL is present — left it untouched @stuffbucket/maximal-core:test: (pass) reconcileClaudeCodeOnBoot > does not clobber a foreign base URL even when intended [0.50ms] @stuffbucket/maximal-core:test: (pass) reconcileClaudeCodeOnShutdown > removes the proxy base URL when routing is intended [0.72ms] @stuffbucket/maximal-core:test: (pass) reconcileClaudeCodeOnShutdown > is a no-op when routing is not intended (leaves our URL in place) [0.31ms] @stuffbucket/maximal-core:test: [info] claude-code: removed proxy base URL for shutdown (routing intent persists for next boot) @stuffbucket/maximal-core:test: (pass) reconcileClaudeCodeOnShutdown > preserves sibling env keys when reverting [0.86ms] @stuffbucket/maximal-core:test: (pass) reconcileClaudeCodeOnShutdown > leaves a foreign base URL intact [0.30ms] @stuffbucket/maximal-core:test: [info] claude-code: re-applied proxy base URL on boot (routing intent is on) @stuffbucket/maximal-core:test: [info] claude-code: removed proxy base URL for shutdown (routing intent persists for next boot) @stuffbucket/maximal-core:test: (pass) boot/shutdown round trip > boot applies, shutdown removes, boot re-applies (intent persists) [4.91ms] @stuffbucket/maximal-core:test: [info] claude-code: re-applied proxy base URL on boot (routing intent is on) @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/network-diagnostics.test.ts: @stuffbucket/maximal-core:test: (pass) isTransportError > recognises the Bun { code, path, errno } shape [0.06ms] @stuffbucket/maximal-core:test: (pass) isTransportError > recognises a Bun path/errno shape carrying a code we don't enumerate [0.02ms] @stuffbucket/maximal-core:test: (pass) isTransportError > recognises node/undici 'fetch failed' via nested cause [0.02ms] @stuffbucket/maximal-core:test: (pass) isTransportError > recognises a nested cause.code even without the 'fetch failed' name/message [0.02ms] @stuffbucket/maximal-core:test: (pass) isTransportError > recognises AbortSignal.timeout's TimeoutError [0.15ms] @stuffbucket/maximal-core:test: (pass) isTransportError > does NOT treat a deliberate AbortError as a transport failure [0.04ms] @stuffbucket/maximal-core:test: (pass) isTransportError > does NOT treat an HTTP/application error as transport [0.06ms] @stuffbucket/maximal-core:test: (pass) summarizeTransportError / formatTransportError > pulls url from Bun's `path` and renders a safe one-liner [0.19ms] @stuffbucket/maximal-core:test: (pass) summarizeTransportError / formatTransportError > unwraps a nested node cause for code/syscall [0.08ms] @stuffbucket/maximal-core:test: (pass) summarizeTransportError / formatTransportError > carries the top-level error name and message through the summary [0.04ms] @stuffbucket/maximal-core:test: (pass) summarizeTransportError / formatTransportError > falls back to the raw message when no structured fields are present [0.05ms] @stuffbucket/maximal-core:test: (pass) summarizeTransportError / formatTransportError > renders an empty string when the summary is entirely empty [0.02ms] @stuffbucket/maximal-core:test: (pass) classifyNetworkFailure > no IP egress -> offline (typed, no prose) [0.10ms] @stuffbucket/maximal-core:test: (pass) classifyNetworkFailure > IP ok but DNS broken -> dns-failure [0.04ms] @stuffbucket/maximal-core:test: (pass) classifyNetworkFailure > IP + DNS ok but scope failed -> scope-unreachable, scope echoed [0.04ms] @stuffbucket/maximal-core:test: (pass) classifyNetworkFailure > interface count is exposed as typed data, not prose [0.04ms] @stuffbucket/maximal-core:test: (pass) probeNetwork > aggregates injected TCP/DNS/interface results [0.51ms] @stuffbucket/maximal-core:test: (pass) probeNetwork > treats DNS as working when no target host is supplied [0.12ms] @stuffbucket/maximal-core:test: (pass) probeNetwork > reports reachability via IPv6 when only the v6 targets connect [0.12ms] @stuffbucket/maximal-core:test: (pass) classifyNetworkFailure verdicts > each probe shape maps to its own kind [0.07ms] @stuffbucket/maximal-core:test: (pass) hostFromUrl > extracts the host from an absolute URL [0.06ms] @stuffbucket/maximal-core:test: (pass) hostFromUrl > returns null for missing / unparseable input [0.07ms] @stuffbucket/maximal-core:test: (pass) hostFromUrl > returns null for a parseable URL with an empty hostname [0.02ms] @stuffbucket/maximal-core:test: (pass) diagnoseNetworkError caching > re-uses the probe within the cache window, re-probes after [0.46ms] @stuffbucket/maximal-core:test: (pass) formatDiagnosisForLog > renders a plain dev-log line from the typed verdict [0.14ms] @stuffbucket/maximal-core:test: (pass) formatDiagnosisForLog > renders down/no-scope: ip=down, dns=down, and omits scope= when null [0.06ms] @stuffbucket/maximal-core:test: (pass) real-world scenarios (RFC-reserved fixtures, deterministic) > the incident shape: a resolvable, reachable host but the scope endpoint drops -> scope-unreachable [0.18ms] @stuffbucket/maximal-core:test: (pass) real-world scenarios (RFC-reserved fixtures, deterministic) > no raw egress at all -> offline [0.15ms] @stuffbucket/maximal-core:test: (pass) real-world scenarios (RFC-reserved fixtures, deterministic) > egress works but the resolver is down -> dns-failure [0.11ms] @stuffbucket/maximal-core:test: (pass) real-world scenarios (RFC-reserved fixtures, deterministic) > a caller-supplied .invalid target (NXDOMAIN) -> dns-failure [0.11ms] @stuffbucket/maximal-core:test: (pass) real-world scenarios (RFC-reserved fixtures, deterministic) > probe differentiates a nonexistent name from a dead resolver [0.75ms] @stuffbucket/maximal-core:test: (skip) real network probes (opt-in: MAXIMAL_NETWORK_TESTS=1) > defaultDnsLookup resolves the RFC 2606 reserved host @stuffbucket/maximal-core:test: (skip) real network probes (opt-in: MAXIMAL_NETWORK_TESTS=1) > defaultDnsLookup returns false for an RFC 6761 .invalid host (NXDOMAIN) @stuffbucket/maximal-core:test: (skip) real network probes (opt-in: MAXIMAL_NETWORK_TESTS=1) > a live resolver distinguishes a nonexistent name from DNS being down @stuffbucket/maximal-core:test: (skip) real network probes (opt-in: MAXIMAL_NETWORK_TESTS=1) > defaultTcpConnect fails against RFC 5737/3849 documentation IPs @stuffbucket/maximal-core:test: (skip) real network probes (opt-in: MAXIMAL_NETWORK_TESTS=1) > probeNetwork observes DNS liveness through the real resolver @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/api-config.test.ts: @stuffbucket/maximal-core:test: (pass) prepareMessageProxyHeaders applies message proxy headers by default [1.79ms] @stuffbucket/maximal-core:test: (pass) prepareMessageProxyHeaders leaves opencode headers untouched [0.05ms] @stuffbucket/maximal-core:test: (pass) prepareForCompact marks compact traffic as agent initiated [0.07ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/small-model.test.ts: @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > honors an explicitly configured model even if weak [0.09ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > ignores an empty/whitespace configured value [0.20ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > prefers a tool-capable Claude haiku-class model [0.03ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > matches haiku class by family alone (id lacks 'haiku') [0.05ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > matches haiku class by id when family omits it [0.04ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > does not treat a non-claude 'haiku' model as haiku-class [0.03ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > does not treat a claude non-haiku model as haiku-class [0.03ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > requires BOTH claude and haiku signals (rejects claude-only + haiku-only) [0.04ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > classifies a claude-prefixed id as haiku via startsWith [0.03ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > does not pick a haiku model that cannot call tools [0.03ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > falls back to any tool-capable model when no haiku exists [0.04ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > returns undefined when nothing is tool-capable [0.07ms] @stuffbucket/maximal-core:test: (pass) resolveSmallToolModel > returns undefined for an empty or missing catalog [0.03ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/log-redact.test.ts: @stuffbucket/maximal-core:test: (pass) scrubSecrets > masks GitHub token shapes (gho_/ghp_/ghu_/ghr_/ghs_) [0.23ms] @stuffbucket/maximal-core:test: (pass) scrubSecrets > masks the Copilot bearer (tid=…) shape [0.03ms] @stuffbucket/maximal-core:test: (pass) scrubSecrets > leaves ordinary auth log labels untouched [0.03ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps structural keys, redacts content strings [0.30ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps tool definitions' names/keys, redacts description text [0.12ms] @stuffbucket/maximal-core:test: (pass) redactForLog > redacts unknown content-bearing keys by default (fail-closed) [0.03ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps usage counts and numeric config [0.04ms] @stuffbucket/maximal-core:test: (pass) redactForLog > does not mutate the original payload [0.04ms] @stuffbucket/maximal-core:test: (pass) redactForLog > handles circular references without throwing [0.04ms] @stuffbucket/maximal-core:test: (pass) redactForLog > redacts strings inside arrays under non-structural keys [0.03ms] @stuffbucket/maximal-core:test: (pass) redactForLog > redacts a bare top-level string (no key context → not structural) [0.02ms] @stuffbucket/maximal-core:test: (pass) redactForLog > passes top-level null through unchanged [0.03ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "model" verbatim [0.03ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "object" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "provider" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "kind" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "status" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "source" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "service_tier" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "encoding" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "role" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "type" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "name" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "tool_name" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "function_name" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "stop_reason" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "finish_reason" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "stop" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "id" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "request_id" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "session_id" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "trace_id" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "tool_use_id" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "tool_call_id" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "anthropic_version" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "anthropic_beta" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "version" verbatim [0.02ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "schema_version" verbatim [0.02ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "media_type" verbatim [0.03ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "mime_type" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "detail" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "reasoning_effort" verbatim [0.01ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "effort" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > keeps the structural key "authtype" verbatim @stuffbucket/maximal-core:test: (pass) redactForLog > the allowlist test set matches the documented PII boundary [0.04ms] @stuffbucket/maximal-core:test: (pass) redactForLog > the same string is kept under a structural key, redacted under a non-structural one [0.06ms] @stuffbucket/maximal-core:test: (pass) redactForLog > keeps strings in an array under a structural key verbatim [0.03ms] @stuffbucket/maximal-core:test: (pass) redactForLog > array keep/redact tracks the parent key, not the element [0.04ms] @stuffbucket/maximal-core:test: (pass) redactForLog > matches allowlisted keys case-insensitively [0.03ms] @stuffbucket/maximal-core:test: (pass) redactForLog — transport/socket error fields > keeps unambiguous socket/DNS error fields, still redacts code/path [0.05ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/measure-baseline.test.ts: @stuffbucket/maximal-core:test: (pass) normalizeUsage > coerces present numeric fields [0.14ms] @stuffbucket/maximal-core:test: (pass) normalizeUsage > defaults missing / non-finite fields to 0 [0.05ms] @stuffbucket/maximal-core:test: (pass) extractStreamCacheRead > takes the max cache_read across message_start and message_delta [0.46ms] @stuffbucket/maximal-core:test: (pass) extractStreamCacheRead > returns 0 when no usage is present [0.07ms] @stuffbucket/maximal-core:test: (pass) extractStreamCacheRead > tolerates whitespace variations in the JSON [0.03ms] @stuffbucket/maximal-core:test: (pass) assessCaching > reports reuse when the second read jumps well past the first [0.06ms] @stuffbucket/maximal-core:test: (pass) assessCaching > does not count a cold second request as reuse [0.03ms] @stuffbucket/maximal-core:test: (pass) assessCaching > requires a margin so tiny noise is not a hit [0.02ms] @stuffbucket/maximal-core:test: (pass) assessCostVisibility > flags absent field as not surfaced (baseline) [0.09ms] @stuffbucket/maximal-core:test: (pass) assessCostVisibility > field present but zero → surfaced, nothing captured [0.02ms] @stuffbucket/maximal-core:test: (pass) assessCostVisibility > field present and positive → captured [0.02ms] @stuffbucket/maximal-core:test: (pass) assessCostVisibility > handles a malformed summary defensively [0.03ms] @stuffbucket/maximal-core:test: (pass) median > returns the middle of an odd-length list [0.08ms] @stuffbucket/maximal-core:test: (pass) median > averages the two middles of an even-length list [0.02ms] @stuffbucket/maximal-core:test: (pass) median > returns null for an empty list [0.02ms] @stuffbucket/maximal-core:test: (pass) parseArgs > reads label, base-url, model, cache-gap-ms flags [0.22ms] @stuffbucket/maximal-core:test: (pass) parseArgs > falls back to defaults when flags are omitted [0.05ms] @stuffbucket/maximal-core:test: (pass) parseArgs > reads --samples, --discard, and --compare (trailing slash trimmed) [0.04ms] @stuffbucket/maximal-core:test: (pass) parseArgs > clamps nonsensical samples/discard to safe minimums [0.03ms] @stuffbucket/maximal-core:test: (pass) percentile / mean / stdev > interpolates percentiles [0.11ms] @stuffbucket/maximal-core:test: (pass) percentile / mean / stdev > computes mean and sample stdev [1.04ms] @stuffbucket/maximal-core:test: (pass) summarizeSamples > reports dispersion and rounds [0.11ms] @stuffbucket/maximal-core:test: (pass) summarizeSamples > handles empty input [0.02ms] @stuffbucket/maximal-core:test: (pass) normalCdf > is ~0.5 at 0 and monotonic [0.04ms] @stuffbucket/maximal-core:test: (pass) mannWhitneyU > returns p≈1 for identical distributions [0.15ms] @stuffbucket/maximal-core:test: (pass) mannWhitneyU > detects a clear separation with enough samples [0.04ms] @stuffbucket/maximal-core:test: (pass) mannWhitneyU > handles an empty group [0.01ms] @stuffbucket/maximal-core:test: (pass) assessDelta > is inconclusive below the sample threshold [0.07ms] @stuffbucket/maximal-core:test: (pass) assessDelta > flags a real, large delta as significant [0.07ms] @stuffbucket/maximal-core:test: (pass) assessDelta > flags an overlapping delta as not significant [0.03ms] @stuffbucket/maximal-core:test: (pass) assessDelta > returns nulls for empty input [0.01ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/token-usage-retention-boot.test.ts: @stuffbucket/maximal-core:test: [warn] Token-usage retention sweep failed: file is not a database @stuffbucket/maximal-core:test: at run (unknown) @stuffbucket/maximal-core:test: at run (bun:sqlite:336:21) @stuffbucket/maximal-core:test: at initializeTokenUsageDb (src/lib/token-usage/store.ts:182:6) @stuffbucket/maximal-core:test: at open (src/lib/platform/sqlite.ts:157:20) @stuffbucket/maximal-core:test: at async pruneTokenUsageEvents (src/lib/token-usage/store.ts:396:20) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) @stuffbucket/maximal-core:test: (pass) startTokenUsageRetention survives an unusable database > a corrupt database file does not produce an unhandled rejection [70.01ms] @stuffbucket/maximal-core:test: [warn] Token-usage retention sweep failed: unable to open database file @stuffbucket/maximal-core:test: at open (unknown) @stuffbucket/maximal-core:test: at new Database (bun:sqlite:260:28) @stuffbucket/maximal-core:test: at openBunDatabase (src/lib/platform/sqlite.ts:89:21) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) @stuffbucket/maximal-core:test: (pass) startTokenUsageRetention survives an unusable database > an unopenable database path does not produce an unhandled rejection [55.41ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/copilot-rate-limit.test.ts: @stuffbucket/maximal-core:test: (pass) parseCopilotRateLimitHeader extracts remaining quota and reset time [0.13ms] @stuffbucket/maximal-core:test: (pass) getCopilotRateLimitUsage reads session and weekly headers [0.21ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/copilot-usage-schema.test.ts: @stuffbucket/maximal-core:test: (pass) getCopilotUsage boundary tolerates valid-but-lean responses > a response with no quota_snapshots does not throw [1.11ms] @stuffbucket/maximal-core:test: (pass) getCopilotUsage boundary tolerates valid-but-lean responses > quota_snapshots: null does not throw [0.09ms] @stuffbucket/maximal-core:test: (pass) getCopilotUsage boundary tolerates valid-but-lean responses > a snapshot missing chat/completions parses; unknown keys pass through [0.49ms] @stuffbucket/maximal-core:test: (pass) getCopilotUsage boundary tolerates valid-but-lean responses > omitting the previously-required metadata fields does not throw [0.05ms] @stuffbucket/maximal-core:test: (pass) getCopilotUsage boundary tolerates valid-but-lean responses > a named snapshot missing fields parses [0.06ms] @stuffbucket/maximal-core:test: (pass) getCopilotUsage boundary tolerates valid-but-lean responses > a partially-populated snapshot keeps the fields it did send [0.05ms] @stuffbucket/maximal-core:test: (pass) preflightCopilotError on a lean-but-entitled response > accepts the account rather than blaming the network [0.11ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/source-reference-integrity.test.ts: @stuffbucket/maximal-core:test: (pass) source comments cite files that exist > finds source files to scan (guards the walker itself) [2.49ms] @stuffbucket/maximal-core:test: (pass) source comments cite files that exist > every cited routes//lib//apps//services path resolves under src/ [11.31ms] @stuffbucket/maximal-core:test: (pass) source comments cite files that exist > no comment mentions a surface removed in the core split [5.73ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/setup-smoke.test.ts: @stuffbucket/maximal-core:test: [success] Proxy responded 200 from http://localhost:57228/models (1 models available) @stuffbucket/maximal-core:test: (pass) setup smokeTest — GET /models (#225) > passes on 200 with a non-empty model catalog [14.11ms] @stuffbucket/maximal-core:test: [warn] Proxy is up but not authenticated to GitHub. Run `maximal auth`, then re-run setup. @stuffbucket/maximal-core:test: (pass) setup smokeTest — GET /models (#225) > fails (no throw) on 401 — proxy up but unauthenticated [6.37ms] @stuffbucket/maximal-core:test: [warn] Proxy has a valid token but returned an empty Copilot model catalog (upstream or entitlement issue). Re-run setup once resolved. @stuffbucket/maximal-core:test: (pass) setup smokeTest — GET /models (#225) > fails on a 200 with an empty catalog [4.90ms] @stuffbucket/maximal-core:test: [warn] Proxy responded 502 Bad Gateway @stuffbucket/maximal-core:test: (pass) setup smokeTest — GET /models (#225) > fails on a non-2xx upstream error [12.88ms] @stuffbucket/maximal-core:test: [warn] Could not reach the proxy at http://localhost:1/models. Start it with `maximal start` in another terminal, then re-run setup. Unable to connect. Is the computer able to access the url? @stuffbucket/maximal-core:test: at async smokeTest (src/setup.ts:138:22) @stuffbucket/maximal-core:test: at async <anonymous> (tests/setup-smoke.test.ts:73:19) @stuffbucket/maximal-core:test: (pass) setup smokeTest — GET /models (#225) > fails (no throw) when the proxy is unreachable [0.80ms] @stuffbucket/maximal-core:test: [success] Proxy responded 200 from http://localhost:57242/models (1 models available) @stuffbucket/maximal-core:test: (pass) setup smokeTest — GET /models (#225) > sends no x-api-key (a real 401 is surfaced, not masked) [5.29ms] @stuffbucket/maximal-core:test: [success] --deep-smoke: completion round-tripped via claude-haiku-4.9 @stuffbucket/maximal-core:test: (pass) setup deepSmokeTest — opt-in completion (#227) > POSTs a completion whose model comes from the catalog, not a literal [8.08ms] @stuffbucket/maximal-core:test: [warn] --deep-smoke: no usable model in the catalog to send a completion. @stuffbucket/maximal-core:test: (pass) setup deepSmokeTest — opt-in completion (#227) > fails (no completion sent) when the catalog has no usable model [6.69ms] @stuffbucket/maximal-core:test: [warn] --deep-smoke: completion failed 500 Internal Server Error @stuffbucket/maximal-core:test: (pass) setup deepSmokeTest — opt-in completion (#227) > fails on a non-2xx completion [7.73ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/completion-rejection.test.ts: @stuffbucket/maximal-core:test: [log] <-- model: claude-test @stuffbucket/maximal-core:test: (pass) createMessages > happy path: returns parsed JSON and clears stale rejection [1.70ms] @stuffbucket/maximal-core:test: [log] <-- model: claude-test @stuffbucket/maximal-core:test: [error] Failed to create messages Response {} @stuffbucket/maximal-core:test: [log] <-- model: claude-test @stuffbucket/maximal-core:test: (pass) createMessages > auth-fatal: throws CopilotAuthFatalError without setting sidecar [2.52ms] @stuffbucket/maximal-core:test: [error] Failed to create messages Response {} @stuffbucket/maximal-core:test: (pass) createMessages > non-fatal quota (429): throws HTTPError and sets sidecar [0.71ms] @stuffbucket/maximal-core:test: [log] <-- model: claude-test @stuffbucket/maximal-core:test: [error] Failed to create messages Response {} @stuffbucket/maximal-core:test: (pass) createMessages > non-fatal model-denial (403, no markers): throws HTTPError and sets sidecar [2.16ms] @stuffbucket/maximal-core:test: [log] <-- model: gpt-test @stuffbucket/maximal-core:test: [error] Failed to create chat completions Response {} @stuffbucket/maximal-core:test: (pass) createChatCompletions > auth-fatal: throws CopilotAuthFatalError without setting sidecar [0.64ms] @stuffbucket/maximal-core:test: [log] <-- model: gpt-test @stuffbucket/maximal-core:test: [error] Failed to create chat completions Response {} @stuffbucket/maximal-core:test: (pass) createChatCompletions > non-fatal quota (429): throws HTTPError and sets sidecar [0.28ms] @stuffbucket/maximal-core:test: [log] <-- model: gpt-test @stuffbucket/maximal-core:test: [error] Failed to create chat completions Response {} @stuffbucket/maximal-core:test: (pass) createChatCompletions > non-fatal model-denial (403): throws HTTPError and sets sidecar [0.30ms] @stuffbucket/maximal-core:test: [log] <-- model: gpt-test @stuffbucket/maximal-core:test: [log] <-- model: gpt-test @stuffbucket/maximal-core:test: [error] Failed to create responses Response {} @stuffbucket/maximal-core:test: (pass) createResponses > auth-fatal: throws CopilotAuthFatalError without setting sidecar [0.50ms] @stuffbucket/maximal-core:test: [error] Failed to create responses Response {} @stuffbucket/maximal-core:test: [log] <-- model: gpt-test @stuffbucket/maximal-core:test: (pass) createResponses > non-fatal quota (429): throws HTTPError and sets sidecar [0.28ms] @stuffbucket/maximal-core:test: [error] Failed to create responses Response {} @stuffbucket/maximal-core:test: (pass) createResponses > non-fatal model-denial (403): throws HTTPError and sets sidecar [1.45ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/abortable-sleep.test.ts: @stuffbucket/maximal-core:test: (pass) abortableSleep > resolves without waiting when the signal is already aborted [7.40ms] @stuffbucket/maximal-core:test: (pass) abortableSleep > an abort resolves a pending sleep instead of waiting it out [11.46ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/deviceid.test.ts: @stuffbucket/maximal-core:test: (pass) getVSCodeDeviceId falls back to an ephemeral UUID when persistence fails [0.43ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/utils.test.ts: @stuffbucket/maximal-core:test: (pass) getUUID returns a deterministic standards-compliant UUIDv4 [1.51ms] @stuffbucket/maximal-core:test: randomUUID(): bf535f0e-9101-485f-95c2-3160a6ca0148 @stuffbucket/maximal-core:test: legacy getUUID("hello world"): b94d27b9-934d-3e08-a52e-52d7da7dabfa @stuffbucket/maximal-core:test: getUUID("hello world"): b94d27b9-934d-4e08-a52e-52d7da7dabfa @stuffbucket/maximal-core:test: getUUID("hello world") again: b94d27b9-934d-4e08-a52e-52d7da7dabfa @stuffbucket/maximal-core:test: (pass) prints randomUUID and deterministic UUID for comparison [0.20ms] @stuffbucket/maximal-core:test: (pass) getRootSessionId supports JSON-like user_id metadata [0.31ms] @stuffbucket/maximal-core:test: (pass) getRootSessionId keeps legacy parsing before JSON fallback [0.07ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/trace.test.ts: @stuffbucket/maximal-core:test: (pass) traceIdMiddleware > sanitizes a valid client trace id and exposes it via request context [3.81ms] @stuffbucket/maximal-core:test: (pass) traceIdMiddleware > falls back to a generated trace id for invalid input and preserves it in SSE [26.95ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/web-tools-executor.test.ts: @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > parses titles and decodes the uddg-wrapped redirect target [1.25ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > caps results at maxResults [0.16ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > fully strips nested tags and decodes entities without double-unescaping [0.16ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > returns unavailable on a non-2xx response [15.84ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > returns too_many_requests on a 429 [0.28ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > returns unavailable when fetch itself throws (network error) [0.23ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > returns an empty list (not an error) when the page has no result anchors [0.12ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > skips non-result anchors, deduplicates URLs, and drops empty titles [0.20ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > stops at maxResults even when more result anchors are present [0.16ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > keeps direct http:// result links and drops non-URL hrefs [34.33ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > skips a result anchor that has no href attribute [0.11ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > injects DuckDuckGo site:/-site: operators for allowed/blocked domains [0.11ms] @stuffbucket/maximal-core:test: (pass) InProcessFetchExecutor.search — DuckDuckGo HTML scrape > uses a bare site: (no OR-group) for a single allowed domain [0.05ms] @stuffbucket/maximal-core:test: (pass) chooseExecutor — precedence > prefers OllamaWebExecutor when OLLAMA_API_KEY is set (over Copilot) [0.04ms] @stuffbucket/maximal-core:test: (pass) chooseExecutor — precedence > uses CopilotResponsesExecutor when no key but a /responses model exists [0.02ms] @stuffbucket/maximal-core:test: (pass) chooseExecutor — precedence > falls back to DuckDuckGo when no key and no /responses model [0.02ms] @stuffbucket/maximal-core:test: (pass) pickResponsesModel — resilient to model churn > returns undefined when no model supports /responses (e.g. Claude-only) [0.04ms] @stuffbucket/maximal-core:test: (pass) pickResponsesModel — resilient to model churn > honors the configured small model when it supports /responses [0.02ms] @stuffbucket/maximal-core:test: (pass) pickResponsesModel — resilient to model churn > falls through to a mini-class model when the configured one is gone [0.02ms] @stuffbucket/maximal-core:test: (pass) pickResponsesModel — resilient to model churn > falls through to any /responses model when no mini-class exists @stuffbucket/maximal-core:test: (pass) CopilotResponsesExecutor.search — harvest from /responses > harvests cited (title+url) then raw sources, deduped and capped [0.50ms] @stuffbucket/maximal-core:test: (pass) CopilotResponsesExecutor.search — harvest from /responses > forces the search and stamps an undated query with today's date [0.10ms] @stuffbucket/maximal-core:test: (pass) CopilotResponsesExecutor.search — harvest from /responses > passes a query that already has a date cue through unchanged [0.06ms] @stuffbucket/maximal-core:test: (pass) CopilotResponsesExecutor.search — harvest from /responses > passes allowed/blocked domains through as a /responses filters object [0.06ms] @stuffbucket/maximal-core:test: (pass) CopilotResponsesExecutor.search — harvest from /responses > omits the filters key entirely when no domains are set [0.04ms] @stuffbucket/maximal-core:test: (pass) CopilotResponsesExecutor.search — harvest from /responses > records normalized token usage for the brokered /responses call [0.06ms] @stuffbucket/maximal-core:test: (pass) CopilotResponsesExecutor.search — harvest from /responses > returns unavailable when createResponses throws [0.06ms] @stuffbucket/maximal-core:test: (pass) CopilotResponsesExecutor.search — harvest from /responses > returns unavailable on a non-object / streamed result [0.03ms] @stuffbucket/maximal-core:test: (pass) CopilotResponsesExecutor.search — harvest from /responses > delegates fetch() to the injected fetch executor [0.05ms] @stuffbucket/maximal-core:test: (pass) harvestResponsesHits — defensive parsing > returns [] for a result with no output array @stuffbucket/maximal-core:test: (pass) harvestResponsesHits — defensive parsing > skips malformed annotations and sources without url [0.03ms] @stuffbucket/maximal-core:test: (pass) harvestResponsesHits — defensive parsing > caps the harvest at maxResults [0.04ms] @stuffbucket/maximal-core:test: (pass) harvestResponsesHits — defensive parsing > falls back to the url as title when a citation has no title [0.02ms] @stuffbucket/maximal-core:test: (pass) harvestResponsesHits — defensive parsing > ignores non-object content blocks and non-object source entries [0.06ms] @stuffbucket/maximal-core:test: (pass) withDateHint > appends the current date to an undated query [0.01ms] @stuffbucket/maximal-core:test: (pass) withDateHint > leaves a query with an explicit year unchanged @stuffbucket/maximal-core:test: (pass) withDateHint > leaves a query with a recency word unchanged [1.09ms] @stuffbucket/maximal-core:test: (pass) withDateHint > leaves a query with a month name unchanged [0.14ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/auth-controller-events.test.ts: @stuffbucket/maximal-core:test: (pass) auth.changed emission (ADR-0007 producer side) > markSignedIn publishes the authenticated status [0.58ms] @stuffbucket/maximal-core:test: (pass) auth.changed emission (ADR-0007 producer side) > markSignedOut publishes the unauthenticated status [0.09ms] @stuffbucket/maximal-core:test: (pass) auth.changed emission (ADR-0007 producer side) > a transition emits exactly once per state change [0.08ms] @stuffbucket/maximal-core:test: (pass) upstream-rejection changes emit auth.changed (ADR-0007) > setLastUpstreamRejection pushes the rejection on the auth status [0.06ms] @stuffbucket/maximal-core:test: (pass) upstream-rejection changes emit auth.changed (ADR-0007) > a same-content rejection does not re-emit [0.04ms] @stuffbucket/maximal-core:test: (pass) upstream-rejection changes emit auth.changed (ADR-0007) > clearing an existing rejection emits exactly once [0.05ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/agent-initiator.test.ts: @stuffbucket/maximal-core:test: (pass) messagesInitiator (/v1/messages) > last user message with real text is user-initiated [0.07ms] @stuffbucket/maximal-core:test: (pass) messagesInitiator (/v1/messages) > last user message with array text block is user-initiated [0.07ms] @stuffbucket/maximal-core:test: (pass) messagesInitiator (/v1/messages) > last user message with only tool_result is agent-initiated [0.04ms] @stuffbucket/maximal-core:test: (pass) messagesInitiator (/v1/messages) > last assistant message is agent-initiated [0.02ms] @stuffbucket/maximal-core:test: (pass) messagesInitiator (/v1/messages) > empty history is agent-initiated [0.02ms] @stuffbucket/maximal-core:test: (pass) chatCompletionsInitiator (/chat/completions) > last tool message is agent-initiated [0.04ms] @stuffbucket/maximal-core:test: (pass) chatCompletionsInitiator (/chat/completions) > last assistant message is agent-initiated [0.02ms] @stuffbucket/maximal-core:test: (pass) chatCompletionsInitiator (/chat/completions) > last user message is user-initiated [0.03ms] @stuffbucket/maximal-core:test: (pass) chatCompletionsInitiator (/chat/completions) > empty history is user-initiated [0.03ms] @stuffbucket/maximal-core:test: (pass) responsesInitiator (/responses) > empty / missing input is user-initiated [0.09ms] @stuffbucket/maximal-core:test: (pass) responsesInitiator (/responses) > last item missing a role is agent-initiated [0.03ms] @stuffbucket/maximal-core:test: (pass) responsesInitiator (/responses) > last assistant item is agent-initiated (case-insensitive) [0.04ms] @stuffbucket/maximal-core:test: (pass) responsesInitiator (/responses) > last user item is user-initiated [0.02ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/version-floor-gate.test.ts: @stuffbucket/maximal-core:test: (pass) parseManifest > reads min_supported_version alongside version [0.37ms] @stuffbucket/maximal-core:test: (pass) parseManifest > tolerates a leading v and surrounding whitespace [0.05ms] @stuffbucket/maximal-core:test: (pass) parseManifest > a channel with no floor declared reads as null, not as zero [0.04ms] @stuffbucket/maximal-core:test: (pass) parseManifest > rejects anything that is not a bare semver [0.15ms] @stuffbucket/maximal-core:test: (pass) parseManifest > reads the floor from the build's own channel only [0.06ms] @stuffbucket/maximal-core:test: (pass) checkVersionFloor > a build below the floor is retired [0.98ms] @stuffbucket/maximal-core:test: (pass) checkVersionFloor > a build exactly at the floor is not retired [0.07ms] @stuffbucket/maximal-core:test: (pass) checkVersionFloor > a build above the floor is not retired [0.07ms] @stuffbucket/maximal-core:test: (pass) checkVersionFloor > a -dev build of the floor release is not retired [0.04ms] @stuffbucket/maximal-core:test: (pass) checkVersionFloor > a real prerelease below the floor is still retired [0.05ms] @stuffbucket/maximal-core:test: [warn] Update check failed (continuing): offline @stuffbucket/maximal-core:test: at fetch (tests/version-floor-gate.test.ts:191:39) @stuffbucket/maximal-core:test: at refreshManifest (src/lib/update/update-check.ts:261:23) @stuffbucket/maximal-core:test: at ensureManifest (src/lib/update/update-check.ts:302:19) @stuffbucket/maximal-core:test: at checkVersionFloor (src/lib/update/update-check.ts:396:8) @stuffbucket/maximal-core:test: at <anonymous> (tests/version-floor-gate.test.ts:196:12) @stuffbucket/maximal-core:test: (pass) checkVersionFloor > fails open when nothing has been fetched yet [2.00ms] @stuffbucket/maximal-core:test: [warn] Update check failed (continuing): offline @stuffbucket/maximal-core:test: at <anonymous> (tests/version-floor-gate.test.ts:205:32) @stuffbucket/maximal-core:test: at refreshManifest (src/lib/update/update-check.ts:261:23) @stuffbucket/maximal-core:test: at ensureManifest (src/lib/update/update-check.ts:302:19) @stuffbucket/maximal-core:test: at getUpdateStatus (src/lib/update/update-check.ts:337:9) @stuffbucket/maximal-core:test: at <anonymous> (tests/version-floor-gate.test.ts:217:13) @stuffbucket/maximal-core:test: [warn] Update check failed (continuing): [DOMException [TimeoutError]: The operation timed out.] @stuffbucket/maximal-core:test: [warn] Update check: manifest fetch returned HTTP 503; skipping. @stuffbucket/maximal-core:test: (pass) checkVersionFloor > fails open on a network error, a timeout and a non-200 [0.57ms] @stuffbucket/maximal-core:test: (pass) checkVersionFloor > fails open on a 200 whose body is not a usable manifest [0.03ms] @stuffbucket/maximal-core:test: [warn] Update check failed (continuing): offline @stuffbucket/maximal-core:test: at fetch (tests/version-floor-gate.test.ts:233:39) @stuffbucket/maximal-core:test: at refreshManifest (src/lib/update/update-check.ts:261:23) @stuffbucket/maximal-core:test: at ensureManifest (src/lib/update/update-check.ts:302:19) @stuffbucket/maximal-core:test: at getUpdateStatus (src/lib/update/update-check.ts:337:9) @stuffbucket/maximal-core:test: at <anonymous> (tests/version-floor-gate.test.ts:235:11) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) @stuffbucket/maximal-core:test: (pass) checkVersionFloor > keeps the last known floor when a later refresh fails [0.15ms] @stuffbucket/maximal-core:test: (pass) checkVersionFloor > bounds the manifest fetch with a 2s abort signal [0.07ms] @stuffbucket/maximal-core:test: (pass) checkVersionFloor > a cold read kicks exactly one background refresh, not one per call [8.80ms] @stuffbucket/maximal-core:test: (pass) checkVersionFloor > a failed refresh is not retried on every request [3.86ms] @stuffbucket/maximal-core:test: (pass) the two network knobs are separate promises > checkUpdates:false silences the notification; the floor keeps its own [3.26ms] @stuffbucket/maximal-core:test: <-- GET /v1/models @stuffbucket/maximal-core:test: [info] Fetching models from https://api.githubcopilot.com/models @stuffbucket/maximal-core:test: [warn] Update check failed (continuing): offline @stuffbucket/maximal-core:test: at fetch (tests/version-floor-gate.test.ts:233:39) @stuffbucket/maximal-core:test: at refreshManifest (src/lib/update/update-check.ts:261:23) @stuffbucket/maximal-core:test: at ensureManifest (src/lib/update/update-check.ts:302:19) @stuffbucket/maximal-core:test: at getUpdateStatus (src/lib/update/update-check.ts:337:9) @stuffbucket/maximal-core:test: at <anonymous> (tests/version-floor-gate.test.ts:235:11) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) (repeated 2 times) @stuffbucket/maximal-core:test: --> GET /v1/models �[33m401�[0m 1ms @stuffbucket/maximal-core:test: (pass) the two network knobs are separate promises > enforceVersionFloor:false stops the fetch and the gating [9.77ms] @stuffbucket/maximal-core:test: <-- GET /v1/models @stuffbucket/maximal-core:test: --> GET /v1/models �[33m401�[0m 0ms @stuffbucket/maximal-core:test: (pass) the two network knobs are separate promises > a floor the update check happened to cache is not enforced once off [0.84ms] @stuffbucket/maximal-core:test: <-- GET /v1/models @stuffbucket/maximal-core:test: --> GET /v1/models �[33m401�[0m 0ms @stuffbucket/maximal-core:test: (pass) the two network knobs are separate promises > both off means zero outbound calls [36.79ms] @stuffbucket/maximal-core:test: (pass) the two network knobs are separate promises > both default to on [1.31ms] @stuffbucket/maximal-core:test: (pass) update/status reports the floor > min_supported rides along for diagnostics [0.13ms] @stuffbucket/maximal-core:test: <-- GET /v1/models @stuffbucket/maximal-core:test: --> GET /v1/models �[33m426�[0m 0ms @stuffbucket/maximal-core:test: (pass) the proxy path refuses a retired build > a below-floor build gets 426 build_retired with the remedy [0.25ms] @stuffbucket/maximal-core:test: <-- POST /chat/completions @stuffbucket/maximal-core:test: --> POST /chat/completions �[33m426�[0m 0ms @stuffbucket/maximal-core:test: <-- POST /models @stuffbucket/maximal-core:test: --> POST /models �[33m426�[0m 0ms @stuffbucket/maximal-core:test: <-- POST /embeddings @stuffbucket/maximal-core:test: --> POST /embeddings �[33m426�[0m 0ms @stuffbucket/maximal-core:test: <-- POST /responses @stuffbucket/maximal-core:test: --> POST /responses �[33m426�[0m 0ms @stuffbucket/maximal-core:test: <-- POST /v1/chat/completions @stuffbucket/maximal-core:test: --> POST /v1/chat/completions �[33m426�[0m 0ms @stuffbucket/maximal-core:test: <-- POST /v1/models @stuffbucket/maximal-core:test: --> POST /v1/models �[33m426�[0m 0ms @stuffbucket/maximal-core:test: <-- POST /v1/messages @stuffbucket/maximal-core:test: --> POST /v1/messages �[33m426�[0m 0ms @stuffbucket/maximal-core:test: <-- POST /copilot/v1/messages @stuffbucket/maximal-core:test: (pass) the proxy path refuses a retired build > every upstream-touching route family is gated [0.59ms] @stuffbucket/maximal-core:test: --> POST /copilot/v1/messages �[33m426�[0m 0ms @stuffbucket/maximal-core:test: <-- GET /v1/models @stuffbucket/maximal-core:test: --> GET /v1/models �[33m426�[0m 0ms @stuffbucket/maximal-core:test: (pass) the proxy path refuses a retired build > the gate runs BEFORE the GitHub-auth gate [0.11ms] @stuffbucket/maximal-core:test: <-- GET / @stuffbucket/maximal-core:test: --> GET / �[32m200�[0m 1ms @stuffbucket/maximal-core:test: <-- GET /status @stuffbucket/maximal-core:test: --> GET /status �[32m200�[0m 1ms @stuffbucket/maximal-core:test: <-- GET /setup-status @stuffbucket/maximal-core:test: --> GET /setup-status �[32m200�[0m 11ms @stuffbucket/maximal-core:test: <-- GET /control/rpc @stuffbucket/maximal-core:test: --> GET /control/rpc �[33m404�[0m 0ms @stuffbucket/maximal-core:test: (pass) the proxy path refuses a retired build > the diagnosis-and-recovery surfaces stay reachable [15.09ms] @stuffbucket/maximal-core:test: <-- GET /v1/models @stuffbucket/maximal-core:test: --> GET /v1/models �[33m401�[0m 0ms @stuffbucket/maximal-core:test: (pass) at or above the floor there is no effect at all > a supported build reaches the auth gate untouched [0.46ms] @stuffbucket/maximal-core:test: <-- GET /v1/models @stuffbucket/maximal-core:test: --> GET /v1/models �[33m401�[0m 0ms @stuffbucket/maximal-core:test: (pass) at or above the floor there is no effect at all > a manifest with no floor is a no-op [0.35ms] @stuffbucket/maximal-core:test: [warn] Update check failed (continuing): offline @stuffbucket/maximal-core:test: at fetch (tests/version-floor-gate.test.ts:527:39) @stuffbucket/maximal-core:test: at refreshManifest (src/lib/update/update-check.ts:261:23) @stuffbucket/maximal-core:test: at ensureManifest (src/lib/update/update-check.ts:302:19) @stuffbucket/maximal-core:test: at getUpdateStatus (src/lib/update/update-check.ts:337:9) @stuffbucket/maximal-core:test: at <anonymous> (tests/version-floor-gate.test.ts:530:11) @stuffbucket/maximal-core:test: <-- GET /v1/models @stuffbucket/maximal-core:test: --> GET /v1/models �[33m401�[0m 0ms @stuffbucket/maximal-core:test: (pass) at or above the floor there is no effect at all > an unreachable manifest is a no-op (fail-open on the request path) [0.87ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/messages-preprocess.test.ts: @stuffbucket/maximal-core:test: (pass) mergeToolResultForClaude > removes tool reference turn boundaries before merging [0.55ms] @stuffbucket/maximal-core:test: (pass) mergeToolResultForClaude > keeps Tool loaded text when the message has no tool_reference [0.05ms] @stuffbucket/maximal-core:test: (pass) mergeToolResultForClaude > merges text blocks into matching tool_result blocks [0.24ms] @stuffbucket/maximal-core:test: (pass) mergeToolResultForClaude > appends all text blocks to the last tool_result when counts differ [0.12ms] @stuffbucket/maximal-core:test: (pass) mergeToolResultForClaude attachments > merges attachments into matching tool_result blocks when counts match [0.40ms] @stuffbucket/maximal-core:test: (pass) mergeToolResultForClaude attachments > appends image and document blocks to the last tool_result [0.06ms] @stuffbucket/maximal-core:test: (pass) mergeToolResultForClaude attachments fallback > appends all attachments to the last tool_result when counts differ [0.06ms] @stuffbucket/maximal-core:test: (pass) mergeToolResultForClaude attachments fallback > keeps text merging and appends attachments to the last tool_result [0.04ms] @stuffbucket/maximal-core:test: (pass) mergeToolResultForClaude attachments with tool_reference > falls back to the last tool_result without tool_reference [0.03ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload > strips cache_control scope, filters thinking blocks, and enables adaptive thinking [0.21ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload > does not enable adaptive thinking when tool choice forces tool use [0.02ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload > drops top_p when temperature and top_p are both present on a non-adaptive model [0.02ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload > keeps temperature alone untouched on a non-adaptive model [0.02ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload > keeps top_p alone untouched on a non-adaptive model [0.01ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload > strips temperature/top_p/top_k on a reasoning-effort-only model (GPT-5.6) [0.02ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload extended-thinking display (#210) > client asks for adaptive with no display -> defaults to summarized [0.03ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload extended-thinking display (#210) > client sends no thinking param -> still defaults to summarized [0.01ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload extended-thinking display (#210) > client supplies an explicit display -> preserved, not overwritten [0.01ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload extended-thinking display (#210) > claude-opus-4.7 -> always summarized regardless of incoming display [0.02ms] @stuffbucket/maximal-core:test: (pass) prepareMessagesApiPayload extended-thinking display (#210) > client explicitly disables thinking -> not force-set to adaptive [0.01ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/github-api-base-override.test.ts: @stuffbucket/maximal-core:test: (pass) defaults to public GitHub when GITHUB_API_BASE is unset [3.64ms] @stuffbucket/maximal-core:test: (pass) GITHUB_API_BASE redirects both the login host and the API host [0.11ms] @stuffbucket/maximal-core:test: (pass) an accepted value is normalized to its origin [0.09ms] @stuffbucket/maximal-core:test: (pass) GITHUB_API_BASE outranks COPILOT_API_ENTERPRISE_URL [0.04ms] @stuffbucket/maximal-core:test: (pass) GITHUB_API_BASE is ignored unless NODE_ENV is test [0.23ms] @stuffbucket/maximal-core:test: (pass) rejects every override that is not a bare loopback http origin [0.23ms] @stuffbucket/maximal-core:test: (pass) device_code and user_code come from the overridden host [9.03ms] @stuffbucket/maximal-core:test: [error] Failed to get models response body bad request: Authorization header is badly formatted @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: [warn] Models cache prime failed; serving the last-known (possibly empty) catalog. Will retry on the next model-list request or activity. Failed to get models @stuffbucket/maximal-core:test: at <anonymous> (src/services/copilot/get-models.ts:23:15) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) @stuffbucket/maximal-core:test: (pass) polls the overridden host through authorization_pending → slow_down → access_token [4075.40ms] @stuffbucket/maximal-core:test: (pass) surfaces access_denied from the overridden host [1010.67ms] @stuffbucket/maximal-core:test: (pass) surfaces expired_token from the overridden host [1015.28ms] @stuffbucket/maximal-core:test: (pass) accepts an ephemeral-port fixture on 127.0.0.1 and credentials it [6.88ms] @stuffbucket/maximal-core:test: (pass) accepts an ephemeral-port fixture on ::1 and credentials it [5.00ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/start-cli-options.test.ts: @stuffbucket/maximal-core:test: (pass) start command meta > command is named 'start' [0.03ms] @stuffbucket/maximal-core:test: (pass) start command meta > description mentions Copilot API [0.03ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — exact key set > declares exactly the expected flag keys [0.04ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — port > alias is -p [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — port > type is string (citty parses then we Number.parseInt) [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — port > default is '4141' [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — port > description is human-readable [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — verbose > alias is -v [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — verbose > type is boolean [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — verbose > default is false [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — verbose > description is 'Enable verbose logging' [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — account-type > alias is -a [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — account-type > type is string [0.03ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — account-type > default is 'individual' [0.04ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — account-type > description lists the three valid options [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — manual > type is boolean [0.03ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — manual > default is false [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — manual > description is 'Enable manual request approval' [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — manual > has no short alias (manual is rare; explicit only) [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — rate-limit > alias is -r [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — rate-limit > type is string (parsed via Number.parseInt) [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — rate-limit > description mentions seconds [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — wait > alias is -w [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — wait > type is boolean [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — wait > default is false [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — wait > description explains rate-limit dependency [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — github-token > alias is -g [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — github-token > type is string [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — github-token > has no default (override only) [0.02ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — github-token > description directs the user to the `auth` subcommand [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — claude-code > alias is -c [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — claude-code > type is boolean [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — claude-code > default is false [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — claude-code > description mentions Claude Code launch helper [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — show-token > type is boolean [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — show-token > default is false (we don't leak tokens by default) [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — show-token > description is the operator-grep-friendly form [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — proxy-env > type is boolean [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — proxy-env > default is false [0.01ms] @stuffbucket/maximal-core:test: (pass) start command CLI args — proxy-env > description mentions environment variables [0.02ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/poll-access-token.test.ts: @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > returns the token when GitHub responds with access_token [3.33ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > captures refresh_token + expiries when the App issues expiring tokens [0.22ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > leaves refresh material null for a non-expiring token (no fields present) [0.03ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > converts expires_in seconds to absolute epoch-ms against the given now [0.04ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > keeps polling on authorization_pending [0.25ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > honours slow_down by continuing past it [0.22ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > uses a server-supplied interval when larger than current [0.19ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > throws on expired_token [0.34ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > throws on access_denied [0.25ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > surfaces error_description for unrecognised errors [0.14ms] @stuffbucket/maximal-core:test: [warn] Device-code poll: empty response, retrying @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > treats 200 with empty body as pending, not success [0.13ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > self-expires once the device code's lifetime has elapsed, without polling [0.07ms] @stuffbucket/maximal-core:test: [warn] Device-code poll: network error, retrying network down @stuffbucket/maximal-core:test: at <anonymous> (tests/poll-access-token.test.ts:201:53) @stuffbucket/maximal-core:test: at unknown @stuffbucket/maximal-core:test: at sendRequest (src/lib/http/send-request.ts:170:10) @stuffbucket/maximal-core:test: at pollAccessToken (src/services/github/poll-access-token.ts:195:24) @stuffbucket/maximal-core:test: at async expectRejects (tests/poll-access-token.test.ts:78:11) @stuffbucket/maximal-core:test: at async <anonymous> (tests/poll-access-token.test.ts:203:11) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) @stuffbucket/maximal-core:test: [warn] Device-code poll: network error, retrying network down @stuffbucket/maximal-core:test: at <anonymous> (tests/poll-access-token.test.ts:201:53) @stuffbucket/maximal-core:test: at unknown @stuffbucket/maximal-core:test: at sendRequest (src/lib/http/send-request.ts:170:10) @stuffbucket/maximal-core:test: at pollAccessToken (src/services/github/poll-access-token.ts:195:24) @stuffbucket/maximal-core:test: at async expectRejects (tests/poll-access-token.test.ts:78:11) @stuffbucket/maximal-core:test: at async <anonymous> (tests/poll-access-token.test.ts:203:11) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) @stuffbucket/maximal-core:test: [warn] Device-code poll: network error, retrying network down @stuffbucket/maximal-core:test: at <anonymous> (tests/poll-access-token.test.ts:201:53) @stuffbucket/maximal-core:test: at unknown @stuffbucket/maximal-core:test: at sendRequest (src/lib/http/send-request.ts:170:10) @stuffbucket/maximal-core:test: at pollAccessToken (src/services/github/poll-access-token.ts:195:24) @stuffbucket/maximal-core:test: at async expectRejects (tests/poll-access-token.test.ts:78:11) @stuffbucket/maximal-core:test: at async <anonymous> (tests/poll-access-token.test.ts:203:11) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) @stuffbucket/maximal-core:test: [warn] Device-code poll: network error, retrying network down @stuffbucket/maximal-core:test: at <anonymous> (tests/poll-access-token.test.ts:201:53) @stuffbucket/maximal-core:test: at unknown @stuffbucket/maximal-core:test: at sendRequest (src/lib/http/send-request.ts:170:10) @stuffbucket/maximal-core:test: at pollAccessToken (src/services/github/poll-access-token.ts:195:24) @stuffbucket/maximal-core:test: at async expectRejects (tests/poll-access-token.test.ts:78:11) @stuffbucket/maximal-core:test: at async <anonymous> (tests/poll-access-token.test.ts:203:11) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) @stuffbucket/maximal-core:test: [warn] Device-code poll: network error, retrying network down @stuffbucket/maximal-core:test: at <anonymous> (tests/poll-access-token.test.ts:201:53) @stuffbucket/maximal-core:test: at unknown @stuffbucket/maximal-core:test: at sendRequest (src/lib/http/send-request.ts:170:10) @stuffbucket/maximal-core:test: at pollAccessToken (src/services/github/poll-access-token.ts:195:24) @stuffbucket/maximal-core:test: at async expectRejects (tests/poll-access-token.test.ts:78:11) @stuffbucket/maximal-core:test: at async <anonymous> (tests/poll-access-token.test.ts:203:11) @stuffbucket/maximal-core:test: at processTicksAndRejections (native:7:39) @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > gives up after repeated transport failures instead of polling forever [0.37ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > does not hot-loop or run unbounded when interval/expires_in are missing [0.17ms] @stuffbucket/maximal-core:test: (pass) pollAccessToken (RFC 8628) > retries a transient transport error and then succeeds [0.08ms] @stuffbucket/maximal-core:test: @stuffbucket/maximal-core:test: tests/token-usage.test.ts: @stuffbucket/maximal-core:test: (pass) token usage storage > records trace id and prefers x-session-affinity for session id [2.91ms] @stuffbucket/maximal-core:test: (pass) token usage storage > uses explicit metadata session id when no session affinity exists [0.68ms] @stuffbucket/maximal-core:test: (pass) token usage storage > does not write zero-token usage events [0.63ms] @stuffbucket/maximal-core:test: (pass) token usage storage > summarizes by model with total token and user fields [0.63ms] @stuffbucket/maximal-core:test: (pass) token usage storage > captures and sums total_nano_aiu cost across events [0.54ms] @stuffbucket/maximal-core:test: (pass) token usage storage > events page carries per-event total_nano_aiu and is_premium [0.60ms] @stuffbucket/maximal-core:test: (pass) token usage storage > returns paginated usage events with user id [0.53ms] @stuffbucket/maximal-core:test: (pass) token usage storage > only falls back to interaction id when no real session id exists [0.53ms] @stuffbucket/maximal-core:test: (pass) token usage provider dimension + series + all period > summary groups by provider (copilot + external) [0.55ms] @stuffbucket/maximal-core:test: (pass) token usage provider dimension + series + all period > series buckets sum to the summary total (day → hourly, zero-filled) [0.81ms] @stuffbucket/maximal-core:test: (pass) token usage provi…
packages/**/reports follows pnpm's workspace symlinks into node_modules, so the artifact carried maximal-core's report again under maximal/node_modules and maximal-electron's again under maximal/client/node_modules -- 1.9MB for 750KB of distinct data. Globbing one directory deep cannot traverse them. The comment also claimed --reporter=junit suppresses bun's per-test lines. That is true when bun is invoked directly and false through turbo, which is how CI runs it: the log kept all 1841 (pass) lines. Nothing is lost by that -- console output is intact and the report is written either way -- but the comment said otherwise.
The first run with the JUnit upload produced no artifact at all: the commit touched only .github/, which is not an input to any package test task, so all four replayed from cache, wrote no report, and if-no-files-found: ignore left the upload empty. That defeats the point. A red run is never cached, so the artifact would exist when it matters most, but there would be no green baselines to compare it against -- and comparing runs is the whole reason it exists. Declaring reports/** as an output makes turbo cache and restore it. Verified: write the report, delete it, rerun without --force, and the cache hit restores it byte for byte. reports/** is already excluded from the task inputs, so writing one does not invalidate the hash it was cached under.
The workflow_dispatch switch added two commits ago was inert. Turborepo 2 runs tasks in strict env mode, so a variable not declared in turbo.json never reaches the task shell: the tracer emitted 3 lines invoked directly and 0 through turbo, which is how CI runs it. Declaring it under the task's MANPATH=:/usr/share/man:/usr/local/share/man:/Applications/Ghostty.app/Contents/Resources/ghostty/../man: GHOSTTY_RESOURCES_DIR=/Applications/Ghostty.app/Contents/Resources/ghostty TERM_PROGRAM=ghostty TERM=xterm-ghostty SHELL=/bin/zsh TMPDIR=/var/folders/1s/zrz49vq907s90nbykdjqrghw0000gn/T/ TERM_PROGRAM_VERSION=1.3.1 USER=brian COMMAND_MODE=unix2003 SSH_AUTH_SOCK=/var/run/com.apple.launchd.RqySK32wXk/Listeners __CF_USER_TEXT_ENCODING=0x0:0:0 PATH=/Users/brian/.local/share/maximal/shims:/Users/brian/.local/bin:/Users/brian/.local/share/maximal/shims:/Users/brian/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Applications/Ghostty.app/Contents/MacOS:/Users/brian/go/bin:/Users/brian/.claude/plugins/cache/claude-plugins-official/superpowers/6.2.0/bin:/Users/brian/.claude/plugins/cache/claude-plugins-official/code-simplifier/1.0.0/bin:/Users/brian/.claude/plugins/cache/claude-plugins-official/feature-dev/unknown/bin:/Users/brian/.claude/plugins/cache/claude-plugins-official/gopls-lsp/1.0.0/bin:/Users/brian/.claude/plugins/marketplaces/stuffbucket-skills/plugins/stuffbucket/bin:/Users/brian/.claude/plugins/cache/claude-code-warp/warp/2.0.0/bin GHOSTTY_SHELL_FEATURES=cursor:blink,path,title LaunchInstanceID=B1081FD0-3B43-4EDB-8E8D-C0629D0E4B62 __CFBundleIdentifier=com.mitchellh.ghostty PWD=/Users/brian/github/stuffbucket/monimal LANG=en_US.UTF-8 XPC_FLAGS=0x0 XPC_SERVICE_NAME=0 SHLVL=2 HOME=/Users/brian TERMINFO=/Applications/Ghostty.app/Contents/Resources/terminfo LOGNAME=brian XDG_DATA_DIRS=/usr/local/share:/usr/share:/Applications/Ghostty.app/Contents/Resources/ghostty/.. GHOSTTY_BIN_DIR=/Applications/Ghostty.app/Contents/MacOS OSLogRateLimit=64 SECURITYSESSIONID=186b9 COLORTERM=truecolor OLDPWD=/Users/brian/github/stuffbucket/monimal DOCKER_HOST=unix:///Users/brian/.colima/default/docker.sock DOCKER_BUILDKIT=1 HOMEBREW_PREFIX=/opt/homebrew HOMEBREW_CELLAR=/opt/homebrew/Cellar HOMEBREW_REPOSITORY=/opt/homebrew FPATH=/opt/homebrew/share/zsh/site-functions:/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.9/functions INFOPATH=/opt/homebrew/share/info: RBENV_SHELL=zsh NoDefaultCurrentDirectoryInExePath=1 COREPACK_ENABLE_AUTO_PIN=0 AI_AGENT=claude-code_2-1-227_agent CLAUDE_CODE_ENTRYPOINT=cli CLAUDE_CODE_MESSAGING_SOCKET=/tmp/cc-socks/11122.sock ANTHROPIC_BASE_URL=http://127.0.0.1:4141 GIT_EDITOR=true CLAUDE_CODE_EXECPATH=/Users/brian/.local/share/claude/versions/2.1.227 CLAUDECODE=1 CLAUDE_CODE_SESSION_ID=34ec1035-f337-4b9a-813f-74459884cf60 CLAUDE_CODE_CHILD_SESSION=1 CLAUDE_PID=11122 CLAUDE_EFFORT=medium _=/usr/bin/env rather than passThroughEnv fixes both halves. passThroughEnv would forward the value but leave it out of the cache key, so dispatching with tracing on against an unchanged tree would replay the previous run's logs and produce no trace at all. As MANPATH=:/usr/share/man:/usr/local/share/man:/Applications/Ghostty.app/Contents/Resources/ghostty/../man: GHOSTTY_RESOURCES_DIR=/Applications/Ghostty.app/Contents/Resources/ghostty TERM_PROGRAM=ghostty TERM=xterm-ghostty SHELL=/bin/zsh TMPDIR=/var/folders/1s/zrz49vq907s90nbykdjqrghw0000gn/T/ TERM_PROGRAM_VERSION=1.3.1 USER=brian COMMAND_MODE=unix2003 SSH_AUTH_SOCK=/var/run/com.apple.launchd.RqySK32wXk/Listeners __CF_USER_TEXT_ENCODING=0x0:0:0 PATH=/Users/brian/.local/share/maximal/shims:/Users/brian/.local/bin:/Users/brian/.local/share/maximal/shims:/Users/brian/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/pkg/env/global/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Applications/Ghostty.app/Contents/MacOS:/Users/brian/go/bin:/Users/brian/.claude/plugins/cache/claude-plugins-official/superpowers/6.2.0/bin:/Users/brian/.claude/plugins/cache/claude-plugins-official/code-simplifier/1.0.0/bin:/Users/brian/.claude/plugins/cache/claude-plugins-official/feature-dev/unknown/bin:/Users/brian/.claude/plugins/cache/claude-plugins-official/gopls-lsp/1.0.0/bin:/Users/brian/.claude/plugins/marketplaces/stuffbucket-skills/plugins/stuffbucket/bin:/Users/brian/.claude/plugins/cache/claude-code-warp/warp/2.0.0/bin GHOSTTY_SHELL_FEATURES=cursor:blink,path,title LaunchInstanceID=B1081FD0-3B43-4EDB-8E8D-C0629D0E4B62 __CFBundleIdentifier=com.mitchellh.ghostty PWD=/Users/brian/github/stuffbucket/monimal LANG=en_US.UTF-8 XPC_FLAGS=0x0 XPC_SERVICE_NAME=0 SHLVL=2 HOME=/Users/brian TERMINFO=/Applications/Ghostty.app/Contents/Resources/terminfo LOGNAME=brian XDG_DATA_DIRS=/usr/local/share:/usr/share:/Applications/Ghostty.app/Contents/Resources/ghostty/.. GHOSTTY_BIN_DIR=/Applications/Ghostty.app/Contents/MacOS OSLogRateLimit=64 SECURITYSESSIONID=186b9 COLORTERM=truecolor OLDPWD=/Users/brian/github/stuffbucket/monimal DOCKER_HOST=unix:///Users/brian/.colima/default/docker.sock DOCKER_BUILDKIT=1 HOMEBREW_PREFIX=/opt/homebrew HOMEBREW_CELLAR=/opt/homebrew/Cellar HOMEBREW_REPOSITORY=/opt/homebrew FPATH=/opt/homebrew/share/zsh/site-functions:/usr/local/share/zsh/site-functions:/usr/share/zsh/site-functions:/usr/share/zsh/5.9/functions INFOPATH=/opt/homebrew/share/info: RBENV_SHELL=zsh NoDefaultCurrentDirectoryInExePath=1 COREPACK_ENABLE_AUTO_PIN=0 AI_AGENT=claude-code_2-1-227_agent CLAUDE_CODE_ENTRYPOINT=cli CLAUDE_CODE_MESSAGING_SOCKET=/tmp/cc-socks/11122.sock ANTHROPIC_BASE_URL=http://127.0.0.1:4141 GIT_EDITOR=true CLAUDE_CODE_EXECPATH=/Users/brian/.local/share/claude/versions/2.1.227 CLAUDECODE=1 CLAUDE_CODE_SESSION_ID=34ec1035-f337-4b9a-813f-74459884cf60 CLAUDE_CODE_CHILD_SESSION=1 CLAUDE_PID=11122 CLAUDE_EFFORT=medium _=/usr/bin/env it forwards AND changes the hash, so asking for a trace forces the task to execute. Verified: with it set, cache miss and [test-trace] lines appear; without it, silent and cacheable.
Three findings from an adversarial review of this workflow. globalDependencies gains .nvmrc and .github/workflows/ci.yml. Neither was an input to any task, so bumping the node version or the pinned bun version replayed every task from a cache built on the OLD runtime and reported FULL TURBO. It also means a dependabot PR, which touches only .github, is no longer verified by a pure cache replay. Verified: perturbing .nvmrc turns a lint cache hit into a cache miss. The test task no longer excludes .github/**. maximal-electron's workflows.test.ts and workflow-health.test.ts assert against packages/maximal-electron/.github/ workflows, and excluding that directory from the task inputs made those tests structurally unable to re-run on a change to their own subject -- the gate replayed a pass against the previous contents. Verified: appending a line to a vendored workflow now turns a test cache hit into a cache miss. The JUnit comment claimed a restored report means 'same inputs, same numbers'. That is false. Turbo's inputs cover four package directories and exclude .github, reports, research_log and .claude, so two commits with different content can share a hash and an artifact. The comment now says to check for 'cache miss, executing' before trusting the numbers as this commit's.
A red-team pass on the previous commit found it bought correctness too dearly. Passing the whole of .github/workflows/ci.yml as a globalDependency invalidates every task in every package on any edit, including comment-only ones -- roughly 90s per commit to re-verify nothing, and it destroys the signal that no package changed. It was also mostly redundant: turbo hashes pass-through args, so the load-bearing part of the workflow already invalidated the test cache. Measured: no args e257727a743288ad, junit.xml 944268ec504abc81, OTHER.xml 39af67925c68f8e3. The residue worth catching was the runtime pin, which is not a pass-through arg. bun-version moves out of the workflow into a root .bun-version, hashed as a globalDependency, and setup-bun reads it via bun-version-file. Verified: bumping .bun-version changes the test hash f39477f628d98d33 -> 92f6fccadf6c7e13, while a comment appended to ci.yml leaves it at f39477f628d98d33. The test task also re-excludes .github/pr-artifacts/**. Un-excluding .github wholesale to let the workflow tests see their subject pulled in 13 PR screenshot PNGs, so adding a screenshot would have invalidated maximal's test task. The workflow files stay in the inputs, which is the part that mattered.
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.
Two defects in the same pair of tests in
maximal-core/tests/tee-logger.test.ts.Fixed sleep against an async flush
They slept a fixed 1300ms against the writer's 1s flush interval. 300ms of margin is thin, and for the negative assertions a slip is worse than a flake:
not.toContainpasses trivially on a file that does not exist yet, so a timing slip would quietly turn the token-leak guard into a test that cannot fail.They now poll for the markers they assert on, with a 4s deadline that sits under Bun's 5s per-test timeout so a real hang reports as a message rather than an opaque timeout.
They unlinked their own log file
platform/logger.tscaches theWriteStreamby path in a module-levelMapfor the life of the process. Unlinking the file strands that stream on a deleted inode, so no later run in the same process can recreate it. Both tests passed once and failed on every repeat.That is invisible under a single
bun test, reproducible with--rerun-each, and fatal under stryker, which re-runs the suite per mutant. Each test now uses a fresh logger name and does not unlink.What this does not fix
The intermittent
maximal-core#testfailure that prompted this is still unreproduced — 15+ clean runs of the full suite, and it recurred once mid-investigation without being captured. Removing the arbitrary timeout is a plausible cause of it, but unproven.Expect lint to fail on this PR
pnpm run lintis broken repo-wide and two caches were hiding it:Root
typescriptis 7.0.2, hoisted frommaximal-client's^7.0.2bypublic-hoist-pattern[]=*, while[email protected]resolved against 5.9.3 and TS 7 dropped that API. It crashes on files this PR does not touch (downstream/check.ts,tests/token-usage.test.ts).Locally
eslint --cachemasked it. In CI turbo masked it —@stuffbucket/maximal-core:lint -> cache hit, replaying logs. This PR changes a maximal-core file, so it invalidates that hash and CI runs eslint for real, probably for the first time in a while.Fix is a separate decision: perfectionist arrives transitively via
@echristian/eslint-config, so a rootpnpm.overridesentry is the only lever (installed 4.15.1, latest 5.10.1) — or align thetypescript@^7.0.2outlier instead.