Commit Graph

81507 Commits

Author SHA1 Message Date
vyctorbrzezowski 2dffd4e625 feat(ui): render transcript footnotes as navigable endnotes
Local markdown-it footnote plugin: superscript references jump to an
ordered endnotes section and back to their exact reference. Note ids are
namespaced per transcript message so identical notes stay distinct.
No new dependencies.
2026-08-22 10:54:14 +00:00
Ayaan Zaidi da0cb592dd perf(e2e): reuse one authorized Telegram Desktop session per Mantis run (#127835)
* refactor(mantis): reuse authorized desktop captures

* fix(mantis): budget desktop authorization failures

* chore(mantis): bound desktop proof retries

* fix(e2e): drop unused recorder failure fact type export

* fix(ci): route Mantis desktop teardown through the recorder wrapper

Cleanup invoked the internal recorder executable as mantis-sut, which is
deliberately kept out of the docker group and cannot read the
recorder-owned session file; teardown therefore failed and blocked
safe_to_release. The cleanup step already runs as the recorder user, so
call the public wrapper whose exec shim cds into the session root.

* fix(e2e): make recorder failure fact lane-readable; document v2 lifecycle

The Mantis workflow runs the recorder as the desktop user while the lane
reads the authorization-failure fact as mantis-sut; 0600 made that read
fail EACCES and silently disabled the two-attempt retry budget. Write the
fact 0644 — the 0770 attempt directory bounds visibility.

Update the mantis doc's recorder section for the v2 session lifecycle:
required --session handle with healthy-session reuse, capture-only stop,
and teardown owning authorization termination and lease release.
2026-08-22 15:58:12 +05:30
Peter Steinberger 2d0fff4ac5 perf(signal): reuse parsed inbound payload (#127851)
Co-authored-by: Amp <amp@ampcode.com>
2026-08-22 03:27:28 -07:00
Vyctor H. Brzezowski 39cff92880 fix(ui): keep transcript disclosures anchored (#126272)
* fix(ui): keep transcript disclosures anchored

* fix(ui): include file tool disclosure anchors

* fix(ui): anchor raw tool disclosures

* test(ui): cover merged disclosure invariants

* fix(ui): anchor sidebar disclosure commits

* test(ui): assert disclosure state transitions

* fix(ui): cover semantic transcript disclosures

* fix(ui): anchor transcript geometry controls

* test(ui): exercise tab geometry anchoring

* test(ui): keep geometry proof behavior-bound

* refactor(ui): split disclosure anchor coverage

* refactor(ui): extract transcript scroll margin

* refactor(ui): shorten transcript helper names
2026-08-22 07:02:45 -03:00
Peter Steinberger 04d174584d perf(line): skip empty inbound media projection (#127827)
Co-authored-by: Amp <amp@ampcode.com>
2026-08-22 02:42:05 -07:00
Peter Steinberger 54257e0200 fix(logging): preserve incomplete tail records (#127810)
* fix(logging): preserve incomplete tail records

* test(logging): terminate channel log fixtures

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-08-22 02:35:30 -07:00
Peter Steinberger 3ae680f714 perf(gateway): reuse session subscription lookups (#127811)
Co-authored-by: Amp <amp@ampcode.com>
2026-08-22 02:04:22 -07:00
Vincent Koc 40ede061ab fix(plugins): normalize correction versions in drift repair commands (#127800)
Punchcard-Session: brisk-timber-meadow-w6
2026-08-22 02:00:31 -07:00
Vincent Koc 8bc499efa4 test(slack): isolate plugin command dispatch proof (#127805) 2026-08-22 02:00:05 -07:00
Peter Lee 97fe326660 fix(discord): treat audio transcripts as untrusted input (#123098)
Centralize untrusted audio transcript framing across channel plugins and keep Discord voice transcripts out of typed command provenance.

Co-authored-by: xialonglee <li.xialong@xydigit.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-22 14:28:18 +05:30
Vincent Koc b86062e5b4 fix(release): accept frozen QA completion evidence (#127806) 2026-08-22 01:56:22 -07:00
Ayaan Zaidi 10c774cf38 feat(mantis): keep QA leases alive and stage fixture plugins (#127804)
* feat(mantis): keep leases alive and stage fixture plugins

* refactor(mantis): deduplicate lease keepalive guard

* fix(mantis): retry keepalive on unexpected broker errors

* fix(mantis): fence active proof on terminal lease loss
2026-08-22 14:09:28 +05:30
Peter Steinberger 36d50b2009 perf(googlechat): skip empty inbound media projection (#127803)
Amp-Thread-ID: https://ampcode.com/threads/T-01a027e5-4658-70ad-93c0-0e7c5e2fdd63

Co-authored-by: Amp <amp@ampcode.com>
2026-08-22 01:11:36 -07:00
Peter Steinberger 81002dd250 fix(ui): announce session sharing errors (#127801)
Co-authored-by: Amp <amp@ampcode.com>
2026-08-22 01:08:49 -07:00
Josh Lehman 0ab6578478 fix: preserve source code in tool results (#127697)
Preserve opaque source strings across tool-result replay while retaining masking for direct .env reads, registered or recognizable secrets, structured sensitive fields, and payment data.
2026-08-22 13:30:45 +05:30
Ayaan Zaidi 460f5b6c61 perf(mantis): parallelize proof builds and warm caches (#127798)
* perf(mantis): parallelize proof builds and warm caches

* fix(mantis): size build image for the copied pnpm store

* chore(ui): refresh startup JS gzip baseline after streamed-markdown perf work

Identical source measures 345034-345058 B across builds while the
committed baseline left only a 9 B margin under the 512 B ratchet
tolerance, so build-artifacts flips on gzip nondeterminism (green on
main run 32559609413, red on PR run 32559442295, red locally).
Regenerated with scripts/check-control-ui-performance.mts
--update-baseline; the 350 KiB hard ceiling still bounds creep.
2026-08-22 07:53:36 +00:00
Ayaan Zaidi 6e7349be4d chore(ui): restore markdown test lint (#127799)
Restore main CI by moving existing streaming code-fence coverage into a focused test file. No production behavior or assertions change.
2026-08-22 13:11:16 +05:30
sloptop 4c866a9bee fix(models): scope status alias resolution to the selected agent (#127631)
`models status --agent` selected the agent's primary and fallbacks but
resolved aliases from global defaults only, so a bare per-agent alias was
displayed and probed as a different provider than the runtime selects.
Status, --check, auth diagnostics, provider-use reporting and --probe could
all inspect the wrong route and report false missing or auth state.

The canonical resolvers already merge per-agent model rows when given an
agentId, so this passes the agentId that was already resolved locally and
deletes the synthetic global-default config that carried the agent primary.
Displayed aliases now come from the effective agent-scoped index, which
applies per-agent replacement instead of reading agents.defaults.models.
Unscoped status keeps reporting global defaults.

Refs #127585
2026-08-22 00:29:20 -07:00
Yuval Dinodia a0f3457f38 fix(agents): preserve existing files after failed host writes (#118470)
Preserve existing unrestricted host files when a write or edit fails partway through by updating regular files in place and restoring the original prefix and length.

Writable-but-unreadable regular files now fail before mutation.

Co-authored-by: yetval <yetvald@gmail.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-22 12:56:45 +05:30
Yuval Dinodia ff6db34233 fix(skills): preserve local changes during updates (#118190)
Prevent ClawHub skill updates from silently replacing locally modified files. Verify recorded install digests at the rollback boundary, restore on mismatch, and require explicit --force for unverifiable legacy installs.

Co-authored-by: yetval <yetvald@gmail.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-22 12:32:04 +05:30
Vyctor H. Brzezowski e22dc4b287 perf(ui): skip highlighting unfinished code blocks while streaming (#127754)
* perf(ui): defer open-fence highlighting

* perf(ui): simplify unfinished fence highlighting

Co-authored-by: vyctorbrzezowski <krzyszchweski@gmail.com>

* docs: avoid concurrent changelog insertion conflict

* docs: respect release-owned changelog policy

Release-note context and before-after UI proof remain in the pull request.

Co-authored-by: vyctorbrzezowski <krzyszchweski@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-21 23:41:00 -07:00
Marvinthebored 2fdfd64a1a fix(channels): honor queued replies without receipts (#127667)
Restore compatibility-aware visible dispatch detection when legacy prepared runners return queued counters without a settled receipt. Preserve settled-receipt authority.

Co-authored-by: Marvinthebored <peter@lindsey.jp>
2026-08-22 12:08:52 +05:30
Vyctor H. Brzezowski dacfd09786 perf(ui): stop rescanning whole replies on every streamed chunk (#127749)
* perf(ui): scan streaming markdown incrementally

* perf(ui): own streaming markdown cache invalidation

Co-authored-by: vyctorbrzezowski <krzyszchweski@gmail.com>

* docs: respect release-owned changelog policy

Release-note context remains documented in the pull request evidence.

Co-authored-by: vyctorbrzezowski <krzyszchweski@gmail.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-21 23:38:32 -07:00
Peter Steinberger 32cf13dc90 fix(onboard): emit JSON on option-validation failures (#127794)
`openclaw onboard --json` wrote a JSON object to stdout on success, and the
top-level CLI handler emitted {"ok":false,"error":...} for thrown errors, but
every option-validation rejection printed to stderr and exited 1 with an empty
stdout. Automation parsing stdout got a valid object for some bad flags and a
parse error for others, with no way to tell a rejected flag from a crash.

Measured before this change, all with --json and all with empty stdout:
--mode, --flow, --daemon-runtime, --gateway-bind, --gateway-auth,
--gateway-token-ref-env, a missing --gateway-password, and --auth-choice.

Routes every onboarding option rejection through one shared primitive that
emits { ok: false, phase: "options", message } when --json is set, then reports
and exits exactly as before. 'options' joins the existing phase vocabulary
('daemon-install', 'gateway-health'). Every human message, stderr stream, and
exit code is unchanged; this only adds the stdout object that was missing.
2026-08-21 23:23:15 -07:00
Peter Steinberger c8d6604261 fix(ui): avoid nested activity main landmark (#127789)
Co-authored-by: Amp <amp@ampcode.com>
2026-08-21 23:08:38 -07:00
Peter Steinberger 9d33b0b727 perf(gateway): defer session lookup caches (#127790)
Amp-Thread-ID: https://ampcode.com/threads/T-01a027b2-a0b6-73f9-a463-3c5f52891db9

Co-authored-by: Amp <amp@ampcode.com>
2026-08-21 23:02:52 -07:00
Ayaan Zaidi 0933263f76 fix(mantis): publish proof comments on auto-triggered runs (#127787)
## What Problem This Solves

Auto-triggered Mantis proof runs (label/`clawsweeper_label` and other non-comment request sources) end with no PR comment at all. The durable evidence publisher runs with `--create-missing false` and only edits an existing marker comment, but the inline status comment carrying that marker was only created when `request_source == 'issue_comment'`. Label-triggered runs therefore published nothing and logged the misleading "Skipped stale Mantis QA evidence comment because its status is no longer active" — observed on PR #127735. This is the silent-failure class: a Mantis run completes and the PR shows no visible outcome.

## Why This Change Was Made

- `.github/workflows/mantis-telegram-desktop-proof.yml`: the status ack comment (👀 + active-job link + run-scoped marker) is now created for every request source that resolves to a PR (`pr_number != ''`), not only `issue_comment`. The 👀 *reaction* stays `issue_comment`-only (it lives in `mantis-resolve-request.yml`, untouched — there is no triggering comment to react to on label runs).
- The start-failure fallback comment and the existing-artifact republish path now use the same run-scoped marker `<!-- mantis-telegram-desktop-proof:${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT} -->` as the status comment and the main publisher, so every publisher edits the single run-owned comment (ack → progress → final proof; no comment spam). The republish path gets an explicit `--create-missing false` to match. The design invariant that makes `false` safe: the fallback status-comment step is not `continue-on-error`, so a run in which no marker comment could be created fails `resolve_request` and never reaches publish.
- `scripts/mantis/publish-pr-evidence.mjs`: the two skip cases now log honestly — "no existing comment found" vs "could not update existing comment" — instead of one misleading stale-status message.

## User Impact

Operators triggering Mantis via labels (ClawSweeper flows) now get the same single evolving PR comment as comment-triggered runs: an immediate 👀 ack with the running job link, edited in place into the final proof evidence. No more runs that finish invisibly.

## Evidence

- Focused suite: `node scripts/run-vitest.mjs test/scripts/mantis-telegram-desktop-proof-workflow.test.ts` — 28/28, including new assertions that the status/failure comment gates use `pr_number != ''` (and not `request_source`) and that both publishers pass the run-scoped marker with `--create-missing false`.
- `node scripts/check-changed.mjs -- <touched files>` green; `git diff --check` clean.
- Marker alignment verified across all five sites in the workflow (status comment, prior-attempt cleanup regex, fallback comment, failure report, both publisher invocations): all use `mantis-telegram-desktop-proof:${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}`.
- Live-run proof of the label-triggered path requires a merged workflow (GitHub runs the workflow from the default branch for these triggers), so the first post-merge label-triggered Mantis run is the live verification; stated here as the known evidence gap.

Production LOC delta: −4 (workflow/tooling); tests +13.
2026-08-22 11:10:11 +05:30
Ayaan Zaidi 10e0e690df feat(mantis): programmable proof boundaries with recipe library (#127782)
Makes the Mantis Telegram Desktop proof agent programmable at its trust boundaries: declarative Bot API fault rules (drop/status per method), per-request scripted mock-provider responses, observe-until predicates (post-cursor events/text, cumulative provider count), and bounded proxy-side recording of outbound Bot API requests as trusted lane facts. Adds a reusable recipe library under .github/codex/prompts/mantis-recipes/ and raises the proof agent's reasoning effort to high.

Security: the SUT container shadows proxy-control with an inaccessible tmpfs so candidate PR code sharing the mantis-sut uid cannot read or rewrite the proxy's recorded evidence; unmount is blocked by cap-drop/no-new-privileges. Proof doctrine now treats proxy-recorded Bot API facts as trusted comparison evidence and provider request logs as diagnostics.

Follow-up named in PR: move the mock OpenAI server out of the SUT container so provider request facts also become candidate-tamper-proof.
2026-08-22 11:06:06 +05:30
Dallin Romney 6851594b71 fix(ui): restore drafts before expiry maintenance (#127766)
* fix(ui): restore drafts before expiry maintenance

* test(ui): satisfy draft-store harness lint

* test(ui): type IndexedDB method receivers
2026-08-21 22:34:13 -07:00
Peter Steinberger 500bb6031d fix(onboard): name the available providers when --import-from is unknown (#127780)
Onboarding answered an unknown --import-from with "Migration provider \"x\" is
not installed or bundled. Install it before starting the transactional import."
— no list of valid ids, no next command, and advice to go install something
that is usually just a typo.

Its siblings already do this correctly: resolveMigrationProvider appends
"Available providers: ..." and the migrate selection helper appends
"Available skills: ...". The missing --import-from case in onboarding itself
already points at `openclaw migrate list`. Only the unknown-id case dead-ended.

Collapses the two duplicated throws into one guard used by every path, which
also closes a gap: the no-back-navigation branch returned the picker result
without validating it at all.
2026-08-21 22:12:32 -07:00
Peter Steinberger 15569b210e perf(gateway): avoid single-chunk request body copy (#127783)
Amp-Thread-ID: https://ampcode.com/threads/T-01a021f5-984a-7628-a30c-491c166ff247

Co-authored-by: Amp <amp@ampcode.com>
2026-08-21 22:12:09 -07:00
Marvinthebored 80beef6ff7 fix(codex): accept bounded upstream prompt provenance (#127730)
Allow exact upstream prompt provenance to use the existing 512 KiB settled-projection budget while preserving ordinary text bounds and aggregate accounting.

Co-authored-by: Marvinthebored <marvin.assistant@lindsey.jp>
2026-08-22 10:32:48 +05:30
Peter Steinberger ec39376967 fix(onboard): reject --gateway-bind custom without a valid customBindHost (#127779)
Non-interactive onboarding accepted `--gateway-bind custom` with no
`gateway.customBindHost`, wrote `bind: "custom"` to the config, and reported
success. The Gateway refuses that config outright:

  Gateway failed to start: gateway.bind=custom requires gateway.customBindHost.

`doctor` and `config validate` both call the written config healthy, so the
first sign of trouble is a Gateway that will not start.

Every other onboarding flag already rejects a mode whose companion value is
missing (--gateway-auth password, --auth-choice openai-api-key, --auth-choice
custom-api-key). This restores the same contract for bind, reusing the same
validateDottedDecimalIPv4Input the interactive wizard and `openclaw configure`
apply to this field. Pre-seeding gateway.customBindHost keeps working.
2026-08-21 21:59:01 -07:00
Peter Steinberger de4fbf964f fix(ui): keep selected-text actions off context clicks (#127776)
Amp-Thread-ID: https://ampcode.com/threads/T-01a021f4-b547-7788-a916-d4a94cbd3e3b

Co-authored-by: Amp <amp@ampcode.com>
2026-08-21 21:52:49 -07:00
Jason O'Neal 89e2d43095 perf(sqlite): skip schema write lock on current state (#126825)
Allow healthy current-version state databases to open without taking SQLite writer locks while preserving schema repair, legacy cron migration, and external ownership fencing.

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-22 10:19:20 +05:30
ClawSweeper 48a2b45fed fix: stop limited access status from shifting page layouts (#127704)
* fix(ui): move limited access status into shell chrome

* fix(ui): cover tablet limited access layout

---------

Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
2026-08-21 21:42:05 -07:00
Peter Steinberger 1bd5f22b13 fix(ui): keep resize drag owned by one pointer (#127760)
Amp-Thread-ID: https://ampcode.com/threads/T-01a021f4-b547-7788-a916-d4a94cbd3e3b

Co-authored-by: Amp <amp@ampcode.com>
2026-08-21 21:36:10 -07:00
Peter Steinberger 6cb08cb8ee perf(media): skip unused local MIME sniff (#127772)
Amp-Thread-ID: https://ampcode.com/threads/T-01a021f5-984a-7628-a30c-491c166ff247

Co-authored-by: Amp <amp@ampcode.com>
2026-08-21 21:15:00 -07:00
Jason O'Neal ef18fbe566 fix(doctor): repair plugin host links before startup migration (#126830)
Repair managed OpenClaw host links under the startup migration lease before plugin state migrations, preventing retained Codex upgrades from repeating the same readiness failure.

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-08-22 09:37:24 +05:30
ClawSweeper 8c1ea23826 fix: preserve internal reply images across gateway restart (#127729)
Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-21 21:03:58 -07:00
ClawSweeper 7329a8d3d7 fix: Code Mode shell calls stall near yield deadline (#127759)
* fix: prevent Code Mode shell waits from stalling

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>

* fix: honor remaining Code Mode deadline

---------

Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-21 21:02:03 -07:00
Dallin Romney e1256421d3 fix(e2e): skip package postinstall in git fixture (#127768) 2026-08-21 20:45:19 -07:00
Peter Steinberger cf5f4871e8 perf(tui): reuse prepared transcript render lines (#127767)
Amp-Thread-ID: https://ampcode.com/threads/T-01a02570-1023-77c8-9513-e43f179ee673

Co-authored-by: Amp <amp@ampcode.com>
2026-08-21 20:37:50 -07:00
Marvinthebored 575146a0a9 fix(cli): report exact Claude stream failures (#127169)
Preserve parser-owned bounded diagnostics in managed Claude live turns and share the canonical output-limit formatter.

Co-authored-by: Marvinthebored <peter@lindsey.jp>
2026-08-22 08:58:10 +05:30
Dallin Romney 0ac2606bc6 test(plugins): preserve configless manifest expectation (#127765) 2026-08-21 20:27:59 -07:00
openclaw-mantis[bot] 0978e27f9d chore(i18n): refresh native locales (#127681)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-21 20:00:27 -07:00
openclaw-mantis[bot] fc1a663f9d chore(ui): refresh control ui locales (#127207)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-21 20:00:01 -07:00
Ayaan Zaidi fcc0bb7490 fix(agents): preserve opaque session key casing (#127279)
Use canonical session-key normalization during subagent reconciliation so case-distinct Matrix and Signal peers cannot be reported as completed. Preserve structural casing reconciliation and remove the O(N) fallback scan.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
Co-authored-by: Alix-007 <li.long15@xydigit.com>
2026-08-22 08:11:41 +05:30
Dallin Romney 53fbe2eb33 fix(release): preserve validation plan across reruns (#127343)
* fix(release): preserve validation plan across reruns

* test(release): align rerun plan assertions

* refactor(release): use canonical plan cache action

* style(test): format release plan cache assertion
2026-08-21 19:08:32 -07:00
ClawSweeper b3d3404ae6 fix(ui): align page titles with page content (#127738)
Co-authored-by: RoboClaw <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-21 19:06:50 -07:00