Commit Graph
451 Commits
Author SHA1 Message Date
marius-kilocode 7b9a84f63a fix(cli): restore terminal startup 2026-08-26 15:39:23 +02:00
marius-kilocode eba00e6aff chore(cli): update Bun to 1.4.0 2026-08-25 12:12:25 +02:00
Yury Zialionka 8aff7ade1b Merge origin/main: reconcile with independently landed #13091 and #13113
Main landed the same httpapi design (git-opt-in fixtures, --shard flag)
and the same permission.create readiness wait. Resolution adopts main's
implementations and keeps this branch's unique work on top: the
--shards child-process orchestrator (adapted to main's zero-based
shard indexing), scenario retry with backoff gated on state-reset,
project.update isolation, and exerciser env stripping. Removed the
superseded agentsReady/probe machinery and this branch's duplicate
round-robin filter (double-sharding silently dropped scenarios).

Validated: coverage, auth, and 4-shard effect passes all green
(315 checks, 0 failures).
2026-08-13 21:42:43 -06:00
Yury Zialionka b7bf24815c Merge branch 'perf/in-process-fast-tier' into integration/test-pipeline-speedup 2026-08-13 21:24:45 -06:00
Yury Zialionka 031ae4a7a3 fix(test): second review round — measurement integrity and hang budget
--update-durations now disables batching so every file is measured
per-file (batched members' entries otherwise rot), and only passing
runs record durations (a timed-out file would write the kill deadline
and permanently skew LPT).

Timed-out work items are no longer retried: the deadline already
proves a hang, and a second 600s attempt could push a shard past the
45-minute job budget.

A flaky batch now annotates the member files that failed the first
attempt instead of the pseudo-file. Defender exclusions apply per
path instead of aborting on the first policy-locked one.
2026-08-13 21:24:42 -06:00
Yury Zialionka 5aed6f5f18 refactor(test): flatten tier entries; bound the demotion scan; fix a stale comment
FAST_TIERS drops the single-field wrapper left from the hand-weight era.
The unsafe-marker scan reads files in chunks of 64 so a low soft fd
limit cannot fail startup. The durations comment points at
--update-durations instead of a workflow that no longer exists.
2026-08-13 21:07:44 -06:00
Yury Zialionka 32a883c690 Merge branch 'perf/in-process-fast-tier' into integration/test-pipeline-speedup 2026-08-13 18:53:28 -06:00
Yury Zialionka fb65ca161b fix(test): merge --update-durations over existing measurements
Replacing the file wiped every batched member's measured duration —
exactly the data the computed batch weights read. Fresh per-file
timings now merge over the existing entries; deleted files drop out.
2026-08-13 18:50:56 -06:00
Yury Zialionka 2d0d15f882 Merge branch 'perf/in-process-fast-tier' into integration/test-pipeline-speedup 2026-08-13 18:39:04 -06:00
Yury Zialionka 2b81730c51 Merge branch 'perf/httpapi-optin-git-fixtures' into integration/test-pipeline-speedup 2026-08-13 18:39:04 -06:00
Yury Zialionka a4539b8804 perf(test): compute batch weights from member durations; review fixes
Batch shard weights are now the sum of member durations (hint >
measured > typical boot-dominated file) plus one process boot, replacing
hand-tuned per-tier constants that had gone stale (fast-tier-misc
declared 30s of ~86s real work; fast-tier-tool 55s of ~250s on Windows).

Review fixes: tool/shell, tool/task, and kilocode/daemon leave the
batches (real-work-dominated or subprocess-timing files); weight() is
memoized (it runs inside sort comparators, each miss a stat syscall);
timeout messages report the deadline actually applied to the work item;
the module-scope env-write detector also matches bracket assignments;
--update-durations refreshes the measured-durations file after a full
run; entry matching is one shared helper.
2026-08-13 18:38:50 -06:00
Yury Zialionka ae3a5de98c fix(test): harden httpapi sharding against env pinning and cold-start races
Shard children now strip KILO_HTTPAPI_EXERCISE_* so a pinned database
or global root cannot make concurrent shards collide on shared state.

The scenario retry gains a second, longer backoff (1s then 3s): sharded
children run fewer scenarios each, so early scenarios can land before
agent projections warm and one second is not always enough.
2026-08-13 18:38:33 -06:00
Yury Zialionka 366242526a Merge branch 'perf/in-process-fast-tier' into integration/test-pipeline-speedup 2026-08-13 18:20:02 -06:00
Yury Zialionka aea90225fc refactor(test): make batch composition self-maintaining
Tier entries are directory prefixes; a new test file batches (or not)
by location alone. The hand-kept exclude list shrinks to the four
timing-sensitive entries a source scan cannot detect; files with
detectable process-wide markers (mock.module, AppRuntime.dispose,
global fetch spies, module-scope env writes) are demoted to per-file
runs automatically instead of failing the suite.
2026-08-13 18:19:59 -06:00
Yury Zialionka 673a6cccfc Merge branch 'perf/in-process-fast-tier' into integration/test-pipeline-speedup 2026-08-13 18:05:49 -06:00
Yury Zialionka a7bdcfc2f7 perf(test): start heavy batches first; make artifact upload non-fatal
The worker queue sorted by raw file weight, which is 0 for batch
pseudo-files (not real paths) — batches started last, leaving one
worker running a full batch after the rest of the shard drained.
Sorting by shard weight starts the heaviest items first and shortens
the tail.

The batch-safety guard now reads member sources in parallel, and the
diagnostics-only artifact upload no longer fails a green job on a
runner-side network blip (seen as ECONNREFUSED on Blacksmith).
2026-08-13 18:05:47 -06:00
Yury Zialionka 8b1c4b07f4 Merge branch 'perf/in-process-fast-tier' into integration/test-pipeline-speedup 2026-08-13 18:00:24 -06:00
Yury Zialionka 9b9cbe896e fix(test): honor the batch-safety guard for subdirectory tiers
The new guard correctly flagged four files inside batched subdirectories
(mock.module in kilocode/presence, global fetch spies in kilocode/sessions)
that had been batch-safe only by luck of batch composition. They run
per-file now; the exclude set applies to every tier, not just the root.
2026-08-13 18:00:21 -06:00
Yury Zialionka 2092724ffc Merge branch 'perf/in-process-fast-tier' into integration/test-pipeline-speedup 2026-08-13 17:54:42 -06:00
Yury Zialionka eed3a153e6 perf(test): batch cli, tool, and misc dirs; weight shards by measured durations
Three probes proved cli/ (minus run/), tool/, and the small acp/lsp/mcp/
plugin/storage/... dirs isolation-safe in a shared process (1052 tests,
0 failures). Work items drop from 327 to 233.

Sharding now weights unbatched files by measured durations
(script/kilocode/test-durations.json, parsed from a full local run)
instead of byte size, so LPT packs shards evenly.

The batch builder now refuses to batch files with process-wide markers
(mock.module, AppRuntime.dispose, global fetch spies) so a future test
cannot silently poison a shared process.
2026-08-13 17:54:32 -06:00
Yury Zialionka 407939c9f0 Merge branch 'perf/in-process-fast-tier' into integration/test-pipeline-speedup 2026-08-13 17:21:36 -06:00
Yury Zialionka 13a6b9d452 perf(test): split root fast tier into eight smaller batches
Smaller max work items let LPT pack the six Windows shards evenly;
a batch retry also costs half as much wall-clock.
2026-08-13 17:21:05 -06:00
Yury Zialionka da1fb306e6 fix(test): keep the stall-simulation test out of the fast tier
issue-8656-stall waits on a 90s real-time stall window; under batch
CPU contention on the Windows runner it misses the window. It joins
the timing-sensitive exclusion class and runs per-file again.
2026-08-13 17:15:33 -06:00
Yury Zialionka da089f0c7a perf(test): batch top-level kilocode tests into four hash-split fast tiers
194 of 211 top-level kilocode/*.test.ts files are isolation-safe in a
shared process (validated: 1612 tests, 0 failures in one superset run).
The 17 exclusions are files that mutate process-wide state: bun
mock.module (process-wide and permanent), AppRuntime.dispose() in
teardown, global fetch spies, and real subprocess/watcher timing.

Work items drop from 506 to 327; each root batch runs ~50 files for
one process spawn instead of fifty.
2026-08-13 16:39:31 -06:00
Yury Zialionka f81fc29622 fix(test): drop kilocode/permission from the fast tier
permission-origins.test.ts asserts the merged config carries no
global-scope keys, so it cannot share an XDG root with batch-mates
that write global config (seen on CI as a leaked '*': 'global' bash
rule). The directory returns to per-file isolation.
2026-08-13 15:45:38 -06:00
Yury Zialionka 140a75393f perf(test): expand the fast tier to four parallel batches (161 files)
Extends the fast tier from 37 to 161 files (~25% of the suite) across
four independently-scheduled batches, each empirically verified to pass
in a shared process (probes: 449 + 497 + 184 tests, zero failures):

- fast-tier-core: unchanged 37-file batch
- fast-tier-kilocode: 51 files (config, permission, provider, util, ...)
- fast-tier-kilocode-sessions: 49 files (session-export, sessions, session)
- fast-tier-kilocode-tools: 24 files (tool, cloud, anaconda-desktop)

Multiple batches instead of one keep each batch short enough to
schedule like a normal heavy file; LPT spreads them across shards and
worker slots. ~157 fewer process spawns per run - the dominant unit
cost on Windows (CreateProcessW + Defender per spawn).

The 208 top-level kilocode/*.test.ts files were probed and are NOT
batch-safe (536 cross-contamination failures in a shared process) -
they stay per-file until the #12998 singleton work lands.

Full suite locally: 505/506 with all four batches green (the one
failure is the pre-existing run-process SIGINT timeout that fails solo
on unmodified main on this machine).
2026-08-13 15:28:11 -06:00
Yury Zialionka a4c6080170 perf(test): run isolation-safe test files in one shared process
Part of #12986 (in-process fast tier).

The per-file process model exists to contain cross-test state, but it
taxes every file with a process boot + TypeScript compile even when the
file is pure. This adds a fast tier: 14 directories/files empirically
verified to pass together in a single 'bun test' pass (~37 files, all
of util/, config/, effect/, patch/, provider transforms, and other
boot-dominated suites; 1360-test superset probe ran clean).

- The batch enters LPT shard splitting as one pseudo-file with a
  duration-scale weight, so exactly one shard executes it and balancing
  is preserved.
- JUnit: the batch writes one XML containing all member suites; the
  existing merge picks it up by work-item name.
- Batching disables itself under --profile (macOS curated run) and
  positional pattern filters, and the batch gets a roomier process
  deadline since it compiles once for ~37 files.
- I/O-heavy directories (git/, lsp/, storage/, auth/) stay per-file:
  their runtime is real work that parallelizes across the worker pool,
  while a batch runs members sequentially.

Validated locally: full suite 626/627 with the batch green (the one
failure is cli/run/run-process.test.ts SIGINT timing out solo on
unmodified main on this machine - pre-existing, unrelated).
2026-08-13 14:50:01 -06:00
Yury Zialionka c014763536 perf(test): run HttpApi effect pass in two parallel shard processes
Completes #12999 (with the fixture change in the previous commit).

Adds --shard <i>/<n> (round-robin scenario subset) and --shards <n>
(spawns n child processes, each with its own PID-keyed database and
global root, tagged output, combined exit code). test:httpapi runs the
effect pass with --shards 2.

Route coverage (missing/extra) is still computed against the full
scenario list in every child, so --fail-on-missing stays correct.

Local effect-mode wall clock: 4m11s -> 2m39s (6m37s before this PR).
315/315 scenarios pass across both shards.
2026-08-13 12:10:11 -06:00
Yury Zialionka 4431875e86 fix(ci): reduce Windows CLI test contention
Windows CLI unit tests ran 4-at-a-time on the 4-vCPU runner (custom
test-runner default = min(4, cpus)), oversubscribing CPU so heavy
real-server test files blew their per-test timeouts.

- Cap KILO_TEST_CONCURRENCY=2 on Windows (each file gets ~2 vCPU).
- Grow Windows shards 4 -> 6 to absorb the lower per-shard parallelism.
- Shard by observed duration instead of file size, so the two heaviest
  files no longer stack in one shard.
- Raise the Windows per-file kill deadline to 600s (KILO_TEST_FILE_TIMEOUT);
  the heaviest file runs ~270s, only ~30s under the old 300s default.

Scoped to the @kilocode/cli custom runner on Windows only. Linux/macOS
unchanged; the non-CLI/core suite runs via plain 'bun test' and is not
affected (separate lever).
2026-08-11 17:05:11 -06:00
Johnny Eric Amancio b484657713 fix(core): address review findings and CI stabilization for upstream merge 2026-08-10 12:44:58 +02:00
Johnny Eric Amancio 9bab72e5a7 Merge remote-tracking branch 'origin/johnnyeric/kilo-opencode-v1.18.0' into johnnyeric/kilo-opencode-v1.18.13 2026-08-07 16:12:20 +02:00
Johnny Eric Amancio 5065743896 Merge remote-tracking branch 'origin/main' into johnnyeric/kilo-opencode-v1.18.0 2026-08-07 14:55:06 +02:00
marius-kilocode c09fc1ff05 fix(deps): declare build dependencies and clean stale test-cli symlinks 2026-08-07 14:09:00 +02:00
marius-kilocode 3b2686af84 chore(annotations): wrap upstream changes with kilocode_change markers 2026-08-07 14:08:59 +02:00
marius-kilocode df40369de8 refactor(test): dynamically discover workspace packages in test-cli fingerprint 2026-08-07 14:08:59 +02:00
marius-kilocode 3f05a2a536 fix(cli): make models snapshot cache write and read fault-tolerant 2026-08-07 14:08:59 +02:00
marius-kilocode 3c713bea8d fix(build): harden cache invalidation and check subprocess results 2026-08-07 14:08:59 +02:00
marius-kilocode dc3af535bb perf(build): optimize cli and extension compile and test times 2026-08-07 14:08:54 +02:00
Johnny Eric Amancio cce22e608f merge: upstream v1.18.13 2026-08-06 00:31:20 +02:00
Johnny Eric Amancio 0fff61fa62 refactor: kilo compat for v1.18.13 2026-08-06 00:00:45 +02:00
Johnny Eric Amancio 88083fb5c5 resolve merge conflicts 2026-08-05 16:01:49 +02:00
Josh Lambert 1864a79e03 revert(cli): stop promoting stable releases to rc 2026-08-03 14:55:22 -04:00
Marius 5ad8b2f126 fix(cli): promote stable releases to rc (#12647) 2026-07-29 14:35:49 +02:00
marius-kilocode 60217b482d Merge remote-tracking branch 'origin/main' into marius-kilocode/kilo-opencode-v1.17.9 2026-07-28 10:43:36 +02:00
Josh HolmerandJohnny Eric Amancio c12a567f2a test(cli): cover TUI startup outside package (#12417)
* test(cli): cover TUI startup outside package

* fix(cli): use native preload path in TUI test

---------

Co-authored-by: Johnny Eric Amancio <johnnyeric@gmail.com>
2026-07-27 15:14:31 +02:00
marius-kilocode c4aebfe305 fix(cli): tolerate process signal failures in test runner 2026-07-24 17:06:49 +02:00
marius-kilocode 14934c736b fix(cli): resolve OpenTUI links across install layouts 2026-07-24 15:21:11 +02:00
marius-kilocode f3a4003356 fix(cli): resolve bundled OpenTUI native modules 2026-07-24 15:09:23 +02:00
marius-kilocode a33493e722 fix(cli): stabilize cross-platform subprocess tests 2026-07-24 14:23:03 +02:00
marius-kilocode 51d8031c99 chore: complete OpenCode v1.17.9 integration 2026-07-22 17:20:20 +02:00