Commit Graph

802 Commits

Author SHA1 Message Date
Sasan
6938f7dddb fix: allow gateway service commands for named profiles (#116314)
* fix: gateway service commands refuse a named profile or relocated OPENCLAW_HOME

- Resolve the default install identity against the canonical state directory
  for the active OpenClaw home and profile instead of the unprofiled OS
  account default.
- `--profile <name>` / `--dev` project `.openclaw-<profile>` state and config
  paths, so every named profile was classified as isolated state and refused
  `install`, `start`, `stop`, `restart`, `uninstall`, Doctor service repair,
  and self-update service handling.
- `OPENCLAW_HOME` relocates all OpenClaw path defaults and is documented for
  running as a dedicated service user; a relocated home is now an install
  identity. `HOME` alone still is not.
- An `OPENCLAW_STATE_DIR` or `OPENCLAW_CONFIG_PATH` pointing outside those
  canonical paths is still treated as isolated state.
- Recovery guidance in the refusal message now names the paths that must match.

Verified: focused vitest shards for the changed suites plus the daemon, CLI,
and doctor suites that consume the identity check; tsgo core and core-test
lanes; oxlint; docs format, MDX, link, and map checks.

* fix(gateway): keep relocated homes isolated

* fix(config): validate service profile identity

* fix(daemon): enforce named-profile service ownership

* fix(update): reject drifted service selectors before probes

* test(windows): prove scheduled task lifecycle

* test(windows): harden scheduled task proof cleanup

* test(windows): bind lifecycle proof to checkout

* test(windows): normalize cleanup exit status

* test(windows): verify effective task privilege

* test(windows): protect scheduled task proof roots

* test(windows): prove listener-owned task lifecycle

* test(windows): fix scheduled task proof contracts

* test(windows): remove redundant mock coercions

* test(windows): measure fallback before task probes

* test(windows): prove scheduled task process origin

* fix(gateway): preserve unmanaged restart fallback

* test(gateway): cover denied restart ownership

* test(gateway): keep restart helper types private

* test(gateway): classify lifecycle helpers as test code

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-01 11:28:39 +08:00
Koduri Mahesh Bhushan Chowdary
9878bfc8e5 docs: drop retired gateway.reload keys and modes from config docs (#116975)
The gateway.reload documentation advertised four settings the shipped
build rejects. gateway.reload is a strictObject accepting only `mode`,
and `mode` is a union of "off" | "hybrid", so a config written from the
docs fails validation and the gateway fails closed on the unknown keys.

Retired but still documented:
- `debounceMs` and `deferralTimeoutMs` (RETIRED_TUNING_PATHS; stripped by
  `openclaw doctor --fix` via stripRetiredTuningKnobs)
- `mode: "restart"` and `mode: "hot"` (mapped to "hybrid" by
  `openclaw doctor --fix`)

Correct all four docs pages that still describe them, and say what
replaced them: debounce and active-work deferral now run behind built-in
defaults rather than config keys.

Refs #116973
2026-07-31 15:35:16 -07:00
Vincent Koc
61fb29e90a feat(plugins): externalize OpenCode Go provider (#117064) 2026-08-01 06:31:19 +08:00
Vincent Koc
a4faeae9df Merge pull request #101358 from mrunalp/podman-sandbox-backend
Add Podman sandbox backend
2026-08-01 00:00:18 +08:00
Vincent Koc
a1026663ae feat(plugins): externalize ComfyUI provider (#116888) 2026-07-31 23:26:51 +08:00
sallyom
4ba02b83e8 refactor(sandbox): share container backend with Podman
Signed-off-by: sallyom <somalley@redhat.com>
2026-07-31 00:06:33 -04:00
Vincent Koc
9e965073e5 Merge remote-tracking branch 'origin/main' into experiment/google-cli-supported-paths
* origin/main: (168 commits)
  fix(plugins): keep registry sqlite root consistent (#116427)
  fix(cli): keep Gateway auth failures parseable in JSON (#116597)
  fix(trajectory): preserve prompts in oversized events (#116220)
  test(buzz): add live QA Lab channel lane (#116298)
  chore(i18n): refresh native locales (#116567)
  feat: add OpenClaw TUI prototype skill (#116583)
  fix(update): accept concrete versions selected by ranges (#116585)
  fix(agents): preserve locked session model routes
  test(qa-lab): preserve Matrix fault proxy identity
  fix(ci): extend OpenAI live profile setup budget (#116580)
  fix: prevent configured models from stalling startup (#116553)
  fix(cli): close MCP listener after one-shot commands
  fix(auto-reply): keep explicit NO_REPLY silent (#116548)
  test(discord): cover deferred backpressure terminals
  fix(discord): cancel backpressured realtime playback
  test(discord): cover realtime output backpressure
  fix(codex): add remote WebSocket heartbeat and reconnect (#116135)
  fix(macos): wait for the current reconnect snapshot (#116550)
  fix(outbound): recognize current-source message-tool sends (#116560)
  fix(voice-call): type cancelled consult outcomes
  ...

# Conflicts:
#	extensions/google/setup-api.test.ts
#	ui/src/e2e/model-setup.e2e.test.ts
2026-07-31 09:30:03 +08:00
Patrick Erichsen
61cf4b9246 test(buzz): add live QA Lab channel lane (#116298)
* feat(buzz): add live QA runner

* ci(qa): add gated Buzz live lane

* docs(qa): document Buzz live testing

* fix(buzz): keep QA relay type private

* test(buzz): type QA suite mock

* fix(buzz): preserve racing QA reply relations

* fix(qa): harden Buzz credential redaction

* fix(buzz): ignore retained QA relay events

* fix(buzz): clean up observer setup failures

* test(buzz): return complete racing messages

* fix(buzz): default QA credentials to file

* fix(qa): validate pooled Buzz secrets

* fix(qa): redact structured Buzz auth tags

* fix(buzz): preserve QA credential env override

* fix(qa): redact inspected Buzz auth tags

* test(buzz): limit live QA to supported scenarios

* ci(qa): run Buzz lane in release checks

* fix(qa): require secure remote Buzz relays

* fix(qa): satisfy Buzz QA validation gates

* fix(qa): inject credential leasing into transport adapters
2026-07-30 17:44:27 -07:00
Vincent Koc
d540255ce7 docs(google): document supported auth paths 2026-07-30 22:56:26 +08:00
Omar Shahine
944cf08f94 docs(automation): rename scheduled-tasks feature wording to Automations (#114855)
* docs(automation): rename scheduled-tasks feature wording to Automations

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WhJ8EiMXue6ADLmHfb7FL6

* docs: regenerate docs map and add Automations glossary entries

* docs(templates): follow renamed automations-vs-heartbeat anchor

* docs(automation): fix markdown formatting drift

* docs(automation): teach the canonical automations tool and sync the copied heartbeat default

Review follow-ups: normal instructions use the automations tool with cron as
an explicit compatibility alias; every verbatim copy of the default heartbeat
prompt matches the new shipped text from the strings PR.

---------

Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 07:21:56 -07:00
Dallin Romney
f027d7bcf6 refactor(qa): make Matrix sharding execution-owned (#115589)
* refactor(qa): make sharding execution-owned

* test(qa): simplify transport selection coverage
2026-07-29 15:23:37 +08:00
Vincent Koc
0f41b401fd docs(browser): correct Docker sandbox setup (#115254) 2026-07-28 23:18:40 +08:00
Dallin Romney
9feb6ad161 refactor(qa): make scenario selection taxonomy-owned (#114055)
* refactor(qa): remove scenario execution profiles

* fix(qa): preserve smoke CI membership

* test(qa): drop redundant smoke pack order check

* refactor(qa): remove Matrix runner profiles

* refactor(qa): simplify Matrix CI orchestration

* refactor(qa): derive execution sets from taxonomy

* fix(qa): keep Matrix shard helper private

* refactor(qa): derive profile scenarios from taxonomy

* refactor(qa): reconcile taxonomy selection

* refactor(qa): use canonical profile planning

* refactor(qa): select canonical coverage owners

* fix(qa): keep profile selector internal

* refactor(qa): remove representative coverage owners
2026-07-28 22:23:41 +08:00
Peter Steinberger
fd0fdcc458 chore(docs): audit external links without gating PRs (#114643)
* docs: repair audited external links

* ci(docs): add advisory external link audit
2026-07-27 14:02:09 -04:00
Peter Steinberger
abfe7c64a7 docs(install): recommend Node 26 as the OpenClaw runtime (#114399)
* docs(install): recommend Node 26; CI/installer stay on Node 24 for now

* feat(cli): point unsupported-runtime nvm hint at Node 26

* feat(install): provision Node 26 by default (brew mainline node formula, NodeSource 26.x, portable win zip)

* test(install): align installer tests with Node 26 provisioning defaults

* docs(install): state per-platform Node provisioning accurately
2026-07-27 04:32:21 -04:00
Peter Steinberger
669db2968f refactor(agents): retire TOOLS.md into an AGENTS.md section with a doctor migration (#113966)
* fix(agents): stop retired attestation hashes from faking a vanished workspace

* feat(agents): migrate TOOLS.md content into the AGENTS.md tools section

* refactor(agents): drop TOOLS.md from the workspace bootstrap set

* refactor(policy): read tool policy entries from AGENTS.md

* docs: describe local tool notes as an AGENTS.md section

* test(codex): drop TOOLS.md developer-instruction coverage with the removed path

* test(agents): cover the TOOLS.md doctor migration behaviors

* refactor(doctor): satisfy TOOLS.md migration lint

* test(agents): split workspace attestation survival coverage

* refactor(codex): simplify workspace context basenames

* refactor(doctor): keep TOOLS.md migration helpers module-local

* docs: regenerate docs map

* fix(doctor): keep migration claims fresh

* fix(doctor): preserve nested tool notes

* refactor(doctor): split tools migration helpers

* refactor(doctor): limit TOOLS.md migration to workspace root

* style(doctor): keep migration under line limit

* fix(doctor): recover interrupted AGENTS publish

* docs(hooks): describe root-only TOOLS.md migration accurately

* fix(doctor): preserve migrated tool guidance visibility

* test(agents): regenerate prompt snapshots after rebase

* fix(policy): block evaluation while TOOLS.md is unmigrated

* fix(doctor): check merged bootstrap budget per agent

* fix(doctor): keep budget helper internal

* refactor(doctor): keep migration budget helpers to their consumers
2026-07-27 03:56:30 -04:00
Peter Steinberger
3a4f337802 fix(gateway): connect first-boot loopback agents after readiness (#114380)
* fix(gateway): pair local CLI before runtime-token readiness

* docs(gateway): explain first-boot loopback CLI auth

* fix(gateway): keep startup pairing result internal

* chore(gateway): leave release note to release process
2026-07-27 03:15:12 -04:00
Peter Steinberger
f43fac21c7 fix(gateway): stop showing retired HEARTBEAT.md in the agent files editor (#113621)
* fix(gateway): drop retired HEARTBEAT.md from agent core files

* fix(ci): stop asserting retired HEARTBEAT.md in docker release smoke

* docs: align HEARTBEAT.md references with cron scratch

* docs(agents): drop retired HEARTBEAT.md from workspace read comment
2026-07-25 04:58:31 -07:00
Peter Steinberger
5bea268128 feat(anthropic): complete Claude Opus 5 rollout (#113392)
* feat(models): add Claude Opus 5 support

* test(models): align Opus 5 setup fixtures

* test(models): update ambient Opus 5 detection

* fix(models): reconcile Opus 5 support with main
2026-07-24 14:55:36 -07:00
Peter Steinberger
b23c7bd0f8 feat(cron): convert heartbeat tasks: entries into independent cron jobs (#113165)
Each legacy heartbeat tasks: entry becomes an editable system-created cron
job (declaration key heartbeat-task:<agentId>:<hash>, per-occurrence
identity for duplicate names) that fires a guarded heartbeat wake carrying
the task prompt plus current monitor scratch context. Task cadence is now
independent of the base heartbeat interval; active-hours, busy-retry,
min-spacing, and flood guards are preserved, deferred payload-carrying
wakes are retained and retried after the spacing floor, and colliding
task/event wakes cannot starve each other.

openclaw doctor --fix migrates existing blocks: async parse/plan, then one
synchronous SQLite transaction that rereads the pinned scratch revision,
upserts job rows, and strips the tasks: block atomically — concurrent
doctors serialize on the database and a losing run aborts untouched.
Orphan fields, invalid intervals, and incomplete entries block migration
of their block with a clear finding instead of silent text loss. The
runtime tasks: parser is deleted; leftover text is ordinary scratch prose.

Nine Codex gpt-5.6-sol xhigh autoreview cycles; final verdict clean.
2026-07-23 16:13:08 -07:00
Peter Steinberger
9f13f9b140 feat(openai): make million-token context an explicit opt-in (#112916)
* feat(openai): add safe long-context opt-in

* fix(ci): keep long-context checks within gates

* fix(ci): keep Codex usage helpers internal
2026-07-23 05:34:54 -04:00
Peter Steinberger
f5562748de fix(logging): give non-default profiles their own gateway log file (#112777)
* fix(logging): give non-default profiles their own gateway log file

* chore: defer profile log release note
2026-07-22 19:08:41 -04:00
Peter Steinberger
edecdbd05e refactor(config): config-surface reduction tranche 3 — product consolidations (review request) (#111527)
* refactor(config): consolidate media model lists

* refactor(config): unify memory configuration

* refactor(config): consolidate TTS ownership

* refactor(config): move typing policy to agents

* refactor(config): retire product-level config surfaces

* refactor(config): share scoped tool policy type

* chore(config): refresh generated baselines

* fix(config): honor agent typing overrides

* fix(config): migrate sibling config consumers

* refactor(infra): keep base64url decoder private

* fix(config): strip invalid legacy TTS values

* chore(config): refresh rebased baseline hash

* fix(doctor): route legacy messages.tts.realtime voice to talk during tts move

* refactor(config): polish final layout names

* refactor(config): freeze retired tuning defaults

* feat(config): add fast mode default symmetry

* refactor(config): key agent entries by id

* docs(config): update final layout reference

* test(config): cover final layout migrations

* chore(config): refresh final layout baselines

* fix(config): align final layout runtime readers

* fix(config): align remaining readers

* fix(config): stabilize final layout migrations

* fix(config): finalize config projection proof

* fix(config): address final layout review

* docs(release): preserve historical config names

* fix(config): complete keyed agent migration

* fix(config): close final migration gaps

* fix(config): finish full-branch review

* fix(config): complete runtime secret detection

* fix(config): close final review findings

* fix(config): finish canonical docs and heartbeat migration

* fix(config): integrate latest main after rebase

* refactor(env): isolate test-only controls

* refactor(env): isolate build and development controls

* refactor(env): collapse process identity indirection

* refactor(env): remove duplicate config and temp aliases

* docs(env): define the operator-facing allowlist

* ci(env): ratchet production variable count

* fix(env): remove stale provider helper import

* fix(env): make ratchet sorting explicit

* test(env): keep test seam in dead-code audit

* test(env): cover ratchet growth and boundary; document surface budgets

* docs(config): document tier-eval consolidations

* docs(config): clarify speech preference ownership

* test(memory): align retired tuning fixtures

* refactor(memory): freeze engine heuristics

* refactor(config): apply tier-eval tranche

* refactor(tts): move persona shaping to providers

* refactor(compaction): move prompt policy to providers

* test(config): align hookified prompt fixtures

* chore(deadcode): classify test-only exports

* chore(github): remove unused spawn helper

* chore(deadcode): classify queue diagnostics

* chore(deadcode): remove unused lane snapshot export

* chore(plugin-sdk): ratchet consolidated surface

* fix(config): integrate latest main after rebase
2026-07-21 20:28:43 -07:00
Peter Steinberger
2bb6b870aa fix: preserve Codex-bound conversation history across session rotation (#112016)
* fix: preserve Codex conversation bindings

* test: harden Codex live gateway stress

* chore: refresh plugin SDK API baseline

* test: tighten restart recovery fixtures

* test: complete restart recovery recorder fixture

* fix: keep plugin command authorization fail closed

* fix: restore private queue source imports

* fix: keep private SDK imports inside core

* fix: keep speech core on private SDK paths

* fix: stage private SDK exports for live tests

* fix: preserve plugin-bound gateway history

* fix: block transcript writes after binding races

* test: complete live stage helper contracts

* test: align binding mocks with current types

* fix: preserve compiler OOM diagnostics

* chore: move release notes to PR context
2026-07-20 19:42:56 -07:00
Peter Steinberger
b61619e03c fix(gateway): dev mode suppresses ambient channel env auto-configuration (#112011)
Channel plugins declare package env triggers in manifests, and ambient
environment variables count as "channel configured". A dev gateway
(gateway run --dev) inherits the operator's shell, so real channel
credentials silently configured channels and could connect development
instances to live services (observed with reef and a Telegram-range
connection during isolated stress testing).

Dev mode now drops presence signals whose only sources are env or
manifest-env across activation planning, auto-enable, autostart, health
recovery, readiness, reloads, and startup warnings. Explicit
channels.<id> config still works, --dev-ambient-channels restores the
old behavior, and startup logs the suppressed channel ids once. Non-dev
gateways are unchanged.
2026-07-20 19:28:07 -07:00
Peter Steinberger
783a5d21cf refactor(config): purge numeric tuning knobs behind built-in defaults (#111382) 2026-07-19 07:35:45 -07:00
Peter Steinberger
e23dde3de5 feat: disable automatic session resets by default (#111140)
* feat(config): disable automatic session resets by default

* fix(sessions): honor pending reset tombstones

* test(sessions): align reset coverage with disabled default

* fix(sessions): preserve explicit reset override fallback

* fix(sessions): inherit active mode in partial type resets
2026-07-18 21:50:48 -07:00
Peter Steinberger
09a64f7ab0 feat(models): make per-agent allowlists explicit (#110888) 2026-07-18 21:42:05 +01:00
Peter Steinberger
f14947d256 fix(codex): persist automatic compaction history (#110587)
* fix(codex): persist automatic compaction counts

* test(codex): stress compaction and restart recovery

* test(codex): bind compaction waves to fresh counts

* chore: keep Codex release note in PR
2026-07-18 10:37:25 +01:00
Peter Steinberger
b5fb47e283 test(codex): stress resume across gateway restarts (#110486) 2026-07-18 07:50:17 +01:00
Peter Steinberger
2ca4d92f1a docs: live-test gateway isolation policy (session-owned dev gateway, operator approval for real instances) 2026-07-17 17:55:33 -07:00
Peter Steinberger
b0a2d02427 fix(ci): make plugin SDK API manifest mergeable (#110228) 2026-07-18 00:16:39 +01:00
Peter Steinberger
349f78776d fix(models): refresh bundled provider catalogs (#109410)
* fix(models): refresh bundled provider catalogs

* docs(models): refresh generated docs map

* fix(xiaomi): keep provider helper private

* chore(release): defer catalog release note
2026-07-16 16:47:25 -07:00
NianJiu
42ff5ec754 feat(kimi): add Kimi K3 support (#109202)
* feat(moonshot): add Kimi K3 support

* feat(kimi): add K3 subscription models

---------

Co-authored-by: NianJiuZst <180004567+NianJiuZst@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 11:41:12 -07:00
Peter Steinberger
4432016f7f refactor: prune redundant OpenClaw env controls (#109211)
* refactor: prune redundant OpenClaw env controls

* docs: refresh environment reference map
2026-07-16 10:06:39 -07:00
Peter Steinberger
46c3dba537 chore: gate releases on Codex progress follow-through (#108828)
* test(release): gate Codex progress follow-through

* test(release): register Codex follow-through entry

* test(release): harden Codex follow-through proof

* test(release): preserve legacy Codex follow-through proof
2026-07-16 09:01:00 -07:00
Peter Steinberger
a7d5386896 improve: speed up ring-zero QA smoke (#108694)
* ci: speed up ring-zero QA smoke

* ci: scope QA sticky cache to Docker lane

* ci: keep QA dependency setup on actions cache

* test: restore modern Docker QA proof
2026-07-16 01:12:40 -07:00
Dallin Romney
77d07dc3e9 refactor(qa): migrate Telegram scenarios into QA Lab (#108430)
* refactor(qa): migrate Telegram scenarios into QA Lab

* refactor(qa): remove retired Telegram runner exports
2026-07-15 12:55:00 -07:00
marchpure
69ef3ca980 fix(codex): make loop relay optional (#97224)
Move the Codex-specific PreToolUse loop relay switch into the Codex
plugin, preserve policy relays, and cover both normal and side turns.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: marchpure <marchpure@users.noreply.github.com>
2026-07-15 05:29:20 -07:00
Dallin Romney
6c4e76ea8b ci(qa): reuse Matrix live workflow for releases (#103604)
* ci(qa): reuse Matrix live workflow for releases

* docs(testing): restore Tailscale isolation flag

* fix(ci): make Matrix artifact names ref-safe

* test(ci): type Matrix workflow profiles

* style(testing): format Tailscale isolation guidance
2026-07-15 01:48:59 -07:00
Dallin Romney
ad34552473 refactor(qa): migrate Matrix scenarios into QA Lab (#103589)
* refactor(qa): migrate Matrix scenarios into QA Lab

* fix(qa): build Matrix boundary declarations

* fix(qa): preserve Matrix preview boundaries

* fix(qa): preserve Matrix hot reload semantics

* fix(qa): harden Matrix destructive scenario failures

* fix(qa): harden Matrix scenario isolation

* fix(qa): close Matrix negative scenario blind spots

* fix(qa): isolate Matrix substrate state

* fix(qa): harden Matrix transport substrate

* fix(qa): preserve Matrix profile and event parity

* fix(qa): preserve explicit scenario models

* fix(qa): align Matrix scenario coverage taxonomy

* fix(qa): format Matrix allowlist cleanup

* fix(qa): satisfy migrated Matrix CI contracts

* fix(qa): reconcile Matrix migration with current main

* fix(qa): break scenario flow import cycle

* fix(qa): reconcile Matrix max-lines ownership

* fix(qa): address Matrix review boundaries

* fix(qa): remove stale Matrix lint suppression

* fix(qa): adopt split Matrix E2EE flows

* fix(qa): export Matrix scenario record guard

* fix(qa): align Matrix migration with privatized helpers

* refactor(qa): finish Matrix QA Lab ownership

* fix(qa): preserve Matrix suite defaults

* fix(qa): reconcile Matrix cleanup with current main

* test(qa): follow canonical Matrix profile size

* fix(qa): guard stale Matrix QA package output

* docs(qa): redirect retired Matrix QA pages

* refactor(qa): finish Matrix runner rename

* test(qa): assert Matrix defaults through profile resolver

* docs: refresh QA cleanup map

* fix(qa): privatize Matrix storage discovery
2026-07-15 01:22:20 -07:00
Peter Steinberger
a6a0716486 feat(setup): rename Crestodian to OpenClaw system agent
User-facing name is now OpenClaw (the system speaks); internal code name is
system-agent. Gateway methods crestodian.* -> openclaw.chat/openclaw.setup.*,
agent tool -> openclaw, reserved agent ids openclaw + retired crestodian.
openclaw setup routes: onboarding flags -> onboard, -m/--yes -> system agent,
bare configured interactive -> OpenClaw chat, unconfigured -> onboarding.
Hidden crestodian CLI and /crestodian TUI aliases kept; docs moved to
docs/cli/openclaw.md with redirect stub. macOS/Android strings in lockstep.

Refs #107237
2026-07-14 11:03:02 -07:00
Michael Appel
18ec9ce8f7 fix: block workspace dotenv endpoint overrides [AI] (#103914)
* fix: block workspace dotenv endpoint overrides

* docs: clarify workspace endpoint env sources

* style: format dotenv suffix blocklist

---------

Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com>
2026-07-14 12:51:15 +05:30
Vincent Koc
f33ab243cf fix(sqlite): reject runtimes vulnerable to WAL corruption (#106065)
* fix(sqlite): require WAL-reset-safe Node runtime

* docs(sqlite): document safe Node runtime floor

* fix(sqlite): defer runtime library validation until use

* fix(ci): align startup memory with Node 24.15
2026-07-13 13:59:00 +08:00
Peter Steinberger
38e636542d fix(gateway): keep watch logs visible in tmux 2026-07-13 03:14:49 +01:00
Josh Lehman
0a8e3604ba refactor: flip sessions and transcripts to sqlite storage (#98236)
* refactor(sessions): migrate runtime storage to sqlite

* test(sessions): fix sqlite CI regressions

* test(sessions): align remaining sqlite fixtures

* fix(codex): require sqlite trajectory recorder

* test(sessions): align orphan recovery sqlite fixture

* test(sessions): align sqlite rebase fixtures

* fix(sessions): finish current-main integration of the sqlite flip

Resolve the whole-store SDK removal across its owner boundary: drop the
loadSessionStore re-export and the registry whole-store wrappers, wire
hasTrackedActiveSessionRun into gateway chat, complete the
preserveLockedHarnessIds cleanup contract, flip the codex thread-history
import to storePath targets, and port remaining main-side tests from
file-store helpers to session accessor reads.

* chore: drop committed pebbles log, revert plugin-inspector bump, refresh generated docs

Remove the 1.8k-line .pebbles/events.jsonl work log from the branch, restore
the plugin-inspector advisory lane to main's pinned 0.3.10 so the supply-chain
bump gets its own review, and regenerate docs_map, the plugin SDK API baseline,
and the export-surface ratchet for the merged tree.

* feat(sessions): keep archived transcripts by default with zstd cold storage

Codex-style retention: deleting or resetting a session archives its
transcript as a zstd-compressed JSONL artifact (plain when the runtime
lacks node:zlib zstd) and keeps it until the disk budget evicts oldest
first. resetArchiveRetention now governs both deleted and reset archives
and defaults to keep; maxDiskBytes defaults to 2gb so retention stays
bounded, with archives evicted before live sessions. The cron reaper
follows the same knob instead of deleting archives on its own timer.

* fix(state): converge agent DB migration lineages and bound database growth

Merge coherence: run both structure-gated legacy memory-schema repairs
(flip-lineage drop, main-lineage identity rebuild) before the flip
migration so pre-flip v1/v2 and pre-merge flip v1/v4 databases all
converge, and hoist foreign_keys=OFF outside the schema transaction
where the pragma was silently ignored and the v1 sessions rebuild
cascade-deleted session_entries.

Growth guards: fresh agent DBs enable auto_vacuum=INCREMENTAL, WAL
maintenance releases freed pages in bounded passes (never a blocking
full VACUUM), and doctor reports state/agent DB bloat from freelist
stats.

* fix(codex): resolve the store path for thread-history import via the SDK

The supervision catalog passed the legacy sessionFile locator to the
storePath-targeted transcript mirror; resolve the agent store path with
the session-store SDK helper instead of a runtime-object seam so test
fakes and headless callers need no extra surface. Drop the obsolete
missing-session-id preprocessing case: sessions rows are NOT NULL on
session_id and upsert repairs id-less patches at write time.

* fix(sessions): fail safe on malformed disk-budget config and doctor stat errors

A malformed explicit maxDiskBytes disables the budget instead of
falling back to the destructive 2gb default the user never chose, and
the doctor bloat check skips databases whose paths stat-fail instead of
aborting doctor.

* fix(sessions): complete sqlite conflict translations

* test(sqlite): align hardening checks with maintenance

* test(sessions): inspect compressed transcript archives

* fix(tests): await session seeds and drop unused helpers flagged by CI lint

The five unawaited writeSessionStoreSeed calls raced their SQLite seeds
against the assertions, failing compact shards; the bloat probe drops a
useless initializer and the merged tests drop now-unused helpers.

* test(sessions): type legacy proof events directly

* test(sessions): align hardening contracts

* perf(sessions): read usage transcript sizes from SQL aggregates

Usage/cost scans walked every session and materialized every transcript
event just to re-stringify it for a byte estimate — the #86718 stall
class reborn on the DB. readTranscriptStatsSync sums stored JSON bytes
in SQLite without loading a single row.

* fix(sessions): re-root foreign-root transcript paths onto the current sessions dir

Restored backups, moved OPENCLAW_STATE_DIR, and rehearsal copies carry
absolute sessionFile paths from the old root; the containment fallback
kept those foreign paths, so migration read (and would archive) files in
the original root and reported local copies missing. Re-root the
canonical agents/<id>/sessions suffix onto the current dir when the file
exists there; genuine cross-root layouts still fall through unchanged.

* test(agents): seed harness admission through sqlite

* fix(sqlite): close agent db on pragma setup failure

* fix(doctor): compact and retrofit incremental auto-vacuum after session import

The migration is the sanctioned offline window: post-import compact
reclaims import churn and applies auto_vacuum=INCREMENTAL to databases
created before the fresh-DB pragma existed, so runtime maintenance can
release pages in bounded passes on every install.

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-11 14:50:37 -07:00
Peter Steinberger
96f0983a85 fix(onboarding): skip setup for configured gateways and require inference first (#102883)
* fix(crestodian): keep onboarding RPCs restart-safe

* fix(profiles): isolate approval state migrations

* fix(crestodian): bypass configured gateway setup

* test(crestodian): type onboarding mocks

* fix(onboarding): require inference before Crestodian

* fix(onboarding): enforce verified inference handoff

* fix(macos): reset setup on gateway endpoint edits

* chore(i18n): refresh native source inventory

* fix(gateway): keep socket on request cancellation

* test(packaging): require workspace templates

* fix(onboarding): bind setup to verified inference

* fix(onboarding): align inference gate contracts

* fix(crestodian): classify concurrent policy rejection

* test(crestodian): expect registry restoration

* fix(onboarding): bind setup to configured gateways

* fix(codex): preserve startup phase deadlines

* test(crestodian): match fail-closed policy ordering

* test(onboarding): assert bound gateway handoff

* fix(codex): bind runtime resolution to spawn cwd

* test(crestodian): assert policy rejection order

* fix(cli): preserve gateway routing across restarts

* fix(macos): fail closed during gateway edits

* test(macos): cover gateway route generation races

* chore: keep release notes out of onboarding PR

* fix(ci): refresh onboarding generated checks

* style(swift): align gateway channel formatting

* fix(ci): refresh plugin SDK surface budgets

* fix(ci): resync native string inventory

* refactor(swift): split gateway channel support

* test(doctor): isolate plugin compatibility registry

* test(macos): isolate gateway onboarding fixtures

* test(macos): assert gateway lease health ordering

* fix(codex): reconcile computer-use startup changes
2026-07-11 10:25:14 -07:00
Peter Steinberger
fa77fe10d5 chore: migrate active GPT-5.5 references to GPT-5.6 (#104452)
* chore(models): migrate active GPT-5.5 references

* test(workboard): expect GPT-5.6 Sol default

* chore: keep release notes in PR body

* test(models): align picker fixtures with Sol default

* test: update PDF default model expectation

* test(qa): migrate thinking smoke to Luna

* test(gateway): align mock catalog with Sol default

* ci: retrigger exact-head PR checks

* test(gateway): document default catalog invariant
2026-07-11 06:30:57 -07:00
Peter Steinberger
6268eeef15 test: wire Control UI suite into CI, fix its broken tests, drop dead harness surface (#104361)
* test: wire Control UI suite into CI, fix its broken tests, drop dead harness surface

- fix 7 Control UI tests broken on main: module-mock factories are unreliable
  under isolate:false shared workers; use RealtimeTalkSession prototype spies
  and real jsdom storage instead (chat-realtime, chat-pull-requests)
- add gated checks-ui CI job (runUiTests changed-scope output): chromium
  provisioning, lint:ui:no-raw-window-open, pnpm --dir ui test; ~30s on a
  4vcpu runner, runs only when ui-affecting paths change
- add weekly node22-compat workflow exercising the supported lower Node bound
  with the same command set as the dispatch-only ci.yml job
- delete the unreachable channels entry in EXTENSION_TEST_CONFIG_ROUTES and
  the never-populated extensionRoutedChannelTestFiles override machinery
  (born empty in 2ccb5cff22); resolved globs are provably identical
- guard run-vitest.mjs hardcoded path maps with existence tests so renames
  cannot silently drop extended stall watchdogs
- remove unenforced coverage thresholds; test:coverage is informational, docs
  updated (reference/test, help/testing, plugins/sdk-testing)

Closes #104321

* test: pin OPENCLAW_CI_RUN_UI_TESTS in the manifest env expectation

* test(ui): capture the realtime start spy instead of referencing the unbound prototype method

* test(ui): raise ui vitest timeouts for real-browser layout tests on small CI runners
2026-07-11 03:04:11 -07:00
Peter Steinberger
b8502e1c0a test(gateway): prove suspension lifecycle in Docker (#104203) 2026-07-10 22:53:35 -07:00