* ci: split Control UI E2E into 13 shards so it stops setting the wall
checks-ui-e2e is the tallest CI job on main (387s worst observed). Its
shard imbalance is not a packing problem: measured across runs
33116963478, 33117411412, and 33117811987, control-UI shard bodies span
1.25-1.27x, and leave-one-run-out cross-validation shows hinting all 286
files gains ~13s at 11 shards and ~0-7s at 13-14, because per-file
run-to-run noise (p50 16%, p90 40%) swamps the residual prediction error.
What dominates is a fixed per-shard floor of 116s median / 143s p90
(checkout, pnpm install, Vitest transform) that no packing change can
touch. That floor varies randomly per job rather than per shard, so the
packer must not model it -- a constant added to every bucket never
changes greedy LPT's choice -- but it does set the shard count.
Raise the hosted/hybrid matrix from 12 to 14 rows (13 control-UI shards
plus the browser-extension row) and match max-parallel so the extra rows
do not queue. Replaying each run's real per-file times through the
packer moves the tallest shard body from 229/218/219s to 179/183/179s,
modelling the tallest row at 4:52 p50 and 5:20 p90 against 5:28/5:56.
Two extra registrations per run against a 6000/5min operating target.
Also correct the sequencer comment, which pointed the next maintainer at
the hint refresh that measurably does not pay, and record the
floor-based sizing rationale in docs/ci.md.
Note: this takes checks-ui-e2e off the critical path but does not reach
a 5:00 wall on its own -- checks-node-compact-small-11 (297-367s) and
checks-ui (276-331s) set a 5:42-6:32 floor behind it.
* docs(ci): correct the remaining eleven-shard Control UI E2E reference
The planner-descriptor paragraph still described the hosted and hybrid
profiles as eleven Vitest shards plus one browser-extension shard, which
was accurate for the previous 12-row matrix and contradicts the 14-row
plan in the same document.
Found by ClawSweeper review of #131257.
* fix(web): redact request credentials from provider errors
Bind bounded error diagnostics to the actual outgoing request headers for
shared web tools and both Perplexity transports. Preserve caller cancellation
and replace case-insensitive owned headers without combining credentials.
Reuse the provider error redactor and remove duplicate xAI parser-only test
paths while retaining real HTTP and sibling coverage. Production -18 lines;
total -14 lines including regression tests and documentation.
Refs #120200, #117304, #119536.
Co-authored-by: zenglingbiao <zeng.lingbiao@xydigit.com>
* fix(tooling): install managed signals before spawning children
Prevent early SIGTERM from orphaning a detached compiler before its supervisor
registers the child. Retain shared handlers for concurrent commands and clean
them up after synchronous or asynchronous spawn failure.
Reproduce the race at the real process boundary and consolidate stale type
comments and one-use registration wrappers.
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
The startup-memory CI gate injected its RSS hook via --import, which since
#128663 declines the dist ESM resolve fast path, so the gate measured a
non-default slow-resolution configuration (~400 MB on Blacksmith) instead of
what plain invocations pay (~243 MB). The bench now runs the launcher
in-process from a wrapper with a clean execArgv and self-reports max RSS at
exit.
CLI bootstrap also imported proxy-capture/runtime and coverage on every
non-help invocation even though capture init, finalize, and coverage warnings
all no-op unless OPENCLAW_DEBUG_PROXY_ENABLED/REQUIRE is set; the import graph
(sqlite capture store, proxyline, undici) now loads only when the env requests
capture. Config reads import the gateway-startup metadata module directly
instead of the facade that also re-exports the startup loader.
Keep the post-merge locale refresh within GitHub API limits by resolving the exact commit and canonical locale targets together.
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* fix(tooling): avoid shared tsx cache startup stalls
Use the shared preloader before tsx initializes so maintained build, check, and test commands retain memory transforms without scanning other checkouts' disk caches. Preserve changed-cwd forks and copied tooling closures.
* test: align command contracts with tooling bootstrap
Allow source-only locale contributions to load intentional English bootstrap copy until post-merge generated memory exists. Derive refresh targets from canonical locale data while preserving strict validation.
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Hard OpenAI OAuth failures now offer one shared login action across normal replies, returned provider errors, fallback summaries, Control UI guidance, and automation alerts. OAuth mode survives failure aggregation so API-key failures never receive the Codex pairing action.
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
* fix(agents): preserve replies after unavailable approvals
Keep setup notices durable without suppressing recovered answers or terminal errors. Preserve genuine pending-approval deduplication and align native approval setup guidance. Fixes#130584.
* fix(discord): restore named-account research skill discovery
Gate the Discord skill on channel configuration instead of a root token. Make clawtributor research portable across archive and native history readers, and apply requested time windows to conversation references rather than PR creation dates.
* fix(agents): order tool-result delivery before assistant events
* fix(slack): correct native approval enablement guidance
* test(qa): support context-aware model fixtures
* test(scripts): publish ready process IDs atomically
* fix(plugins): unblock upgrades rejected by outgoing channel schemas
Recover only requested-plugin channel schema diagnostics, including channel keys different from the plugin ID. Keep incoming-schema validation and unrelated-error rejection intact. Consolidate duplicate config fixtures and remove an unnecessary error assertion; total LOC is net negative.
Co-authored-by: felirami <6752178+felirami@users.noreply.github.com>
* fix(plugins): retain source rollback until install records commit
Use the existing deferred install transaction across managed sources. Record persistence completion at its owner and remove index/path-inferred compensation, keeping committed payloads intact on late refresh failures.
Co-authored-by: felirami <6752178+felirami@users.noreply.github.com>
* fix(plugins): preserve rollback causes and satisfy lint
Keep both failures in AggregateError and its rollback cause. Document the pinned linter false positive for third-argument options and restore required test braces.
* test(plugins): register intentional AggregateError lint exception
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: felirami <6752178+felirami@users.noreply.github.com>
* refactor(state): make cron and subagent rows JSON-canonical
* refactor(state): make gateway origin device tokens canonical at v13
The lazy ensure predates the table joining the canonical schema; at the
v13 bump the schema owns creation, so the feature-local DDL, WeakSet
dedupe, and lazy-list entry retire. The legacy-file guard the ensure
carried stays at each call site.
* test: drop obsolete lazy-ensure coverage for origin device tokens
The table is canonical at v13; same-version lazy creation no longer
exists to protect. Origin CRUD, isolation, and rotation coverage remains
in the surviving cases.
* refactor(state): fold installed_plugin_index into config_machine_state
The singleton index row becomes one JSON value under
plugins.installedIndex with its rollback-fencing revision inside the
value; reads, CAS restore, and the lease-held write transactions use
direct Kysely on config_machine_state so the state_leases assertion
stays in-transaction. The v13 migration imports the row and drops the
table; the additive workspace_dir entry folds with it. Doctor guidance,
docker staging, and the e2e probes name the machine-state row.
* refactor(state): merge workspace_attestations into workspace_setup_state
One row per workspace now carries both setup milestones and the
attestation clock: nullable setup columns represent attestation-only
workspaces (replaceWorkspaceAttestation can precede any setup write) and
setupExists derives from a non-null version. The bootstrap-hash FK
repoints to the merged table; migration receipts keep the historical
workspace_attestations discriminator string. The v13 migration grows and
rebuilds the table, merges attestation rows (orphans without a path
alias drop — their hashes re-derive at the next bootstrap attestation),
and the consolidation kind is renamed state-consolidation-v13 to cover
the batch.
* test(state): cover the workspace merge and consolidation fallout
The v12-to-v13 regression seeds merged, attestation-only, and orphan
attestation workspaces; the 13-to-12 downgrade fixture recreates
workspace_attestations and installed_plugin_index from the folded data;
the fold-in migration gates the additive workspace_dir column for
pre-additive rows; the workspace merge now triggers on the setup table's
own shape so stable-era databases without an attestations table still
reshape; the consolidation applied-message covers the batch.
* refactor(state): fold shared auth profile singletons into config_machine_state
The shared-state auth_profile_stores/auth_profile_state rows (fixed key
'shared') become authProfiles.store/authProfiles.state machine-state
values; the agent-DB tables of the same names are untouched. Git-backup
redaction moves from table-drop to the authProfiles. secret prefix with
seeded-secret absence proof; migration receipts keep the historical
table-name discriminators; the shared-auth relocation and receipt
verification project the KV cells back to the receipt-era row shapes so
persisted digests stay byte-compatible. mcp_oauth_stores stays a table —
its multi-key fold is a named follow-up.
* test(state): finish shared-auth fold coverage and annotate boundary casts
Auth seeders and assertions across the e2e/scripts/secrets suites target
the authProfiles machine-state cells; the v12-to-v13 regression proves
payload-byte fidelity, non-shared-row drop, and insert-if-absent
precedence; the downgrade fixture recreates and repopulates both v12
tables. Boundary type assertions in the plugin-index store carry SAFETY
invariants per the ratchet.
* chore: shrink assertion-safety baseline for plugin-index store
* refactor(doctor): delete the dead onboarding-recommendations migration
Its input — the unscoped 'primary' onboarding row — existed only between
9a93a52a8a and 473962b7de, a two-day beta window; no shipped stable
can produce it and the runtime table folded away at v12. The audit
backup list keeps recognizing system-agent.jsonl artifacts because beta
installs that ran that import may still carry its backups.
* docs: sync the 13-to-12 downgrade example with the executable fixture
* style: format the synced downgrade example
* style: drop unused import and duplicate union constituent
* fix(state): keep orphan attestations across the v13 workspace merge
The merged workspace_setup_state required a workspace path, but legacy
orphan hashed-key attestations never recorded one. workspace_path is now
nullable (setup rows still enforce it via CHECK), the v13 migration and
the doctor file import keep orphans with a NULL path that heals on the
next live access, and the 13-to-12 downgrade keeps attestation-owned
hashes. Doctor test seeds move to the folded KV row.
* perf(state): retire unused cron indexes
* fix(state): preserve v13 migration recovery
* fix(state): preserve v12 lazy-table upgrade
* docs(state): document v13 auth relocation
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(cloud-workers): build complete source runtime artifacts
Allow the canonical package builder to include explicitly selected source runtime plugins with exact target-installed dependencies and regenerated inventory. Preserve concise enrollment prerequisite errors without changing trust or normal core publication.
Fixes#130702. Complete source-built cloud worker packages now retain required runtime plugins; deployment artifacts must be rebuilt from the landed source.
* fix(packaging): reject stale selected plugin peer metadata
* fix(pr): release locks after linked worktree teardown
* test(pr): verify native cleanup and retained lock ownership
Initialize the existing script-local supervisor root before canonical Git resolution, and replace overlapping teardown fixtures with the real native merge and gc lifecycle.
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>