Commit Graph
1298 Commits
Author SHA1 Message Date
JATMN 5840d73b2a test: restore diagnostic mocks and reset trace state (#2354) 2026-10-23 11:14:35 -07:00
JATMN 03652ca8a2 test: make background termination race deterministic (#2355) 2026-10-23 10:58:25 -07:00
JATMN 0876fb2de0 chore: upgrade TypeScript to 6.0.3 (#2353) 2026-10-23 10:00:10 -07:00
JATMN 40297b4979 chore: upgrade Bun to 1.4.4 (#2351)
* chore: upgrade Bun to 1.4.3

* chore: upgrade Bun to 1.4.4
2026-10-23 09:22:42 -07:00
JATMN 7141ba29f3 test: restore registry after custom gateway tests (#2352) 2026-10-23 08:28:24 -07:00
JATMN 51226f0c89 test: reset teammate interruption trace state (#2350) 2026-10-23 06:08:50 -07:00
JATMN 2e415e7955 test: clear remembered provider routing after CLI tests (#2349) 2026-10-23 05:46:15 -07:00
JATMN 36b7ffd69a build: prepare tsconfig and relay types for TypeScript 6 (#2348) 2026-10-23 05:08:10 -07:00
JATMN 804e331c53 test: keep gitSettings tests independent of the temp dir location (#2347) 2026-10-23 05:05:50 -07:00
JATMN 4772c395b2 test: run the unit suite without --isolate (TA-001 round 2) (#2346)
* test: run the unit suite without --isolate (TA-001 round 2)

* test: clean up leaks exposed by running without --isolate (TA-001 round 2)

* test: clean up remaining leaks in shared-process runs (TA-001 round 2)

* test: reset query engine trace state before each test (TA-001 round 2)
2026-10-22 23:32:21 -07:00
JATMN ada7f0fe38 test: clean up remaining randomized-order leaks (TA-001 round 2) (#2345)
* test: clean up remaining randomized-order leaks (TA-001 round 2)

* test: keep file suggestion abort test deterministic after module restore (TA-001 round 2)

* test: bound lifecycle trace cleanup and avoid Bun isolate crash (TA-001 round 2)

* test: reset lifecycle trace state without crashing isolated runs (TA-001 round 2)
2026-10-22 22:22:59 -07:00
JATMN 11c6afe8d0 test: isolate env, process and global state leaks across randomized seeds (TA-001 round 2 batch 2) (#2344)
* test: isolate env, process and global state leaks across randomized seeds (TA-001 round 2 batch 2)

* test: keep batch 2 state isolation from leaking into later files (TA-001 round 2 batch 2)

Drop the standalone processExitCode helper self-test. Adding a discovered test file changed native shard assignments and seeded file order, exposing existing cross-file mock contamination. The existing finalizer and skills integration tests retain exit-code assertions and continue to exercise the helper.
2026-10-22 18:06:42 -07:00
JATMN 357b8da08e test: restore module exports after mocks (TA-001 round 2) (#2343) 2026-10-22 18:01:26 -07:00
JATMNandjatmn 0f8b4cbc87 test: restore leaked mock.module registrations behind randomized-order failures (TA-001 round 2) (#2342)
* test: restore real modules after modelOptions crossProfile and catalogDedup mocks (TA-001 round 2)

* test: restore real modules after leaked mock.module registrations (TA-001 round 2 batch 1)

* test: restore resume mocks without overlapping sessionStorage restore

* test: drop withRetry snapshot change from batch 1

* test: restore leaked mocks in batch 2 polluter files (TA-001 round 2 batch 1)

* test: keep discovery cache and retry tests isolated from restored mocks (TA-001 round 2 batch 1)

---------

Co-authored-by: jatmn <12479882+jatmn@users.noreply.github.com>
2026-10-22 17:10:33 -07:00
JATMN 0724ca8783 test: restore leaked module mocks behind the remaining non-isolated shard failures (TA-001 round 2) (#2341)
* test: restore leaked module mocks behind the remaining non-isolated shard failures (TA-001 round 2)

* test: restore real sessionStorage after resume tests (TA-001 round 2)
2026-10-22 14:47:51 -07:00
JATMN 56da2c4b40 test: restore real ColorPicker and CustomSelect exports after wizard step tests (TA-001 round 2) (#2340) 2026-10-22 12:55:21 -07:00
JATMN 90b34cbd9b test: restore leaked settings, sleep and fast-mode mocks and bound loadSkillsDir readiness waits (TA-001) (#2339) 2026-10-22 11:49:18 -07:00
JATMN a63ad4a9e0 test: restore real secureStorage exports after githubModelsCredentials hydrate tests (TA-001 round 2) (#2338) 2026-10-22 10:08:10 -07:00
JATMN 4eae36abd6 test: restore Shell and GrowthBook module mocks after BashTool sandboxAnalysis tests (#2336) 2026-10-22 09:03:45 -07:00
JATMN 5c9b3c92dc test: stub stdin ref/unref in cli premature-exit regression test (#2337) 2026-10-22 08:59:41 -07:00
JATMN c823efe56a test: add snapshotEnv helper and restore leaked env and auth state (TA-001 slice 4) (#2335) 2026-10-22 07:30:08 -07:00
JATMN c84411b9dd test: run attribution suites in a child when auth, beta or routing exports are polluted (TA-001 slice 5) (#2334) 2026-10-22 05:46:03 -07:00
JATMNandjatmn 0d85ac1be5 test: restore leaked provider, betas, sessionTitle and discovery module mocks (TA-001 slice 2) (#2332)
* test: restore leaked provider, betas, sessionTitle and discovery module mocks (TA-001 slice 2)

* test(model): restore real providerProfiles module after model command tests

---------

Co-authored-by: jatmn <12479882.jatmn@users.noreply.github.com>
2026-10-22 05:45:16 -07:00
JATMN 92d71e6b87 test: restore leaked settings, config and path state across test files (TA-001 slice 3) (#2331)
* test: restore leaked settings, config-home and path state in single-process runs (TA-001 slice 3)

* test(printMaxTurns): release shared mutation lock if setup throws
2026-10-22 05:44:44 -07:00
JATMN 3a646df821 test(gateways): assert OpenGateway route default model and credentials (#2330) 2026-10-21 22:29:48 -07:00
JATMNandjatmn dea4d393b3 test: restore leaked provider mocks and Concentrate env in single-process runs (#2328)
Co-authored-by: jatmn <12479882+jatmn@users.noreply.github.com>
2026-10-21 22:29:27 -07:00
JATMN 227fa02e3b test: consolidate stub walls in compact and extractMemories.abort tests (#2329) 2026-10-21 22:21:43 -07:00
JATMN 3a299281ba test(aimlapi): consolidate malformed lease-receipt tests into one table (#2327) 2026-10-21 21:28:33 -07:00
JATMN a8b9fa9aff test: consolidate Z.AI GLM-5.3 registry catalog tests into a golden table (#2326) 2026-10-21 21:24:45 -07:00
JATMN 19bb39c884 test: consolidate gateway catalog tests into per-gateway contract tables (#2325)
* test: consolidate gateway catalog tests into per-gateway contract tables

* test: assert opencode-go catalog excludes removed model ids
2026-10-21 21:00:41 -07:00
JATMN 6baae01922 test: consolidate vendor catalog tests into per-vendor contract tables (#2324)
* test: consolidate vendor catalog tests into per-vendor contract tables

* test: assert full descriptor limits and capabilities for nearai, longcat and xai
2026-10-21 20:59:55 -07:00
JATMN 7844534867 test: stabilize QueryGuard keepalive interruption test (#2323) 2026-10-21 18:18:19 -07:00
JATMN 75c73ea381 docs: add CONTRIBUTING notes for CI caching and subprocess test timeouts (#2322) 2026-10-21 18:08:10 -07:00
JATMN 1c42a10628 fix(shell): honor an abort that lands before the listener is attached (#2321)
* fix(shell): honor an abort that lands before the listener is attached

* test: spawn node timer instead of sleep for Windows portability
2026-10-21 18:00:49 -07:00
JATMN ae83f6e4cf ci: use shallow checkout for smoke-and-tests (#2320) 2026-10-21 17:34:16 -07:00
a4ed687b84 fix(agent): await per-agent output before completion (ORC-1337) (#2318)
* fix: synchronize agent completion with output eviction

Agent task completion could become externally observable before the
output eviction and flush sequence completed, resulting in callers
observing empty output files.

Root Cause
----------
completeAgentTask() returned immediately while evictTaskOutput()
continued asynchronously. Callers could observe task completion
before the eviction/flush chain finished.

Fix
---
- Make completeAgentTask() async and await eviction
- Await completeAsyncAgent() at both call sites
- Clarify ORC-1337 vs gh-20236 in comments

Testing
-------
- AgentTool: 59/59 passing
- LocalAgentTask: 6/6 passing

Refs: ORC-1337, gh-20236

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

* fix: move output barrier before terminal state transition

Review follow-up for ORC-1337 addressing both P1 findings:

1. Ordering: updateTaskState('completed') ran before the eviction
   await, so TaskOutput(block=true) readers released by the terminal
   status could still read a flushing file. The durable-output barrier
   now precedes the state transition.

2. Sidechain transcript: local-agent output is a symlink to the agent
   transcript written by the session-storage queue
   (recordSidechainTranscript) — no DiskTaskOutput entry exists, so
   evictTaskOutput alone resolved without waiting. completeAgentTask
   now awaits flushSessionStorage() (drains the queue and in-flight
   tracked chains) before evictTaskOutput and the status flip.

Also per review:
- Remove ORC-1337-FIX.md from the PR (P3)
- Add deterministic regression test gating both barriers
  (completionBarrier.test.ts) — verified to fail on the previous
  ordering
- Update call-site comments to describe the corrected sequence

Testing: AgentTool + LocalAgentTask 67/67 (incl. 2 new); tsc clean.

Refs: ORC-1337, gh-20236

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

* fix(agent): await scoped output writes before completion

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

* fix: cancel agent transcript waits without delaying cleanup

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

* fix: preserve agent output ownership across session changes

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

* fix: await agent output link replacement after clear

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

* fix: preserve agent output destination and finishing input admission

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

* fix(agent): preserve output destinations for background and resumed sessions

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

* fix: preserve agent output ownership across replacement and clear

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

* fix(agent): bind retained output links to the recording producer

Record successful sidechain append destinations by agent ID and require
retained output links to match that producer record. Preserve the record
across session clears and project overrides for retained resumes.

Cover swapped agent and project targets for captured and live writes.

Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>

---------

Co-authored-by: jatmn <jatmn@users.noreply.github.com>
Co-authored-by: Zolow-kuni <285616838+Zolow-kuni@users.noreply.github.com>
2026-10-21 16:49:38 -07:00
JATMN 87e6ae6359 test: stabilize watchdog and settings timing (#2319) 2026-10-21 16:25:50 -07:00
JATMNandMatthewFeroz a13ed45b14 feat(gateway): add Merge Gateway provider (#2317)
* feat(gateway): add Merge Gateway provider

Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com>

* fix(merge-gateway): preserve scoped credentials across profiles

Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com>

* fix: complete Merge Gateway credential and catalog handoffs

Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com>

* fix: constrain Merge catalog and admit provider env-file credentials

Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com>

* fix: preserve Merge credential ownership across profile and host settings

Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com>

* fix(merge-gateway): scope ambient key adoption and per-page discovery timeouts

Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com>

---------

Co-authored-by: MatthewFeroz <136640686+MatthewFeroz@users.noreply.github.com>
2026-10-21 15:46:34 -07:00
JATMN cb9f9ee0ca test: stabilize timing-sensitive tests (#2316) 2026-10-21 14:16:47 -07:00
JATMNandRepository contributors 1f6f747309 ci: skip unaffected pull request checks (#2315)
* ci: skip unaffected pull request checks

* fix(ci): run the PR intent scan on every pull request

---------

Co-authored-by: Repository contributors <undisclosed>
2026-10-21 14:09:41 -07:00
JATMN 0b8daaeb04 ci: run unit test shards in parallel (#2314)
* ci: run unit test shards in parallel

* fix(ci): address shard-selection review feedback

* ci: cache package downloads in the shard and dedicated test jobs
2026-10-21 13:19:52 -07:00
JATMN c5f53195ba ci: cache package downloads in PR checks (#2313)
* ci: cache package downloads in PR checks

* ci: cache package downloads in the suite job

* ci: fix suite cache key and separate root and web cache prefixes
2026-10-21 12:45:10 -07:00
JATMNandContributor ae9b3192a4 ci: isolate launcher checks from the full suite (#2312)
Co-authored-by: Contributor <>
2026-10-21 11:16:37 -07:00
JATMNandContributor e81a91784c test: include context efficiency feature tests in full check (#2311)
Co-authored-by: Contributor <redacted>
2026-10-21 10:36:00 -07:00
JATMN 76b4402057 ci: drop duplicate provider test steps from PR checks (#2308)
* ci: drop duplicate provider test steps from PR checks

* docs(contributing): drop provider suites from required preflight
2026-10-21 09:44:33 -07:00
JATMN 9254846b52 test(mcp): remove always-skipped CHICAGO_MCP toggle test (#2309) 2026-10-21 08:51:13 -07:00
JATMNandOpenClaude CI Maintenance 5a1fbe03e6 fix(tests): isolate skills homes and stabilize reload assertions (#2307)
Co-authored-by: OpenClaude CI Maintenance <ci@example.invalid>
2026-10-21 07:05:35 -07:00
JATMN a0c5c7d023 fix: stabilize settings writes and enable fork PR scans (#2290)
* fix: retire settings locks before cleanup and stabilize watcher coverage

* ci: scan fork pull requests with CodeQL

* test: allow full PowerShell permission parser retries
2026-10-21 18:31:02 +08:00
Kevin CodexandOpenClaude 8c46032db2 fix(aimlapi): derive the by-key identity without hashing the API key (#2293)
Resolves CodeQL js/insufficient-password-hash (alert 70):
aimlapiByKeyIdentity fed the API key into a plain SHA-256.

AI/ML API by-key top-ups (src/integrations/aimlapi, ProviderManager)
- The identity is now `key:v2:` + HMAC-SHA256 keyed BY the credential over
  a fixed label, so the key is never the hashed input. It stays cheap on
  the interactive path (no KDF stalling Ink before the async lock), and a
  known-answer test pins the value so the derivation cannot drift silently.
- Receipts written by earlier versions carry `key:<sha256>`. That value is
  deliberately never recomputed, so they are handled without hashing:
  - one that stores this credential (a settled saved-key top-up waiting on
    its profile write, which a claim otherwise refuses to replace even with
    abandonExisting) is matched by its stored key and upgraded under the
    lock, in both reconcileSettledAimlapiTopupStateAsync and the by-key
    claim (new `byKeyApiKey` claim option, passed by ProviderManager);
  - one with no stored key (an in-flight by-key checkout, or a settled
    env-key top-up) cannot be attributed and holds nothing unrecoverable,
    since a by-key payment is credited to its key server-side, so the next
    claim may replace it instead of refusing a re-run that can never match.
  Both are skipped while a mint/exchange lease on the record is live.

Skills watcher test (src/utils/skills)
- `disabled sibling edits stop triggering hooks…` flaked on loaded CI
  runners ("Expected number of calls: 1, Received: 2"). Its edit helper
  retries writes every 50ms until a hook fires, and a retry already in
  flight could land one more hook after the exact-count assertion or after
  the sibling watcher closed. Assert that each phase's edit was observed,
  wait until hooks are quiet between phases, and give the real-filesystem
  test a 15s budget. Under 12 saturated cores: original 2/15 failures,
  fixed 45/45 passes.

Co-authored-by: OpenClaude <openclaude@gitlawb.com>
2026-10-19 13:17:55 +08:00
Kevin CodexandOpenClaude 933019b6a9 test: use crypto.randomUUID for query-engine fixture uuids (#2289)
CodeQL default setup flagged js/insecure-randomness (alert #72, high)
on the custom-pricing budget fixture, which built message uuids from
Math.random(). The values never leave the test process, but the field
is typed as UUID and the same pattern appeared in three places across
two fixtures.

Generate the uuids with crypto.randomUUID() instead. This clears the
alert, matches the Message uuid type, and drops the
`as Message['uuid']` cast in the manual-compact cooldown fixture.
Nothing depended on the old user-/assistant-/test- prefixes.

Co-authored-by: OpenClaude <openclaude@gitlawb.com>
2026-10-18 12:00:39 +08:00