`agentic-gateway-core` is striped by file, and two of its files --
`gateway-active-memory` and `gateway-concurrent-streams` -- are registered in
`runtimeConsumers`, so any stripe holding one inherits `pretestBuildMode` and
runs `pnpm build:ci-artifacts` before its tests. Striping spread them, so every
gateway-core job paid that build.
Measured on run 33215955822, `checks-node-compact-large-6` spent 275s building
to run 118.2s of tests, and the three gateway-core jobs were the three slowest
in CI at 512s, 436s and 368s against a 9:30 wall.
Pull those files into one `agentic-gateway-core-runtime` shard, derived from
`runtimeConsumers` rather than hardcoded so the two lists cannot drift. The
ordinary stripes lose their build entirely; exactly one job builds, on both the
blacksmith and hybrid profiles.
Weight that shard at 145s and mark it exclusive so the packer neither stacks
partners onto the one job paying the build nor stripes it in two above the 150s
`COMPACT_GITHUB_MAX_PREDICTED_SECONDS` threshold, which would restore the
duplicate build this change removes.
Guards move with the plan: the gateway expectation now asserts the invariant
directly -- no stripe carries a build mode, exactly one sibling shard does --
and the stripe-coverage check spans the stripes plus that shard, so a dropped
file still fails it (it caught 552 against 554 while this was being written).
* fix(browser): unblock compiled native-host bootstrap
Load canonical config and pairing only after native-host validation. Keep
pure Browser URL and port helpers out of transport and mixed runtime
barrels, register the existing private CDP SDK export, and remove obsolete
bridge exports.
Run the extracted compiled-host integration case in the existing artifact
CI job with exact report validation. Preserve the custom installation
context, native framing, private Node trampoline, and 10-second deadline.
* fix(build): map private Browser SDK declarations
Complete browser-cdp registration in the shared plugin package-boundary
paths and XAI's matching override. Keep the SDK JavaScript-only in the
published package while using package-built declarations inside the repo.
The unchanged package-boundary contract reproduced the missing mapping
before this fix. No native-host runtime, fixture, assertion, or deadline
changes are included.
* build: migrate tooling and source installs to pnpm 12
Pin the verified native toolchain without changing application dependency
versions. Preserve the existing release-age policy explicitly and separate
package-manager lock metadata from the application dependency graph.
Use exact checkout pins for bootstrap and rollback, approve only the native
pnpm installer where npm requires it, and retain global install ownership
without equating the CLI major to the storage layout. Verify the Docker
runtime toolchain offline as its non-root user.
Remove duplicate bootstrap paths and obsolete prune input, update native
CLI flags and regression fixtures, and preserve UTF-8 in macOS Bash
installer NDJSON output.
* fix(build): isolate production dependency installs for pnpm 12
Build production dependencies from the same frozen manifest inputs instead
of pruning the inherited development tree. pnpm 12's native hoisted
importer cannot rename lower-layer OverlayFS directories during pruning.
Preserve native addon outputs, workspace builds, and offline non-root
Corepack use while deleting the obsolete production-store seeder.
Exercise runtime assembly and explicitly consent to the local agent-plugin
E2E fixture under the current plugin capability contract.
Validated full Matrix image and offline non-root runtime, focused Docker
regressions, full checks with test types and architecture, docs, real
agent-plugin gateway E2E, and isolated Codex autoreview.
* test: align package smoke with pnpm 12 global installs
* test: follow native pnpm artifact approval in distribution guard
* test: modernize pnpm fixtures for v12
* test: align rebased update fixtures with pnpm 12
* test: retain sanitized upgrade restart diagnostics
* test: expose CI navigation failures and register diagnostics
* test: retain post-core outcomes and plugin artifact identity
* chore(tooling): group upgrade diagnostic entrypoints
* fix(update): support native pnpm global installs and source links
Qualify local source and archive specs, carry verified global ownership through pnpm configuration, and verify intentional checkout links with shared runtime-readiness checks. Preserve strict packaged-install verification and manager ownership safeguards.
Verified the production updater with pnpm 11.22 and 12 using default and custom roots, source links, and tarball updates.
* test: preserve survivor diagnostics after service sealing
Promote incomplete exit-zero runs before failure capture and exercise the sealed-service manager fixture without inventing successful child exits.
* fix(update): preserve legacy pnpm global ownership
Carry the verified root and bin through both pnpm and npm configuration dialects after original-environment probes. Real pnpm 10 custom-root updates and pnpm 11/12 source and tarball matrices pass without redirecting the caller or weakening ownership checks.
* test(update): verify wizard consent through checkout handoff
Use the prepared checkout and fresh-process finalization boundary introduced by the updater repair. Preserve explicit consent forwarding before and after the wizard subcommand without assuming plugin callbacks run in the old process.
* refactor(update): validate checkout build metadata records
Use the canonical record coercer instead of carrying an unchecked assertion into the shared runtime verifier. Remove the now-unused grandfathered assertion entry; no allowance is added.
* docs(sandbox): document standalone common-image inputs
* test(packaging): account for required native prebuilds
Align installer and release size budgets at 235 MiB for the required native payload added on main. Keep both loader layouts, upstream binaries, explicit overrides, and missing-data rejection intact. Exercise actual defaults and the one-byte boundary. Retain bounded stderr diagnostics for the intermittent Bun signal test without claiming a production signal fix.
* test: align refreshed installer fixtures with pnpm 12
* fix(test): share Bun smoke force-kill ownership
Record the successful force-kill once across the timer and post-close drain. Native Darwin traces reproduced both duplicate-signal orders; genuine permission failures and uncleared groups still fail without extending deadlines.
* fix(active-memory): exclude error payloads from recall context
* fix(active-memory): prioritize failed recall status
* test(active-memory): cover failed recall cleanup and gateway flow
Co-authored-by: soltonigiri <kano.nests@gmail.com>
* test(active-memory): diagnose cleanup rejection and gateway startup
Co-authored-by: soltonigiri <kano.nests@gmail.com>
* fix(active-memory): preserve recall failures through timeout cleanup
Carry terminal and cleanup failure facts through the canonical partial-result
owner so timeout recovery cannot inject earlier memory from failed recall.
Preserve legitimate partial recovery, original cleanup errors and contributor
payload filtering. Cover direct recovery and declare the real Gateway test's
existing built-runtime prerequisite.
Co-authored-by: soltonigiri <kano.nests@gmail.com>
* fix(active-memory): finish cleanup and built Gateway verification
Name the canonical cleanup operation without changing error propagation, align the strict CI prerequisite expectation, and run the real recall proof through an isolated exact-build Gateway process. Preserve all behavioral assertions and deadlines; hosted verification remains required.
Co-authored-by: soltonigiri <kano.nests@gmail.com>
* test(active-memory): exercise authorized chat recall
Use the public interactive chat route, which supplies canonical turn tool authority, for the built Gateway recall regression. Preserve the real provider, memory, failed-status, prompt-isolation, and history assertions and their deadlines.
Co-authored-by: soltonigiri <kano.nests@gmail.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: soltonigiri <kano.nests@gmail.com>
* fix(agents): restore prepared collector and harness execution
Carry collector output and noninteractive policy through shared tool
preparation. Register Copilot during discovery, initialize selected direct
credentials, retain canonical session IDs, and preserve failed-turn errors.
Keep retained catalog callbacks bound to their owner generation rather
than an expired publication transaction.
Cover the owner boundaries with failing/passing regressions and real
native, Codex, and Copilot Gateway runs, including credential recovery and
same-process worker-policy reloads. Reuse the native auth test fixture
instead of reloading the complete runner in every case.
Fixes#131552Fixes#131580Fixes#131591Fixes#131699Fixes#131700Fixes#131701
Thanks to @tmill313 for the original Codex collector report in #120077.
* test(agents): keep collector proofs on owned boundaries
Move real collector-tool and prepared-registry integration proof to core,
retain independent plugin SDK handoff regressions, and select the host
Copilot integration for plugin-only changes. Run the existing plugin-test
core-import guard in changed-file checks so local validation catches the
same boundary violation as CI.
The replacement regressions fail against their pre-fix owners. All 505
focused tests, the exact import guard, and the changed-file gate pass.
Independent review found no actionable P0-P2 findings. Runtime repair files
are unchanged.
* test(agents): load prepared harness through its public boundary
Evaluate the real Copilot entrypoint through the existing public-surface
loader and module-loader seam instead of importing plugin implementation
into the core typegraph. Remove the synthetic entrypoint and registration
global, while retaining real discovery and lazy-store assertions.
Include the existing core tsgo graph boundary in changed-file checks and
cover its ordinary and live-Docker routing paths.
* test(mcp): seed canonical SQLite session history
Use the installed candidate's public session APIs instead of creating
legacy session files rejected by doctor-only startup. Preserve message IDs,
parent ordering, delivery context, and canonical attachment metadata.
Add a built-SDK fixture regression using real SQLite reads and startup
validation. The full MCP client remains covered by the Docker CI lane.
* test(gateway): preserve queued writes across RPC fixtures
Stop clearing session writer queues before ordinary RPCs. Config fixtures
still synchronize, while canonical writers retain their own cache updates.
Prove queued-write ordering through a real connected Gateway against a raw
WebSocket control, and dispose the custom test database before file removal.
Preserve the underlying cause of the settlement timeout. That CI failure
was not reproduced on the exact synthetic merge locally; the independent
queue-reset defect is not being claimed as its established cause.
* test(agents): keep harness fixture coverage on focused boundaries
* test(imap): await committed watcher initialization
* fix(transcripts): keep raw IDs and dated selectors unambiguous
Preserve full raw-ID lookup and canonical CLI selector precedence. Give stop and summarize one explicit selector path without rebinding active capture authority or switching targets after retirement.
Refs #131720
* chore(transcripts): ratchet removed accessor debt
* fix(sessions): preserve participant identity and input provenance
Keep profile, agent, remote, observed, and legacy identities distinct in the existing participant table. Record accepted input at admission, including steering, instead of inferring a person from the session creator. Preserve historical membership and counts while leaving ambiguous profile timestamps unknown through stopped-writer Doctor migration.
Project full visibility-filtered person membership before preview limits so Activity does not misattribute channel identities or omit people outside the facepile. Keep participant membership separate from authorization and expose raw-selector ambiguity to memory operators.
Repair Doctor readiness reporting, generic Swift inline-union generation, direct-dispatch metadata handling, and fixture-owned database lifetimes. Verify namespace collisions, real provider input, accepted steering, visibility, backup/migration/reopen boundaries, native decoding, and the built-CLI lifecycle.
Fixes#130661
* fix(macos): isolate readiness and discovery lifecycles
Keep readiness fixtures private for their entire lifetime and give health readiness one deadline owner. Start and cancel slow host discovery with active discovery, not model construction.
Make native protocol, callback, onboarding, and process-cleanup tests observe their intended lifecycle phases without expanding deadlines or weakening assertions. Correct the documented signing default.
Validated with 1,839 parallel native tests, the release product build, causal negative controls, pinned Swift lint/format checks, and fresh isolated autoreview. Native production delta: -5 lines.
* docs(macos): clarify app profile isolation boundaries
* build(protocol): refresh generated Swift install models
* fix(protocol): preserve optional literal field presence
* fix(ci): bound SDK declarations and isolate test lifecycles
Discover the current declaration source graph in a joined child before normal eager emission, and track its complete source-bearing cache inputs. Repair shared jsdom focus teardown and native worker fixture request ordering without changing UI focus ownership or execution fallback policy.
* test(sessions): prove Goal participant upgrade boundaries
* perf(agents): index agent-event listeners by run instead of walking every run's closures
emitAgentEvent notified one process-global listener Set. Five subscribers
register a listener whose first statement discards other runs, so at N
concurrent runs every assistant delta walked N run-scoped closures to do useful
work in one of them - O(N) per delta, O(N^2) fleet-wide.
Add a runListeners bucket beside the global Set plus onAgentEventForRun, and
convert the five per-run sites (openai-http, openresponses-http,
cli-backend-dispatch, system-agent/agent-turn, acp-spawn-parent-stream), keeping
their runId guard as a harmless second check. Globals are notified first and
keep stock ordering; empty buckets are dropped on unsubscribe.
agent-job.ts stays global: it filters on stream, not runId.
* perf: route the shared CLI delivery bridge and approval wait through the run bucket
createAgentEventBridge and observeAgentRunApprovalWait still subscribed with
onAgentEvent and discarded foreign runs as their first action, so they kept the
per-delta cost this branch removes. The bridge is the highest-volume instance:
one CLI dispatch builds eight bridges from that shared factory, so N concurrent
runs left 8N run-filtered closures on the global set.
Both now subscribe with onAgentEventForRun. Their runId guards stay as a
fail-closed second check, matching the six sites already converted here.
Five remaining onAgentEvent callers are genuinely process-global (agent-job,
subagent registry, task registry lifecycle, plugin runtime bridge, TUI backend)
and are left alone.
* test(gateway): cover concurrent streamed agent events
Exercise token-authenticated Chat Completions and Responses streams through
the real Gateway, agent loop, local provider, WebSocket events, and agent.wait.
Expose existing startup diagnostics within the isolated test fixture.
Keep approval-wait subscriptions on the existing global path pending owner
review. This reduces the converted listeners' fanout but does not close the
remaining concurrency-dependent fanout issue.
Co-authored-by: Tran Quang <randytran8800@gmail.com>
* test: capture agent event ordering regressions
Exercise nested emission and unsubscribe through the real delivery bridge.
Prepare the existing runtime artifacts for the concurrent Gateway proof,
and correct its lint and formatting failures without changing its budget.
This diagnostic stage intentionally preserves the candidate dispatcher
until CI captures the ordering regressions; it is not ready to land.
Co-authored-by: Tran Quang <randytran8800@gmail.com>
* fix: preserve live order in run-indexed agent events
Merge global and matching-run subscriptions by registration order while
preserving live mutations, nested dispatch, and unsubscribe semantics.
Cover the observed delivery regressions and interleaved bridge isolation.
Run the authenticated concurrent-stream proof through the existing built
Gateway process harness with exact-checkout artifact provenance.
Related: #129173
Co-authored-by: Tran Quang <randytran8800@gmail.com>
* style: satisfy event dispatch lint rules
Use non-mutating sorting for the fresh listener cohort, initialize the
unsubscribe binding at its existing assignment, and distinguish unused
mapper parameters without changing the proved behavior or assertions.
Co-authored-by: Tran Quang <randytran8800@gmail.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Tran Quang <randytran8800@gmail.com>
* fix(update): route stored dev channel to the git update flow [AI-assisted]
A package-detected launcher with a stored update.channel: dev resolved the
npm "dev" dist-tag (which does not exist -> ETARGET) because switchToGit
only honored an explicitly requested --channel dev. Base the decision on
the effective channel and collapse the duplicated selectedChannel/channel
computation, which is provably identical in every reachable case.
Refs #123073
* docs(update): state the dev-channel git contract in the routing comment
Review finding: "dev" can exist as a rare npm dist-tag, so the comment
must not claim it never does; the routing rationale is the documented
dev-channel git-checkout contract.
* fix(update): keep one-off --tag on the package path for stored-dev installs
--tag is documented as a one-run package-target override, so a stored dev
channel must not divert a tagged update into the git flow (where the tag
is ignored). An explicitly requested --channel dev still outranks the tag,
matching existing explicit-channel behavior.
* test(update): scope the package-to-git clone to a per-case OPENCLAW_GIT_DIR
The stored-dev routing case performs a real transactional clone. On the
default <home>/openclaw that directory outlived the case and made a later
test fail with "OPENCLAW_GIT_DIR appeared while cloning".
Test Plan: node --import tsx scripts/test-projects.mts src/cli/update-cli.test.ts
Failing set now matches clean origin/main exactly (3 pre-existing macOS
$TMPDIR symlink failures, unrelated to this change).
Assisted by an AI coding assistant; reviewed before submitting.
* test(update): verify stored dev routing on installed packages
Temporary expected-failure verification for #123073. Restore only the routing owner to its pre-fix bytes while retaining the original contributor commits and adding installed-package regression coverage. This head must not merge; restore the reviewed fix and require hosted green proof after capturing the intended failure.
* fix(update): restore stored dev routing after regression proof
Restore the contributor's canonical effective-channel fix after the
installed-package regression lane reproduced package routing for stored
dev. Keep one-off tags on the package path and explicit dev precedence.
Remove the obsolete source-text assertion now covered by installed CLI
behavior and format the CI documentation table. Preserve all original
contributor commits. Fresh hosted GREEN validation remains required.
Co-authored-by: Chinmayrawat15 <chinmayrawat15@gmail.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Chinmayrawat15 <chinmayrawat15@gmail.com>
Add explicit source setup for already-built standalone plugin artifacts after source dependency pruning. Reuse guarded declared-host linking without rebuilding artifacts or changing compilation, managed installs, discovery, or Doctor behavior.
Fixes#131611.
* fix(channels): single-source bundled channel schemas from generated metadata
Hand-maintained channelConfigs schema copies in a2a, buzz, clickclack,
raft, and slack silently overrode the zod-derived generated bundled
channel metadata in config validation: stale buzz/raft copies rejected
the valid configWrites key, and the slack/clickclack additionalProperties
stubs disabled validation for those channels entirely. Delete the copies
so the CI-checked generated metadata is the single channel-schema source,
stub feishu's retired rich plugin-entry schema like every sibling, and
guard the pattern with a contract test.
The retired rich plugin-entry schemas let config UIs park channel
settings under plugins.entries.<id>.config unread; the reef doctor
migration from #131292 generalizes into the plugin SDK
(defineStrayPluginEntryConfigMigration) and feishu adopts it alongside
reef.
* fix(tests): fold channel schema-source guard into existing shard root
A new test root pushed the plugins-platform tsgo shard past its 720-root
cap; the guard lives in bundled-package-channel-metadata.test.ts instead.
* test(channels): update catalog and parity tests to single-source schemas
The official catalog regenerates without the deleted manifest schema
copies; the a2a and buzz parity tests drop their cold-manifest/catalog
surfaces (the runtime zod projection is what the generator publishes).
* test(plugins): lagging slack hydration carries no catalog schema copy
The full-suite manifest-registry test still pinned the catalog's retired
slack schema fallback; hydration now yields label/description and channel
validation falls back to the generated bundled metadata.
* fix(release): consent to staged Codex onboarding companion
* fix(e2e): prepare reviewed onboarding plugins explicitly
Use the shared command-help consent helper for the reviewed Codex and
external channel fixtures. Keep exact staged Codex versions pinned, use
official catalog selectors for published packages, and preserve historical
automatic setup when the candidate CLI lacks capability consent.
Replace source-order assertions with shell boundary coverage and document
reviewed plugin preinstallation before retrying noninteractive setup.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(e2e): preserve official provenance for candidate channels
Stage the selected Discord or Slack companion with Codex in the verified
prerelease registry and install its exact pinned npm spec after onboarding.
The former npm-pack path installed matching bytes but could not establish
the official provenance required by trusted plugin state APIs.
Remove local archive packaging and install overrides. Reject missing or
mismatched source companions before CLI use while keeping published catalog
selection and historical automatic setup unchanged.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(e2e): preserve frozen channel candidate registry
Keep the immutable Codex registry artifact unchanged and serve source Discord/Slack tarballs as separately validated exact npm packages. Remove source install overrides and fail closed without the mounted registry.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(e2e): keep candidate plugins in one registry
Restore the planner-owned immutable prerelease registry artifact containing Codex and the selected source channel companion. This supersedes the separate tarball mount follow-up.
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(gateway): own standalone MCP App request lifetimes
Keep initial loading and individual MCP requests bounded without applying
a derived single-request timeout to composed App operations. Carry caller
cancellation through the HTTP request owner, isolate shared catalog waits,
and preserve bounded graceful cleanup before terminal document teardown.
Retire stale document/bootstrap responses and observe asynchronous catalog
rejections without changing authorization, public SDK contracts, or retry
behavior. Add serialized-owner regressions and real Chromium conformance.
Rewrites #119388 while preserving the contributor's report and credit.
Co-authored-by: 唐梓夷0668001293 <tang.ziyi@xydigit.com>
* test(ui): preserve rendered MCP App diagnostics without suppression
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: 唐梓夷0668001293 <tang.ziyi@xydigit.com>
* fix: remove Daytona sandbox plugin
Retire the unshipped cloud sandbox provider and its exclusive dependency closure; preserve Crabbox and standalone Daytona hosting documentation.
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* test(ui): await catalog terminal restore completion
Wait for catalog RPC dispatch and pending-intent completion before asserting exactly one restored terminal. Reuse the request filter without weakening payload, activation, or cache checks.
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* ci: use committed measurements for test sharding
Regenerate UI file and runner-specific compact weights from successful CI log medians, with outlier filtering and a 15% write threshold. Keep existing hints as cold-start fallbacks and account for per-file UI overhead without deriving membership from timing keys.
Add a daily standing-PR refit workflow, strict cached loading, fixture coverage, and operator docs. Verify all 302 UI files form identical complete partitions across 22 fresh processes.
* fix(ci): prune stale test timings and trust runner labels
Remove unobserved timing keys only after three sampled runs and report removals in the refit table. Bucket compact measurements using jobs API labels and include all main run attempts without counting retries as independent samples.
Document contended compact walls and the hosted cold-start fallback. Preserve committed timing data and existing sharding behavior; verify 70 focused tests, all 11 UI shards, five corruption fallbacks, live refit, changed checks, workflow checks, and Codex autoreview.
* fix(ci): prune timings per profile with observed evidence
Pruning used one global run count, so a profile with no observations in
the sampled window had its whole committed map deleted. Hosted weights
could never accumulate, and a partial log-fetch failure could drop every
UI E2E entry in a single refit.
* fix(ci): keep preflight timing validation dependency-free
PR preflight builds its manifest with bare Node before dependency installation. Replace the timing schema dependency with strict all-or-nothing validation and preserve the CiTestTimings type.
Walk workflow-derived planner imports in a bounded, cycle-safe regression guard. Keep the refit CLI outside that dependency-free boundary, and document the coercion-helper exception for preflight.
* test(ui): settle typography picker popup animations
* fix(ci): guard timing refit sampling and publication
* fix(ci): accept plugin fixture capabilities
* fix(ci): detect fixture capability consent support
Probe candidate command help through the existing bounded E2E runners so
positive fixtures accept capabilities only when that command supports it.
Preserve historical packages, probe failures, argv, and child exit status;
keep negative, no-op, and integrity-bound update coverage unapproved.
Replace duplicated probes and source-string checks with executable
compatibility regressions. Synchronize the RPC timeout test with real
process readiness before advancing its unchanged 100 ms deadline, while
retaining real process-group termination and cleanup.
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(ci): run Docker lanes from trusted harness
Resolve package scripts and packaging tools from the trusted harness while
keeping candidate source, artifacts, registry identity, and preflight on
the frozen target. Remove candidate-script lane filtering and the duplicate
live command wrapper; preserve source inputs in source-built Docker lanes.
Prove the public scheduler boundary with distinct harness/target roots and
poisoned candidate scripts. Synchronize scheduler timeout fixtures with real
child readiness, retain real signals and kill grace, and handle empty QR
build arguments on Bash 3.
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* test(ci): retire superseded harness source assertions
Keep the workflow trust and pnpm PATH guards, but remove checks for the
old inline replacement and deleted duplicate live-script wrapper. The
public scheduler regressions now prove those behaviors through distinct
candidate/harness roots and quoted pinned pnpm commands.
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* test(ci): cover multi-build source roots
* fix(ci): select the harness toolchain before Docker lanes
Start prepared pnpm commands in the trusted harness before Corepack resolves
its package-manager pin. Preserve frozen candidate source and artifact
identity, and resolve relative executable and cache paths before changing cwd.
Keep quoted rerun environment values out of executable substitution. Cover
different toolchain pins, shell-sensitive paths, and generated reruns through
the public scheduler boundary.
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* 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>
* 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>
* feat(plugins): surface plugin capability consent in Control UI and CLI
Adds plugins.inspect (declared manifest surface, operator grants, install
provenance/integrity, ClawHub trust), a Control UI consent dialog on install
and external-plugin enable, a server-side acceptance gate persisted on the
install record, artifact-anchored widen diffing, and --accept-capabilities
for non-interactive CLI use.
NOT READY TO LAND: autoreview found critical gaps (see PR notes) — the
declared surface omits 20 of 21 contract families, native plugins always
report zero hooks, several install/enable paths bypass the gate, and the
acknowledgment is not bound to the reviewed surface.
* refactor(plugins): bind capability consent to the reviewed surface
Collapses the consent error payload to the fields the client cannot fetch
(reviewToken, widened, acceptedAt) and pulls identity/declared/grants/source/
trust from plugins.inspect, shrinking the registry-free protocol reader from
395 to 91 lines and removing its divergence from the closed schema.
Acknowledgment now carries the SHA-256 reviewToken of the surface the operator
saw; the server recomputes the final staged artifact's surface and rejects any
mismatch before persisting acceptance. That closes review-then-swap, laundering
of forged acceptance through an unchanged update, and cross-artifact replay.
All 22 manifest contract families are now declared, hashed and diffed, so a
privileged family such as gatewayMethodDispatch can no longer be added without
re-consent. Consent reads the manifest runtime discovery will execute, ambiguous
install ownership fails closed, integrity resolution has one owner and no longer
labels npm SHA-1 shasums as SHA-256, and code plugins disclose that hooks
register at runtime instead of rendering an empty "no hooks" row.
* fix(gateway): register plugins.inspect in method inventories and regenerate protocol
Adds plugins.inspect to the advertised-method inventories (widening the
fixed-size slice windows so older indices stay stable), regenerates the Kotlin
protocol bindings, drops an unused exported type, and replaces two nested
conditional spreads with a plain conditional.
* refactor(plugins): split oversized consent modules and clear lint findings
Extracts the MCP controller out of the plugins page, unchanged-install
reconciliation out of update-installed, and the install lifecycle suite out of
the management-service tests, bringing all three back under the max-lines limit
without suppressions. Also renames a shadowed binding, drops an unnecessary
generic, removes a spread-to-modify in a map, and types catch callbacks as
unknown.
* chore(protocol): regenerate Kotlin bindings after rebase
* feat(plugins): let chat /plugins install review and accept capabilities
The consent gate applies to chat installs too, but the command had no way to
give consent, so external installs dead-ended on a CLI-only flag. Chat now
replies with the plugin's declared capability surface and the exact command to
rerun, and accepts a trailing --accept-capabilities mirroring the existing
--force acknowledgement. ClawHub trust acknowledgement stays CLI-only.
Staged-artifact verification is unchanged: the reviewToken is still checked
against the final artifact before acceptance is recorded.
* refactor(plugins): single-source the declared-surface groups and manifest precedence
The ordered capability group list was defined independently in the consent
engine, the protocol error reader, the CLI formatter and the Control UI, so a
new contract family had to be added in four places with nothing enforcing it.
All four now derive from one canonical list in the protocol schema with a
compile-time exhaustiveness guard.
Native-versus-bundle manifest precedence is centralized in one helper that both
discovery and staged consent call, so the two cannot drift again — that
divergence was a real bug where consent read one manifest and the runtime
executed another.
Also documents that carrying acceptance forward requires pinned artifact
integrity, so integrity-less sources such as local paths ask on every install.
* fix(plugins): enforce reviewed consent across activation flows
Route setup, repair, linked installs, updates, and chat activation through artifact-bound capability consent. Reuse canonical package discovery and recheck staged activation before config publication. Invalidate stale Control UI review requests on reconnect.
Verified focused owner and sibling tests, runtime rebuild, and real isolated CLI/Gateway install, inspect, enable, widening, and stale-token rejection flows.
* test(plugins): cover beta installs through capability consent
* test(plugins): align consent fixtures with staged artifacts
* fix(ui): review staged plugin capabilities once
* test(ui): inline the remaining plugin consent confirmation
* test(plugins): verify consent with deferred install transactions
* refactor(setup): share inference execution plan construction
* test(ui): settle applied config before deferring refresh
* fix(plugins): protect consent provenance and reuse acceptance
* 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
* feat(channels): introduce bots when they join group rooms
* feat(channels): add Discord and Telegram join introductions
* fix(channels): isolate untrusted evidence and select allowed join targets
* refactor(channels): scope joinIntro to implementing channels
* fix(channels): keep a delivered join introduction settled when its durable commit fails
* feat(channels): read more room history and document join introductions in detail
* chore(config): regenerate bundled channel metadata after rebase
* feat(buzz): retain bounded passive context for accepted turns
Add opt-in connection-owned room and thread context using the shared history window. Preserve sender admission, current roster filtering, UTF-8 bounds, and snapshot consumption without passive inference, session recording, or typing. Related: #129599.
* docs(config): align baseline with landed Feishu sticker sets
* perf(control-ui): load built-in theme palettes on demand
Every built-in theme's tokens shipped in the startup stylesheet, so the default
path downloaded six palettes it never painted and each new theme taxed everyone.
That is what pushed the startup CSS ceiling from 45 to 47 KiB when Tide, Beacon,
and Phosphor landed.
Moves the twelve non-default palettes into public/themes/<family>.css, one file
per family covering both modes. Claw stays inline because its tokens are the
:root defaults, so the default path loses nothing and gains the bytes back.
The first-paint story this needed: index.html's boot script now links the active
family's palette during head parsing, which makes it render-blocking exactly
like the app stylesheet, so a persisted theme paints its own colours on the
first frame instead of flashing the default. The href is built from the mount
prefix the gateway already stamps on <html>, so it follows a configured Control
UI base path without the script having to know one. theme.ts keeps the link
correct when the theme changes at runtime, reusing the helper the webfont
stylesheets already use.
The nested resolve-theme ternary became a family table in the same script, since
it now picks an asset as well as a data-theme value.
startup CSS 45.8 -> 42.2 KiB gzip, below the 44.3 KiB it measured before the
three themes landed; ceiling restored 47 -> 45 KiB
base.css 64.0 -> 35.8 KiB raw
Adds a regression test that blocks every bundle script and asserts the palette
still applies, so moving this back into the app bundle fails instead of silently
reintroducing the flash. Verified it catches that: with the boot-script link
removed the assertion reports `expected null to be '/themes/tide.css'`.
* fix(control-ui): publish themes after their palettes load
* fix(control-ui): clean up palette completion listeners
* refactor(control-ui): consolidate theme name resolution