39 Commits

Author SHA1 Message Date
Josh Avant bdd35432dd perf(checks): accelerate fresh changed gates (#121805) 2026-08-10 21:30:24 -05:00
Peter Steinberger c70aee247e refactor(scripts): migrate JavaScript tools to TypeScript (#121005)
* refactor(scripts): migrate JavaScript tools to TypeScript

* fix(ci): keep changed-scope preflight zero-install

* fix(ci): preserve zero-install script owners

* fix(ci): complete script migration follow-through

* fix(release): keep stable closeout zero-install

* fix(scripts): preserve standalone execution boundaries

* fix(scripts): repair standalone loader boundaries

* fix(scripts): normalize gateway observation ids

* fix(scripts): keep Docker packager standalone

* test(scripts): preserve rebase cleanup helpers

* test(sessions): use tracked temp directory
2026-08-09 07:21:35 -07:00
Peter Steinberger 73bdb4b924 feat(agents): record run-end worktree cleanup outcome; prove Workboard dirty retention (#120434)
* feat(agents): record run-end worktree cleanup outcome

Persist removed, retained, and failed run-end cleanup outcomes on managed worktree records. Operators and QA can inspect the durable fact through worktrees.list and openclaw worktrees list --json.

Release note: Managed worktree run-end cleanup now records why a checkout was removed or retained in worktree list JSON.

* test(qa): prove dirty worktree retention outcome

* chore(protocol): regenerate swift gateway models

* fix(agents): harden worktree cleanup recovery

Register run_end_cleanup_json as a lazy compatible column so same-version v6 index repair and read-only doctor migration can recover databases created before the column existed.

Type removal contention at the registry boundary; unexpected claim failures now best-effort record a bounded failed outcome and rethrow the original error.

* fix(ci): clear repo-wide lint debt blocking merge gates

The red-main landing rule requires this PR to repair repository-wide merge-gate debt instead of bypassing it. Apply the current lint contracts mechanically and split turn-transition coverage into a concept-named sibling with per-file-safe test state.

Exact line delta: +676/-574 (net +102) across 44 test/support files.

* fix(ci): preserve cached health refresh proof

Require the public refresh call to exist before accepting that sensitive fields were omitted, so the boundary proof cannot pass on a missing call.

* fix(ci): correct test typing left by the lint sweep

Literal-widened totalTokensVersion fixtures, a WebSocket RawData overload
mismatch, and the protocol schema document cast broke check-test-types
after the repo-wide lint repair. Aligns the fixtures with SessionEntry,
narrows Buffer handling per RawData, and keeps the JSON-shaped undefined
omission under structuredClone.

* test(agents): reuse upstream resource-loader test support

The session-loop split and #120463's helper extraction landed the same
createResourceLoader/createCompactionHandlers twice; the rebase kept both,
orphaning main's agent-session-loop-resource-loader.test-support.ts and
failing the dead-code gate. Import the upstream helpers and delete the
duplicates.

* fix(agents): reject finalized rows at the worktree removal claim

Address the accepted ClawSweeper late-claim finding by rereading and rejecting missing or finalized worktree rows inside the synchronous removal-claim transaction.

Preserve the authoritative cleanup invariant: finalized contenders record nothing, while retained-busy is written only while the row remains live.

* refactor(agents): reuse registry update for busy outcomes

Keep the live-row conditional write in the canonical registry update path so the finalized-claim repair stays below the registry max-lines ratchet without weakening the authoritative-outcome invariant.

* test(agents): drop session test duplicates after rebase

Keep current main as the canonical owner of next-turn lifecycle coverage and correctness test support after replaying the older lint-debt split.

* fix(agents): guard post-abort cleanup outcomes against finalization

After abortWorktreeRemoval releases a stale remover's claim, its retained or
failed write raced a finalizing remover and could overwrite the authoritative
removed-lossless fact. Route every retained/failed write through the live-row
condition; only the finalizing remover's own removed-lossless write stays
unconditional.

* fix(agents): persist the removal outcome atomically with finalization

A delayed removed-lossless write after remove() finalized could race a
restore plus newer cleanup and overwrite the newer operator-visible fact.
The run-end outcome now rides remove()'s finalization update; every other
cleanup write stays live-row conditional, so no post-finalize write path
remains.

* test(qa): restore strict cached-health contract assertions

The lint sweep's Boolean() coercions let truthy non-booleans satisfy the
wire-typed cached-meta contract. Assert the literal boolean for unknown-typed
fields and use nullish-coalesced strict equivalents for boolean chains.

* fix(agents): clear the stale cleanup outcome when restoring a worktree

A restored checkout begins a new lifecycle; leaving the removed-lossless
fact on the live row showed operators a stale result until the next
cleanup. Restore clears the recorded outcome and the regression asserts
the cleared state before the next cleanup records fresh truth.

* fix(agents): scope stale cleanup outcomes to their observed lifecycle

A stale remover's retained/failed write raced a concurrent remove-plus-
restore: the revived row is live again, so the live-row condition alone
could stamp a prior-lifecycle outcome. Condition those writes on the
activity stamp the remover observed; restore bumps lastActiveAt, making
any prior-lifecycle write a no-op.

* fix(agents): advance the restore activity stamp within one millisecond

Stale cleanup writes fence on the activity stamp they observed; a restore
completing in the same millisecond could revive the row with an identical
stamp and let the fence match. Restore now always advances past the
stored value, and the ABA regression pins the clock to prove the
same-millisecond case.
2026-08-08 20:32:11 -07:00
qingminlong 1cf48f15b7 fix: reject missing oxlint shard selectors (#120096)
* fix: reject missing oxlint shard selectors

* fix(lint): reject invalid shard selectors

Punchcard-Session: clear-harbor-river-2k

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-07 10:44:18 +08:00
Peter Steinberger 7bb9d0aece test: consolidate oxlint runner fixtures (#118440) 2026-08-02 21:15:50 -07:00
Peter Steinberger 9b8e50b9f6 refactor(scripts): consolidate redundant tooling paths (#118259) 2026-08-02 16:20:09 -07:00
Peter Steinberger 7a4649ceb3 feat(ui): first-class chat audio/video player cards (#115764)
* feat(ui): add chat media player cards

* fix(ui): harden chat media attachment lifecycle

* fix(ui): finalize chat media fallbacks

* fix(ui): rely on video playback errors

* fix(ui): guard deferred media resume

* test(ui): align local media assertions with player cards

* docs(ui): note cross-origin download fallback

* fix(ui): keep player helpers module-private

* test(ui): wait for encoded video attachment

* test(ui): wait for hidden audio media element

* test(scripts): give oxlint shard-kill test headroom under CI load
2026-07-29 05:32:43 -04:00
Peter Steinberger 5dafb13614 chore(scripts): end failing oxlint runs with a stable status line (#112532)
* chore(scripts): end failing oxlint runs with a stable status line

A crashed run-oxlint wrapper printed only a stack trace, and a lint
invocation whose output was truncated (cmd | tail -N) read as success —
which recently let a wrapper crash (stale node_modules after a dep-adding
merge) masquerade as a clean lint. Route the CLI entry through a small
wrapper that converts crashes into exit 1 and ends every failing run
with '[oxlint] FAILED (exit N)' as the final line.

* chore(scripts): declare runOxlintCliEntry in the script declaration contract

check-guards verifies .d.mts contracts against .mjs exports and
check-test-types consumes them; the new entry export needed both the
declaration and explicit log-parameter annotations in the test.
2026-07-21 22:53:12 -07:00
Peter Steinberger 87fbc19fe3 fix: complete lint toolchain reuse in worktrees (#111467)
* fix(scripts): complete worktree lint toolchain

* fix(scripts): prepare complete lint pipeline
2026-07-19 08:58:43 -07:00
Peter Steinberger af42fbb6f3 perf(ci): unblock parallel oxlint shards and gate the lint-lane i18n verify (#109144)
* perf(ci): unblock parallel oxlint shards and gate the lint-lane i18n verify

check-lint is the slowest static lane (median 252s): the control-UI
i18n verify runs 86s unconditionally and the three oxlint shards run
serially (89s) because the parallel gate demands 48GB of memory — a
local-Mac threshold that Blacksmith's 32GB 16 vCPU class can never
meet. CI now parallelizes shards at 8+ cores / 24GB+, and the lint case
reuses the existing run_control_ui_i18n manifest gate so diffs that
cannot affect generated catalogs skip the verify while oxlint always
runs.

* chore(ci): print oxlint shard concurrency decision

The lint-lane validation run still executed shards serially on a 16
vCPU runner; one log line exposes the resolved concurrency and the
host resources the decision saw.
2026-07-16 09:45:47 -07:00
Peter Steinberger 4ae06b8c8e test: tighten more async polling (#108454) 2026-07-15 13:37:53 -07:00
Peter Steinberger 506bb14d22 test: tighten more async polling (#108385) 2026-07-15 10:49:43 -07:00
Peter Steinberger 47d37804a8 improve(ui): catch i18n catalog drift locally (#107253)
* ci(ui): verify i18n catalogs locally

* fix(ui): preserve scoped i18n sync errors

* refactor(ui): share i18n raw-copy verifier

* test(ui): cover i18n lint gate

* fix(ui): route lint threads to oxlint
2026-07-14 01:12:36 -07:00
Peter Steinberger a2da4700be refactor: consolidate remaining bounded concurrency (#106265) 2026-07-13 03:16:28 -07:00
Peter Steinberger 1f484a8dbd test: speed up and stabilize full suite 2026-07-05 08:00:23 -04:00
Vincent Koc f26f45c050 fix(lint): reap timed-out oxlint shard groups 2026-06-20 09:54:36 +02:00
Peter Steinberger 58c663920d docs: document script tests 2026-06-04 20:49:50 -04:00
Vincent Koc 054e734e53 fix(lint): reject malformed oxlint shard env 2026-06-02 21:06:14 +02:00
Peter Steinberger 00caead80a test: close oxlint signal readiness race 2026-06-01 10:26:08 -04:00
Peter Steinberger 4b54a423f0 test: harden changed-gate assertions 2026-06-01 10:26:08 -04:00
Peter Steinberger cb7a4239ef fix: stabilize full-suite regressions 2026-06-01 10:26:08 -04:00
Vincent Koc db0209ac5d perf(scripts): parallelize remote core oxlint shards 2026-05-31 20:01:41 +02:00
Vincent Koc 550a134cf9 fix(tooling): forward oxlint shard cancellation 2026-05-30 13:00:32 +02:00
Vincent Koc 1c65e2e7c1 fix(tooling): bound oxlint shard stalls 2026-05-30 13:00:31 +02:00
Peter Steinberger 483b06fb86 fix(ci): serialize oxlint on constrained runners 2026-05-28 20:42:37 +01:00
Peter Steinberger 3d89f493ba fix(release): port 2026.5.27 fixes 2026-05-28 14:25:01 +01:00
Vincent Koc 158bc697c4 fix(lint): split source lint shards 2026-05-27 10:32:53 +02:00
Vincent Koc 1ba4448a60 fix(lint): shard core lint checks 2026-05-27 10:32:53 +02:00
Vincent Koc c93b7d8bbc fix(lint): serialize oxlint shards on constrained hosts 2026-05-27 09:36:56 +02:00
Vincent Koc d21abb88e4 fix(scripts): harden Windows install checks 2026-05-24 07:03:49 +02:00
Peter Steinberger 333f65fc8a fix: tighten release tooling checks 2026-05-15 21:21:17 +01:00
Peter Steinberger 660a8a47db test: tighten run-oxlint sparse assertions 2026-05-09 09:29:34 +01:00
Vincent Koc a4c860a70c fix(update): avoid lint-blocked dev installs (#77181) 2026-05-05 16:05:35 -07:00
Vincent Koc ac3cd1a0ca Harden Codex harness control surfaces (#77459)
* fix(scripts): find codex protocol source from worktrees

* fix(test): keep codex harness docker caches writable

* fix(test): relax live codex cache mount permissions

* test(codex): add live docker harness debug output

* fix(test): detect numeric ci env in codex docker harness

* fix(codex): skip duplicate agent-command telemetry

* fix(tooling): skip sparse-missing oxlint tsconfig

* fix(tooling): route changed checks through testbox

* fix(qa): keep coverage json source-clean

* fix(test): preflight codex docker auth

* fix(codex): validate bind option values

* fix(codex): parse quoted command arguments

* fix(codex): reject extra control args

* fix(codex): use content for blank bound prompts

* fix(codex): decode local image file urls

* fix(codex): treat local media urls as images

* fix(codex): keep windows media paths local

* fix(codex): reject malformed diagnostics confirmations

* fix(codex): reject malformed resume commands

* fix(codex): reject malformed thread actions

* fix(codex): reject malformed turn controls

* fix(codex): reject malformed model controls

* fix(codex): resolve empty user input prompts

* fix(codex): enforce user input options

* fix(codex): reject ambiguous computer-use actions

* fix(codex): ignore stale bound turn notifications

* test(gateway): close task registries in gateway harness

* test(gateway): route cleanup through task seams

* fix(codex): describe current permission approvals

* fix(codex): disclose command approval amendments

* fix(codex): preserve approval detail under truncation

* fix(codex): propagate dynamic tool failures

* test(codex): align dynamic tool block contract

* fix(codex): reject extra read-only command operands

* fix(codex): escape command readout fields

* fix(codex): escape status probe errors

* fix(codex): narrow formatted thread details

* fix(codex): escape successful status summaries

* fix(codex): escape bound control replies

* fix(codex): escape user input prompts

* fix(codex): escape control failure replies

* fix(codex): escape approval prompt text

* test(codex): narrow escaped reply assertions

* test(codex): complete strict reply fixtures

* test(codex): preserve account fixture literals

* test(codex): align status probe fixtures

* fix(codex): satisfy sanitizer regex lint

* fix(codex): harden command readouts

* fix(codex): harden bound image inputs

* fix(codex): sanitize command failure replies

* test(codex): complete rate limit fixture

* test(tooling): isolate postinstall compile cache fixture

* fix(codex): keep app-server event ownership explicit

---------

Co-authored-by: pashpashpash <nik@vault77.ai>
2026-05-05 07:23:41 +09:00
Peter Steinberger ad1ccd671b chore: move oxlint tsconfigs under config 2026-05-03 15:12:06 +01:00
Vincent Koc 73d72204a0 fix(tooling): harden changed checks for sparse worktrees 2026-04-25 00:51:34 -07:00
Peter Steinberger ebcd475d24 test: update oxlint check wiring assertion 2026-04-20 14:02:51 +01:00
Gustavo Madeira Santana baf11b83d7 Check: avoid duplicate boundary prep
Rely on the lint wrapper to prepare extension package-boundary artifacts during pnpm check instead of invoking the same prep script again at the end.

Add a script regression so the duplicate check path does not return.
2026-04-16 21:37:08 -04:00
Vincent Koc c9103c2e47 fix(ci): prepare plugin sdk dts before lint 2026-04-16 13:50:23 -07:00