Commit Graph

118 Commits

Author SHA1 Message Date
Peter Steinberger 2cc11aff38 test(scripts): streamline Crabbox wrapper fakes (#122007)
Co-authored-by: Amp <amp@ampcode.com>
2026-08-11 04:33:11 -07:00
Peter Steinberger 9acc3beff6 test(scripts): prebundle Crabbox wrapper tests (#121891)
Amp-Thread-ID: https://ampcode.com/threads/T-019fee8d-665d-707b-a380-23f2a6a1ce03

Co-authored-by: Amp <amp@ampcode.com>
2026-08-10 23:16:26 -07: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 67f1baea58 fix(ci): honor env- and config-selected Windows targets in crabbox run transforms (#120395) 2026-08-07 18:50:54 -07:00
Peter Steinberger cd53ac012d fix(ci): harden hydrated dead-export scans (#120365)
* fix(ci): harden hydrated dead-export scans

* fix(ci): satisfy lint and test-type gates for hydrated scan hardening
2026-08-07 17:20:05 -07:00
Peter Steinberger a7cca37838 fix(testbox): restore claims across path aliases (#119170) 2026-08-04 02:38:18 -07:00
Peter Steinberger da3b5edf40 fix(testbox): remove changed-gate sync residue (#119163) 2026-08-04 01:56:32 -07:00
Peter Steinberger 957bdd177f refactor: canonicalize Crabbox run invocation transforms (#118544) 2026-08-02 23:58:25 -07:00
Peter Steinberger 05bb52e952 test: consolidate Crabbox wrapper command fakes (#118446) 2026-08-02 21:35:29 -07:00
Peter Steinberger 6cb833314b test: consolidate Crabbox wrapper fixtures (#117642) 2026-08-01 14:55:20 -07:00
Vincent Koc a4b8ec7890 fix(ci): require fresh untrusted Crabbox leases 2026-07-31 22:28:20 +08:00
Vincent Koc c630e4aec3 fix(ci): restore Crabbox routing type contracts 2026-07-31 22:28:20 +08:00
Vincent Koc 89e4ef2ab7 fix(ci): preserve routing failure diagnostics 2026-07-31 22:28:20 +08:00
Vincent Koc 3cf0de893e fix(ci): clarify broker recovery guidance 2026-07-31 22:28:20 +08:00
Vincent Koc 6eea564450 fix(ci): preserve original provider intent 2026-07-31 22:28:20 +08:00
Vincent Koc 11edc89613 fix(ci): harden direct cloud exemptions 2026-07-31 22:28:20 +08:00
Vincent Koc adf07590f1 fix(ci): enforce workload provider eligibility 2026-07-31 22:28:20 +08:00
Vincent Koc 702de1a196 fix(ci): scope direct cloud overrides 2026-07-31 22:28:20 +08:00
Vincent Koc fe08359ca8 fix(ci): preserve explicit provider overrides 2026-07-31 22:28:20 +08:00
Vincent Koc 67bde2fc3f fix(ci): keep workload routing broker-only 2026-07-31 22:28:20 +08:00
Vincent Koc dca99ee4f2 fix(ci): preserve explicit direct cloud commands 2026-07-31 22:28:20 +08:00
Vincent Koc c2e5b3a67c feat(ci): add workload-aware Crabbox routing 2026-07-31 22:28:20 +08:00
Peter Steinberger e99d978e24 test: consolidate script workflow fixtures (#112892) 2026-07-23 00:51:10 -04:00
Peter Steinberger a0cc7d11fb fix(scripts): restore Testbox lease claims to the originating repo after delegated runs (#110869)
* fix(scripts): restore Testbox lease claims to the originating repo after delegated runs

Delegated Blacksmith Testbox runs execute from throwaway sparse-sync checkouts, so Crabbox stamps retained lease claims with that temporary cwd. Restore only claims still pointing at the child checkout after the run on both success and failure, preserving foreign claims and every other field. This repairs the post-run artifact instead of weakening the pre-run ownership guard.

* fix(scripts): restore claims for delegated runs that create retained leases
2026-07-18 19:49:04 +01:00
Peter Steinberger 4187dff99a fix(testbox): honor explicit changed-gate base 2026-07-18 09:21:31 +01:00
Peter Steinberger 1effda0d8c fix(crabbox): make signal-cleanup proof deterministic (#109223)
* test(crabbox): stabilize signal cleanup proof

* test(crabbox): wait for signal cleanup readiness
2026-07-16 10:24:02 -07:00
Peter Steinberger fecd11fdc9 perf(test): unref process watchdogs (#108643) 2026-07-16 00:39:08 -07:00
Peter Steinberger 56eda48f20 test: speed up crabbox wrapper timing tests (#108207) 2026-07-15 03:31:32 -07:00
Peter Steinberger 48eebe090f fix(testing): make changed-gate bundles self-contained 2026-07-13 19:03:31 -07:00
Peter Steinberger 4645a850d5 fix(testing): omit changed-gate history from bundles 2026-07-13 18:50:35 -07:00
Peter Steinberger 9668b668c5 fix(testing): preserve changed-gate diagnostics 2026-07-13 18:50:35 -07:00
Peter Steinberger c4c72aa086 fix(testing): reset reused changed-gate worktrees 2026-07-13 18:50:35 -07:00
Peter Steinberger e0f45bfbf0 feat(tooling): enforce indexed access checks in root tests (#105223)
* feat(tooling): enforce indexed access checks in root tests

* style(tooling): clarify scoped package guard
2026-07-12 10:42:07 +01:00
Peter Steinberger 5c7e1341ab fix: fail crabbox lease-claim refusals (#104789) 2026-07-11 16:44:47 -07:00
Peter Steinberger d0152d71b4 improve(tooling): unblock scripts/pr landings and clarify crabbox fast failures (#104658)
* improve(pr): trust origin/main-matching wrappers when the canonical checkout is parked elsewhere

* improve(crabbox): hint at lease expiry when reused-lease runs fail fast

* fix(pr): pin the wrapper trust anchor to the remote-tracking ref
2026-07-11 12:47:07 -07:00
Peter Steinberger fe261b0f59 chore(tooling): typecheck root test/** with a dedicated tsgo lane (#104475)
* chore(types): add declaration files for scripts/lib and scripts/e2e modules

* chore(types): add declaration files for top-level script modules (a-m)

* chore(types): add declaration files for top-level script modules (n-z)

* test: use a non-secret-shaped gateway token fixture

* test: type ci workflow guard helpers for the root test lane

* chore(tooling): typecheck root test/** with a dedicated tsgo lane

- test/tsconfig/tsconfig.test.root.json: root-test program (strict unused checks,
  fixtures excluded; two Docker E2E clients that import built dist/** stay out,
  same rationale as the scripts/e2e exclusion in tsconfig.scripts.json)
- tsgo:test:root wired into tsgo:test, check:test-types, scripts/check.mjs, and
  the ci.yml test-types shard, mirroring the tsgo:scripts lane (#104348)
- changed-lane routing: test/**/*.ts (excluding fixtures) and the lane tsconfig
  now trigger 'typecheck test root' in check:changed; previously test/ paths ran
  lint only, so harness type errors surfaced first in CI (#104287 envDir case)
- burn down all 1071 latent type errors in the program: precise param/local
  types across test/scripts, test/vitest, test/e2e, and transitive scripts/e2e
  program members; 205 sibling .d.mts declaration files for imported .mjs
  modules (committed separately); zero any, zero ts-expect-error
- resolve the pre-existing testing star-export ambiguity in
  scripts/e2e/parallels/common.ts with an explicit re-export

Closes #104388

* chore(types): correct declaration fidelity per structured review

- re-derive 51 .d.mts files from implementation data flow instead of
  initializers: fix a wrong never return (runTestProjectsDelegation returns
  the child), add encoding-sensitive exec/spawn overloads (plain-gh), restore
  the full release profile union, make parsed paths string | null, add missing
  parseArgs fields via help/non-help unions, add a missing sibling declaration
  (budget-number-args), drop 15 unused lint directives
- precise install-record/tuple typing removes the type-aware oxlint
  regressions the first declarations caused in scripts/e2e implementations
- route .mts declaration edits under test/ to the testRoot lane and reference
  the test-root project from tsconfig.projects.json so tsgo:all covers it
  (closes both review findings against the lane wiring)

* chore(scripts): keep telegram runner dist typing structural for the boundary guard

* chore(types): declare runtime pack and gateway readiness exports added on main

* test: pin the importTargetPlan form of the plugin-contract plan import

The guard expectation still referenced the raw await import( form that
7ae5996bb3 (#103975) replaced with the importTargetPlan fallback helper;
the assertion fails on current main.
2026-07-11 06:15:41 -07:00
Vincent Koc c47ceb0f3d improve(release): reuse exact-SHA validation evidence (#104162)
* perf(release): share changelog verification snapshots

* perf(release): reuse exact-SHA validation evidence

* feat(release): checkpoint candidate workflow state

* feat(release): watch CI transitions compactly

* fix(testbox): rotate stale reusable leases

* refactor(release): move CI verifier into scripts

* fix(release): preserve verifier executable mode

* fix(testbox): force noninteractive remote hydration

* perf(testbox): skip sync for proven clean heads

* fix(testbox): keep changed gates synchronized

* fix(testbox): isolate git state probes

* fix(testbox): isolate wrapper git commands

* fix(testbox): preserve git command contracts

* fix(release): validate reused SHA evidence

* fix(release): resume serialized plugin selections

* fix(testbox): sync source on every lease reuse

* fix(release): verify from trusted workflow checkout

* fix(release): gate evidence reuse on trusted lineage

* fix(release): support legacy verifier checkouts

* fix(testbox): export CI across shell snippets

* fix(release): revalidate reused evidence before publish

* fix(release): reject untrusted reuse before lookup

* fix(release): reuse SHA-pinned root evidence

* fix(ci): allow unreleased notes in QA packages

* fix(release): satisfy script lint contracts

* fix(release): handle Unicode workflow refs safely
2026-07-11 12:48:27 +08:00
Peter Steinberger 83ebbcb3ac fix(crabbox): retry cold metadata probes so a slow run --help does not block validation (#102159)
The wrapper probes `crabbox --version` and `crabbox run --help` once each with a
snappy 5s timeout to enumerate providers before delegating. A cold Crabbox — the
first call right after a version bump, or one on a loaded machine — can exceed
that timeout while rendering `run --help` (52KB, emitted on stderr in 0.36) or
doing first-run init, and can emit nothing on that first call. When that happens
both guards fire and hard-exit the wrapper ("selected binary failed basic
--version/--help sanity checks" or "could not parse provider list from --help;
refusing to run"), which blocks ALL remote validation (`pnpm check:changed`,
remote `pnpm test` lanes) even though the binary is fine.

Retry each metadata probe once with a generous 20s timeout when the first attempt
is killed or returns empty. The warm path is unchanged (one ~instant probe); only
a slow/empty first probe pays for the retry, after which the sanity/provider-list
guards judge the recovered result. Add a regression test: a fake Crabbox whose
`run --help` is slower than the default probe timeout (and, like 0.36, writes help
to stderr) is now recovered by the retry instead of hard-failing.
2026-07-08 12:53:48 +01:00
Peter Steinberger 2723628dd9 perf(test): unit-test crabbox provider aliases 2026-07-06 14:52:53 -04:00
Peter Steinberger 553acdfc1a feat(gateway): add tts.speak method returning synthesized audio inline (#100770)
* feat(gateway): add tts.speak method returning synthesized audio inline

* test(gateway): type tts.speak synthesis mock for failure shapes

* fix(gateway): restore lowercase normalizer import used by talk catalog

* test(gateway): shift advertised-method window for tts.speak

* fix(gateway): ready tts speak for landing

* docs(changelog): record tts speak gateway API

* test(agents): stabilize fast auto startup synchronization

* test(crabbox): stabilize sparse checkout exit guard
2026-07-06 18:25:08 +01:00
Peter Steinberger 1f484a8dbd test: speed up and stabilize full suite 2026-07-05 08:00:23 -04:00
Peter Steinberger bbb744269f test: make the local pnpm test gate green on macOS hosts (#100069)
Fixes 21 macOS-only failing test cases across three classes: canonicalized fixture roots (macOS /var -> /private/var tmpdir symlink vs production realpathing), load-tolerant process-spawn tests (content-gated pid files, readiness-sequenced kill windows, bounded-window timer assertions), and cross-file worker leak guards (skip-channel env, gateway token env, imessage runtime singleton). Test-only; no production changes. Fixes #100025.
2026-07-04 17:17:42 -04:00
Peter Steinberger 11eeba972f perf: speed up crabbox wrapper tests (#99969) 2026-07-04 10:09:14 -04:00
Shakker c53dbcaf4d fix: surface delegated Testbox proof status 2026-06-27 23:53:53 +01:00
Vincent Koc e4763b0631 fix(crabbox): bootstrap WSL2 package proof 2026-06-24 20:18:01 +08:00
Vincent Koc 4d034639ad fix(crabbox): require Xcode for macOS proof 2026-06-24 09:01:42 +08:00
Vincent Koc 252673d5b1 fix(qa): bootstrap raw macos package scripts 2026-06-23 22:51:04 +02:00
Vincent Koc ca5905eb90 fix(crabbox): reclaim sparse reused leases 2026-06-23 10:09:38 +02:00
Vincent Koc dcb6b0dd6f fix(ci): restore macOS and Windows QA gates
Restores Azure native Windows hydrated node_modules bootstrap, fixes the macOS settings SwiftFormat drift, and stabilizes lifecycle process-group CI proof.

Proof:
- `tbx_01kvrpr5kfc58wdnakx2zkc4k6`: `corepack pnpm test:serial test/scripts/plugin-lifecycle-measure.test.ts` passed.
- `tbx_01kvrpvcrmsxgyb886pa127qq3`: `OPENCLAW_TESTBOX=1 ... corepack pnpm check:changed` passed.
- `tbx_01kvrpzpafmp27tyb4tg9yvwvz`: touched-file `format:check` passed.
- PR CI `27988226071` passed, including `macos-node`, `macos-swift`, and `checks-node-compact-small-whole-2`.
2026-06-23 06:38:27 +08:00
Vincent Koc d5d9a8256d fix(crabbox): route native Windows hydrate jobs 2026-06-23 04:34:03 +08:00