Commit Graph

544 Commits

Author SHA1 Message Date
Peter Steinberger 6a6cd7859f test(qa): cover session and Workboard managed-worktree lifecycles; fix symlinked state-dir lock blindness (#120362)
* fix(agents): canonicalize managed worktree paths

* test(qa): cover managed worktree owner lifecycles

* test(agents): split worktree canonical-path regression into focused file

* fix(doctor): canonicalize persisted managed-worktree paths for symlinked state dirs

* fix(doctor): keep worktree path migration detection read-only

* test(doctor): bound managed-worktree migration product proof

* fix(doctor): keep worktree path detection from creating state dirs

* test(doctor): allow state migration detection under CI load

* test(agents): split embedded-runner steering runs into focused file

Unblocks the check-lint gate broken by #120285's max-lines overflow.
2026-08-07 18:57:36 -07:00
Peter Steinberger 45b1dbf962 test(qa): add managed-worktrees CLI lifecycle scenario coverage (#120335)
* test(qa): add managed-worktrees CLI lifecycle scenario coverage

Managed worktrees had zero QA scenario-pack coverage despite being a
headline feature. Mint agent-runtime.managed-worktrees-lifecycle in the
taxonomy, add a runtime scenario, and prove the real child CLI through
create with .worktreeinclude provisioning and the .openclaw setup hook,
dirty removal pinning a snapshot ref, restore rebuilding tracked,
untracked, and provisioned files with their modes, and gc preserving
manual worktrees.

* fix(qa): align model-switch catalog assertion with expectedAlternate flow

qa/scenarios/models/model-switch-follow-up.yaml switched to
expectedAlternate.model in 5a795f4dda but the catalog test still greps
for the retired alternate?.model literal; the test is outside the PR
change-classification lanes, so the break only surfaces on direct runs.

* test(qa): narrow managed-worktrees taxonomy description to proven manual-owner gc

ClawSweeper P2 on #120335: the scenario proves manual-owner gc retention
only; session and Workboard cleanup lifecycles are not exercised, so the
coverage description must not claim them.
2026-08-07 14:18:12 -07:00
Peter Steinberger 5a795f4dda fix(qa): require a fresh reply and real tool use after switching models (#119662)
* fix(qa): require a fresh reply after switching models

* fix(qa): prove successful tool use after model switching

* fix(qa): wait for the new persisted model-switch tool result

* fix(qa): authenticate canonical model-switch attempt evidence

* fix(ai): preserve effective response model evidence

Punchcard-Session: golden-valley-workshop-br

* fix(agent): publish run-owned terminal receipts

Punchcard-Session: golden-valley-workshop-br

* fix(qa): require run-owned model-switch evidence

Punchcard-Session: golden-valley-workshop-br

* fix(agent): record explicit tool completion outcomes

Punchcard-Session: golden-valley-workshop-br

* fix(agent): exclude unavailable approvals from receipts

Punchcard-Session: golden-valley-workshop-br

* fix(agent): derive receipt visibility from terminal reply

Punchcard-Session: golden-valley-workshop-br

* fix(qa): bind model-switch continuity to terminal reply

Punchcard-Session: golden-valley-workshop-br

* fix(qa): project Crabline Telegram visible text

Punchcard-Session: golden-valley-workshop-br

* fix(qa): record run-owned delivery evidence

Punchcard-Session: golden-valley-workshop-br

* fix(qa): bind primary model-switch delivery

Punchcard-Session: golden-valley-workshop-br

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-08 03:05:32 +08:00
SunnyShu 3bc188efe5 fix(diagnostics-otel): keep telemetry exporting across in-process restarts (#120131)
* [AI] fix(diagnostics-otel): keep telemetry exporting across in-process restarts

Owned diagnostics-otel generations previously registered their OpenTelemetry
providers globally and only shut the providers down on stop. The pinned
sdk-node registers globals without override and never unregisters them, so a
second in-process generation (config-watcher reload, OPENCLAW_NO_RESPAWN=1,
containers) kept exporting through the first, already-shutdown providers and
telemetry silently stopped.

Switch owned mode to private BasicTracerProvider + MeterProvider instances
whose handles are injected directly into the existing recorder runtime, and
keep the preloaded (OPENCLAW_OTEL_PRELOADED=1) mode on the host's global
providers without ever registering or replacing globals. Resource detection
honors the pinned NodeSDK OTEL_NODE_RESOURCE_DETECTORS contract (unset
defaults to env+process+host; none/subset/all are respected), and the unused
@opentelemetry/sdk-node dependency is removed with a minimal lockfile update.

Adds a real-SDK two-generation restart regression, real-SDK resource-detector
selection coverage, migrates the unit mocks to the provider lifecycle, and
updates the OpenTelemetry docs.

Fixes #119997

Co-Authored-By: glm-5.2 <noreply@anthropic.com>

* [AI] test(diagnostics-otel): restore OpenTelemetry globals after restart test

The restart regression disables global context, metrics, propagation, and
trace APIs and forces OPENCLAW_OTEL_PRELOADED=0, but its cleanup only reset
diagnostic events, so a later test in the same worker could inherit no-op
providers. Snapshot the prior global registrations and preloaded env at
module load, and re-register/restore them in afterEach, matching the
existing exporter-health integration test pattern.

Co-Authored-By: glm-5.2 <noreply@anthropic.com>

* [AI] fix(diagnostics-otel): reconcile private providers with OTEL_SDK_DISABLED

Rebase onto main after #119961 (honor OTEL_SDK_DISABLED) changed the
disabled admission path to return before SDK construction. Restore the
removed getBooleanFromEnv import, drop the stale ownedNodeSdkDisabled
guard, and update disabled-mode tests to the new semantics (all routes
off, disabled runtime registered) plus the private-provider signal
path for the integration suite.

Related to #119997

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(diagnostics-otel): isolate restartable provider generations

* test(diagnostics-otel): prove same-pid generation routing

* test(diagnostics-otel): use supported watcher reload mode

* test(diagnostics-otel): satisfy ownership proof gates

* test(diagnostics-otel): use managed proof cleanup

* test(diagnostics-otel): verify injected trace ancestry

---------

Co-authored-by: glm-5.2 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-07 22:24:18 +08:00
Dallin Romney b5369f8e5d fix(qa): replace false Codex pin compatibility evidence (#118012)
* test(qa): replace synthetic Codex pin evidence

* test(qa): update core runtime-pair count

* test(qa): cover official Codex plugin drift

* test(qa): preserve frozen candidate scenario ids
2026-08-07 08:45:26 +08:00
Vincent Koc 75e5c2694f fix(qa): enforce scenario provider lane metadata (#119908)
Punchcard-Session: cobalt-valley-meadow-mg
2026-08-06 23:33:17 +08:00
Onur Solmaz 1f10ef8050 fix(agents): recover once from critical tool loops (#118647)
* feat(agents): add bounded tool-loop recovery

* feat(agents): wire loop detection into batch recovery

* test(agents): cover bounded tool-loop recovery

* fix(agents): enforce loop thresholds within tool batches

* fix(agents): retain rejected loop batch evidence

* test(agents): update embedded session recovery fixture

* fix(agents): surface terminal loop recovery failures

* fix(agents): preserve loop recovery across retries

* fix(agents): isolate rejected loop evidence

* fix(agents): terminate native critical tool loops

* fix(agents): canonicalize tool loop actions

* fix(agents): preserve tool loop recovery guidance

* fix(agents): preserve code mode tool identity

* fix(agents): preserve prebatch loop evidence

* fix(agents): order native loop termination

* fix(agents): clean up rebased tool validation

* fix(agents): interrupt codex side turns on critical tool loops

* fix(agents): tighten loop recovery batch lifecycle

* fix(agents): drop unconsumed loop detector type export

* fix(agents): drop unconsumed loop relay exports

* test(agents): add agent subscribe to embedded session doubles

* fix(agents): scope critical loop recovery to embedded runs
2026-08-06 14:09:10 +08:00
Patrick Erichsen 678a3c18a9 fix(gateway): finish successful sessions after timestamp races (#119752)
* fix(gateway): correlate session lifecycle by run

* test(qa): expect settled handoffs to survive restart quietly

* test(agents): split embedded run persistence coverage
2026-08-05 17:24:12 -07:00
Peter Steinberger e745c298a1 fix(qa): verify Matrix DM rooms really share or isolate their sessions (#119663)
* fix(qa): verify persisted Matrix room session identities

* test(qa): prove Matrix routing keys and transcript identities independently

* fix(qa): compare authoritative Matrix sender identities across drivers
2026-08-05 08:36:32 -07:00
Peter Steinberger 4c94d9fb93 fix(qa): reject silent and out-of-character persona conversations (#119497)
* fix(qa): reject unanswered and unsafe character conversations

* fix(qa): propagate classified persona delivery failures

* fix(qa): keep qualitative persona evaluations on live providers

* test(qa): avoid inefficient persona failure table spread
2026-08-05 05:37:54 -07:00
Vincent Koc ae54355087 fix(qa): preserve profile execution contracts (#119519)
Punchcard-Session: silver-valley-valley-dt
2026-08-05 15:07:40 +08:00
Vincent Koc db8e95f70b test(qa): cover managed OTEL runtime paths (#118965)
* test(qa): cover managed OTEL runtime paths

* test(qa): prove OTEL flush clamp

* test(qa): clean up OTEL runtime fixtures

* test(qa): share OTLP runtime support

* test(qa): harden managed OTEL install proof

* test(qa): align OTEL runtime fixtures

* test(qa): expose OTEL runtime failures

* test(qa): align OTEL runtime boundaries

* test(qa): bound fixture registry shutdown

* test(qa): isolate managed OTEL plugins

* test(qa): start managed OTEL from no plugins

* test(qa): launch managed OTEL from built dist

* test(qa): read managed plugin index from state root

* test(qa): align OTEL runtime agents and types

* test(qa): stage managed plugin packages in scratch

* test(qa): verify OTEL span ancestry

* test(qa): support multiple OTEL harness spans

* test(qa): prove OTEL delivery and preload spans

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): align OTEL delivery proof with channel boundary

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): resolve OTEL preload through fixture modules

* test(qa): isolate sampled OTEL export proof
2026-08-05 14:53:45 +08:00
Peter Steinberger 702eb6eb57 fix(qa): prove newer session facts outrank competing durable memory (#119496)
* fix(qa): prove session memory outranks stale durable facts

* fix(qa): require the canonical memory search result window

* fix(qa): honor the optional canonical memory search limit
2026-08-04 23:34:46 -07:00
Jesse Merhi 95d7d95515 feat(tools): support batched tool search queries (#118623)
* feat(tools): support batched tool search queries

* fix(tools): harden batched tool search

* fix(tools): preserve batch search contracts

* fix(tools): bound batch search processing

* fix(tools): bound batch candidate metadata

* fix(tools): preserve callable batch candidates

* docs(tools): align batch search QA proof

* refactor(tools): isolate search request parsing

* test(qa): strengthen structured search proof

* test(qa): align structured directory proof

* fix(tools): preserve scalar search compatibility

* test(qa): disable batch scenario retries

* test(qa): allow direct-only tools in structured proof

* test(qa): verify nested catalog call result

* test(qa): remove obsolete result scanner
2026-08-05 16:28:10 +10:00
Peter Steinberger cb3890b921 test(qa): isolate active memory request traces (#119502) 2026-08-04 23:08:31 -07:00
Peter Steinberger 046a6881bb fix(qa): prove secret fixtures were read before redaction (#119495) 2026-08-04 23:00:32 -07:00
Peter Steinberger a124966706 fix(qa): require a fresh response for memory recall (#119493) 2026-08-04 22:56:58 -07:00
Peter Steinberger b3aab44f4b fix(qa): keep live provider scenarios out of mock lanes (#119498) 2026-08-04 22:52:57 -07:00
Peter Steinberger dc93ea6d69 fix(qa): follow durable finals after streamed previews (#119378)
* test(qa): isolate memory scenario evidence

* test(qa): follow durable progress completion

* test(qa): run doctor migration noninteractively

* test(qa): split active memory follow-up

* test(qa): wait for preview retirement

* test(qa): require ordered preview retirement

* test(qa): record ordered durable reply evidence

* test(qa): preserve durable delivery budgets

* test(qa): isolate durable lifecycle by account

* test(qa): scope durable reply assertions by account

* test(qa): preserve durable conversation identity
2026-08-04 22:29:15 -07:00
Vincent Koc a1d20ae31b test(tui): cover session lifecycle and resume (#119465)
Punchcard-Session: ember-workshop-lantern-bs
2026-08-05 12:16:06 +08:00
Vincent Koc fd1662f49c fix(cli): retire invalid secret flags and prove doctor recovery (#118926)
* test(qa): add doctor CLI recovery coverage

* test(qa): secure doctor exec SecretRef proof

* test(qa): gate doctor systemd recovery proof

* test(qa): normalize doctor terminal output

* test(qa): close doctor probe sockets

* test(qa): classify doctor probe as foreign

* test(qa): track doctor probe sockets

* test(qa): retain doctor instance narrowing

* test(qa): preserve observed doctor recovery proof

* test(qa): keep doctor recovery on stable dist

* test(qa): honor Windows exec ACL blocking

* test(qa): use canonical home for systemd recovery

* test(qa): follow bounded gateway recovery

* test(qa): accept lifecycle service label

* test(qa): align doctor recovery contract

Punchcard-Session: crisp-lantern-orchard-nv

* docs(secrets): remove retired provider bypasses

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): isolate doctor recovery target

Punchcard-Session: crisp-lantern-orchard-nv

* fix(cli): retire invalid secret provider flags

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): isolate doctor supervisor mode

Punchcard-Session: crisp-lantern-orchard-nv

* fix(plugins): remove dead secret path bypass

Punchcard-Session: crisp-lantern-orchard-nv

* chore: drop release-owned changelog entry

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): isolate doctor sudo scope

Punchcard-Session: crisp-lantern-orchard-nv

* fix(secrets): remove dead path bypass

Punchcard-Session: crisp-lantern-orchard-nv

* test(qa): isolate systemd user bus

Punchcard-Session: crisp-lantern-orchard-nv
2026-08-05 11:20:23 +08:00
Vincent Koc 6a8e11e63c fix(qa): repair release validation scenarios (#119150)
* fix(qa): repair parity and matrix media setup

Punchcard-Session: silver-valley-valley-dt

* test(qa): accept token-budgeted compaction suffix

Punchcard-Session: silver-valley-valley-dt

* test(qa): scope request diagnostics

Punchcard-Session: silver-valley-valley-dt

* test(qa): prove thread-memory causality

Punchcard-Session: silver-valley-valley-dt

* test(qa): configure Matrix image generation and fail fast

Punchcard-Session: silver-valley-valley-dt

* fix(qa): require memory get before thread recall

Punchcard-Session: silver-valley-valley-dt

* fix(qa): unify mock provider dispatch

Punchcard-Session: silver-valley-valley-dt

* fix(qa): repair Anthropic IDs and compaction causality

Punchcard-Session: silver-valley-valley-dt

* fix(qa): authenticate compaction wire causality

Punchcard-Session: silver-valley-valley-dt

* fix(qa): preserve Responses tool item identity

Punchcard-Session: silver-valley-valley-dt

* fix(qa): scope restart heartbeat proof

Punchcard-Session: silver-valley-valley-dt

* test(qa): assert causal traces before delivery

Punchcard-Session: silver-valley-valley-dt

* fix(qa): validate code mode completion evidence

Punchcard-Session: silver-valley-valley-dt

* test(qa): split causal catalog checks

Punchcard-Session: silver-valley-valley-dt

* style(qa): format matrix scenario tests

Punchcard-Session: silver-valley-valley-dt
2026-08-05 09:56:06 +08:00
Josh Avant 618fba92bf feat(audit): add execution identity inspection (#117034)
* feat(audit): add opt-in execution identity inspection

* fix(audit): gate recovery identity retention

* fix(audit): keep recovery identity type private

* test(audit): type internal recovery fixture

* test(audit): split recovery identity coverage

* docs(audit): define operator read trust boundary

* test(qa): register identity scenario child

* fix(audit): enforce shared identity retention bounds

* fix(audit): seal public ingress identity boundary

* fix(audit): keep ingress guard lint-clean

* fix(gateway): preserve advertised method order

* chore(protocol): sync advertised method order

* fix(protocol): encode audit selector invariants

* test(audit): prove exact execution guard

* fix(audit): keep identity storage lazy
2026-08-04 20:05:15 -05:00
Vincent Koc fb81d03d8e fix(commands): restore tool inventory for dynamic models (#119306)
* fix(qa): scale Telegram compact command timeout

* fix(qa): surface Telegram compact reply failures

Punchcard-Session: amber-workshop-river-yr

* fix(commands): prepare tool inventory model context

Punchcard-Session: amber-workshop-river-yr

* test(commands): type runtime context mock

Punchcard-Session: amber-workshop-river-yr

* docs(changelog): note tool inventory repair

Punchcard-Session: amber-workshop-river-yr

* chore(release): defer tool inventory note

Punchcard-Session: amber-workshop-river-yr

* fix(ci): lower environment variable budget

Punchcard-Session: amber-workshop-river-yr
2026-08-05 06:57:21 +08:00
Peter Steinberger 15499e7fc2 fix(qa): enable OpenAI for stored audio scenario (#119349) 2026-08-04 15:08:07 -07:00
Vincent Koc bfcce12e6b fix(tui): restore provider auth in installed local mode (#119283)
* test(tui): cover local recovery and auth flows

* fix(tui): restore installed local auth

* test(qa): allow TUI scenario teardown margin

Punchcard-Session: ember-workshop-lantern-bs

* fix(tui): constrain local CLI launcher ownership

Punchcard-Session: ember-workshop-lantern-bs

* fix(tui): satisfy local auth validation gates

Punchcard-Session: ember-workshop-lantern-bs

* fix(tui): strip inspector flags from auth child

Punchcard-Session: ember-workshop-lantern-bs
2026-08-05 05:40:13 +08:00
Peter Steinberger f15120c6d1 fix(qa): carry selected runtime into flow scenarios (#119324)
* fix(qa): carry selected runtime into flow scenarios

* test(qa): align compaction runtime fact assertion
2026-08-04 13:51:35 -07:00
Vincent Koc aa07d55ec9 fix(qa): align release scenario setup and compaction proof (#119188)
* fix(qa): align release scenarios with runtime contracts

* fix(qa): retain inferred model provider plugins

* fix(qa): accept default OpenClaw compaction runtime
2026-08-05 03:32:49 +08:00
Vincent Koc c1a2f4dde7 fix(tui): keep whitespace-prefixed bang input in chat (#119245)
* chore: start T06 local shell proof

* fix(tui): preserve whitespace before bang submits

* fix(tui): defer paste expansion until submit

* fix(tui): preserve bang spacing across blocked retry

* fix(tui): keep whitespace bang chat out of history

* fix(tui): preserve bang routing across trim
2026-08-05 00:19:53 +08:00
Vincent Koc cdd0856f4d test(tui): prove streaming and tool card rendering (#119251) 2026-08-04 23:32:59 +08:00
Vincent Koc a54bec799c fix(agents): observe native provider prompt egress (#119219)
* fix(agents): observe final provider prompt egress

* fix(agents): observe native provider prompt egress

* test(agents): type native prompt observer models
2026-08-04 22:46:07 +08:00
Vincent Koc 52954a1fa8 chore(tui): add Gateway boundary PTY coverage (#119191)
* test(tui): prove gateway boundary flows

* test(tui): tighten gateway boundary assertions

* test(tui): satisfy gateway boundary lint

* test(tui): harden gateway boundary PTY proof

* test(tui): strengthen gateway lifecycle proof

* test(tui): validate gateway history metadata

* test(tui): isolate gateway model proof

* test(tui): isolate gateway model replies

* test(tui): isolate gateway boundary fixtures

* test(tui): settle gateway session adoption
2026-08-04 21:25:02 +08:00
Vincent Koc b4f01afa86 test(qa): cover Canvas agent and node controls (#119047)
* test(qa): cover Canvas agent and node controls

* fix(test): activate Canvas registry before gateway startup

* fix(test): align Canvas node proof with wire contract

* fix(test): narrow Canvas node invocation frames
2026-08-04 20:42:30 +08:00
Vincent Koc 6d88ec5248 fix(agents): recover from invalid compaction summaries (#119137) 2026-08-04 19:43:25 +08:00
Vincent Koc 121c6c1042 test(tui): prove command surfaces through PTY (#119165) 2026-08-04 18:08:53 +08:00
Vincent Koc 4bdf9ca789 fix(tui): block terminal controls in system messages (#118998)
* fix(tui): sanitize rendered system messages

* test(tui): keep PTY safety proof within lint budget

* test(tui): clarify terminal safety PTY proof

* test(tui): de-churn terminal safety harness

* fix(tui): sanitize connection status output

* test(tui): split PTY harness support

* fix(tui): sanitize selector and footer output

* fix(tui): harden terminal display boundaries

* fix(tui): harden terminal display boundaries

* fix(tui): harden terminal output boundaries

* test(tui): repair terminal safety proof

* test(tui): harden terminal safety oracle

* test(tui): type OSC terminator candidates

* fix(tui): authenticate current terminal rendering

* fix(tui): harden terminal output safety evidence

* test(tui): keep PTY cell type internal

* test(tui): reject literal tabs in PTY oracle

* test(tui): reject literal backspace in PTY oracle
2026-08-04 16:35:41 +08:00
Vincent Koc fd1cce2826 test(qa): restore memory tools primary ownership (#119142) 2026-08-04 15:57:32 +08:00
Vincent Koc 7aa3642f6d test(qa): repair QA catalog integrity (#119140) 2026-08-04 15:28:02 +08:00
Vincent Koc 3ac7083213 improve(qa): cover vision channel offload (#118862)
* test(qa): cover vision channel offload

* test(qa): harden vision channel offload coverage
2026-08-04 14:57:03 +08:00
Vincent Koc e0799199b3 test(qa): cover sandboxed exec behavior (#119053) 2026-08-04 14:36:03 +08:00
Vincent Koc 52c9448cb5 test(qa): prove shared-channel memory recall (#119111) 2026-08-04 14:20:08 +08:00
Vincent Koc 3f2fb7e365 test(qa): cover gateway plugin approvals (#119128) 2026-08-04 14:07:29 +08:00
Vincent Koc a8fbadcde7 test(qa): cover instruction profile artifacts (#119078) 2026-08-04 13:18:43 +08:00
Vincent Koc 5a1daf81a5 test(qa): cover memory promotion safety (#119093) 2026-08-04 12:17:46 +08:00
Vincent Koc 2ca01fb618 test(qa): prove overflow compaction pruning (#119033) 2026-08-04 12:15:11 +08:00
Vincent Koc 12beeb7b29 test(qa): cover packaged browser profiles (#119043) 2026-08-04 11:13:05 +08:00
Vincent Koc 7f766550a1 test(qa): prove agent tool approval controls (#119029) 2026-08-04 11:02:17 +08:00
Vincent Koc e29f692066 test(qa): repair scenario catalog baselines (#119062) 2026-08-04 10:21:04 +08:00
Vincent Koc 6b66866fe8 test(qa): prove agent session scope continuity (#119032) 2026-08-04 09:52:39 +08:00
Vincent Koc fc1913defe test(qa): prove workspace mutation tools (#119021) 2026-08-04 09:52:31 +08:00