Skip to content

refactor(runtime): deslop remaining private knobs - #165330

Merged
steipete merged 2 commits into
mainfrom
deslop/l379-env-knobs2-20261004
Oct 5, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/l379-env-knobs2-20261004

Conversation

@steipete

@steipete steipete commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Private runtime helpers still carry switches, option forwarding, and alternate branches that their production callers never select.

User Impact

Normal user behavior, documented environment/configuration/CLI settings, public SDK APIs, protocol shapes, and lifecycle authority remain unchanged. Unsupported pre-Node-22 Telegram branches are removed within the current Node support floor.

Why This Change Was Made

  • Remove unused account/QA debug switches and Slack cache-TTL parsing; retain the existing default cache and verbose logging owners.
  • Collapse Telegram network choices to concrete supported-runtime values and remove duplicate fallback policy. Use the canonical Feishu numeric validator while preserving precedence and accepted values.
  • Remove unused Nextcloud send fields, Copilot auth workspace forwarding, and Matrix zero-grace plumbing.
  • Make the private tool installer always silent, matching every production caller; retain offline, extraction, locking, and cleanup behavior.
  • Put fixed ACP output/status/chunk limits directly in the projector and delete its unused adapter. Test actual delivery bounds instead of settings-object shape.
  • Remove unused bootstrap/history/media options, model CLI fallback arguments, restart/diagnostic test switches, hook-import forwarding, and the unused probe-auth wrapper.
  • Specialize web-provider activation/cache and plugin payload selection to their actual callers. Keep the shared loader/kernel capabilities and all admission policies.
  • Specialize Doctor's private catalog migration helper to its two singleton-map callers without changing transactions, claims, retention, or the runtime deletion kernel.
  • Fix internal board/tooltip capabilities to the existing values and forward usage request options directly.

BELOW-1000: 354 net production lines removed. The full defined environment-owner coverage log is attached in numbered comments: 1,211 modules over 200 lines, 626,062 inventory lines, every entry marked READ with a disposition and reason. This is one final batch; no intermediate pushes. Named SDK compatibility, July-and-later migration writers, and other active lanes remain untouched. Overlaps with #165198, #165225, and #165236 were excluded before publication.

Evidence

  • Final independent Codex autoreview: scoped clean through P2, no actionable findings. A fresh focused review of the two lint corrections is also scoped clean through P2.
  • Linux AWS proof verified the base and exact changed-file hashes before execution: 213 files / 4,374 tests passed, including core, plugin contracts, bundled plugin suites, and UI tests.
  • Both import-cycle checks report 0. pnpm tsgo:prod passed for core, UI, and extensions.
  • The remote validation command completed successfully in 21m14s; source synchronization took 18m17s. The broker timed out while persisting its terminal receipt after the successful command; the raw result and receipt reconciliation are retained locally.
  • An added ACP output-cap test initially reused identical chunks and triggered the existing content deduplicator. Its corrected numbered fixture preserves the full-output, chunk-limit, and single-notice assertions; the final suite passes.
  • The landing fixup renames the shadowed ACP test fixture and removes the now-unused Telegram max-lines suppression. On Blacksmith Testbox tbx_01m456avxd5zsa23sj2cef1vjc, both touched-file lint commands passed with zero warnings/errors, and both import-cycle checks reported zero. The wrapper verified the exact source tree and both correction hashes; the remote command exited 0 in 3m33s. The lease was stopped after proof.
  • Hosted CI on the corrected published head remains the merge gate. No release or deployment is included.

Fixes Found Along the Way

A system.which defect was reproduced and fixed in a separate retained patch: directories/non-executable Unix files were reported as commands, and explicitly suffixed Windows executables were missed. The regression failed on the original implementation and passed through the canonical executable resolver. That change is excluded here and remains with the type-mirror lane owner; the self-contained repair and regression test are preserved for that owner.

Specialize private runtime helpers to their actual callers and remove unused
debug branches, timing options, and forwarding fields. Preserve documented
configuration, public SDK contracts, migration writers, and lifecycle guards.

The batch removes 352 net production lines after excluding other active lanes.
Full environment-owner coverage and focused Linux/core/plugin/UI proof recorded
for the below-threshold campaign closeout.
@clawsweeper

clawsweeper Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: e7ab6e08ba9b19200e995304d7bfc00a6b7cb468
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/probe-auth.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/secrets/channel-contract-api.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added channel: matrix Channel integration: matrix channel: nextcloud-talk Channel integration: nextcloud-talk channel: slack Channel integration: slack channel: telegram Channel integration: telegram app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes agents Agent runtime and tooling channel: feishu Channel integration: feishu extensions: qa-lab extensions: copilot size: XL labels Oct 5, 2026
@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

l379 environment-owner coverage

Fully READ 1,211 inventoried environment-reading modules over 200 lines (626,062 inventory lines), including root launchers and native Rust/Python/JavaScript owners. This is the cross-cutting environment-owner inventory, not a claim that every unrelated monorepo module was read. Named test/generated/script paths and reserved audit/cron trees were excluded from discovery; remaining test-infrastructure false positives are identified in row reasons. Counts refer to the read snapshot; changed owners/callers were subsequently reviewed and tested. Documented contracts and active-owner candidates were retained.

Part 1/8, descending original size.

READ coverage 1/8
Lines File Read/disposition Finding
5246 apps/linux/src-tauri/src/gateway_windows.rs READ; retained Fully read all 5246 lines including the embedded cfg(test) module. The only std::env access is temp_dir() in private_browser_directories_are_unique_and_retire_only_after_the_document_lease; there is no production environment/feature/debug knob. refresh_main, remember/reuse/force/explicit, and platform cfg branches have real callers distinguishing native credential rotation, user selection, reconnect, Linux presentation and Windows private browser storage. Their generation, nonce, source-route and profile-revision guards retain live authorization and stale-navigation recovery. Fixed browser cleanup deadlines are native resource-settlement policy, not unused operator controls. No safe missed knob identified.
4864 apps/ios/Sources/Voice/TalkModeManager.swift READ; retained DEBUG ELEVENLABS_API_KEY fallback supplies the local ElevenLabs path; runtime controls bind microphone, speech and route generations. Simulator capture, synthesizer and deactivation injection have meaningful cancellation/audio-ownership callers in iOS tests; chatThinkingOverride is a nil default contract, not a tunable worth removing.
4542 apps/linux/src-tauri/src/gateway_ws.rs READ; retained Fully read all 4,542 lines, including the embedded cfg(test) module beginning at line 2289. Production has no runtime environment-reading knob: env!(CARGO_PKG_VERSION) at line 1773 supplies build-version handshake identity. OPENCLAW_DESKTOP_CLI reads/writes at lines 3199-3220 are isolated dashboard-handoff fixture setup/restore and exercise the real CLI discovery override owned by cli.rs. Remaining controls have active purposes: local/remote ownership fences sleep RPCs; window/desktop/remote-dashboard/sleep demand keeps one connection owner; generation and deadline checks reject stale queued writes; TLS pinning withdraws unsupported inline-widget capability; reconnect pause follows server policy; request/connect/frame limits bound transport work. Preserve these contracts and embedded route-replacement, auth, dispatch, sleep, reconnect, and protocol proofs. No genuinely safe missed knob identified; no source changes or tests run.
3641 apps/linux/src-tauri/src/main.rs READ; retained Fully read all 3,641 lines, including inline native tests. The sole runtime environment lookup is OPENCLAW_DESKTOP_CLI at line 876; it prevents installer fallback from replacing an explicitly selected but unavailable launcher, and apps/linux/README.md:142 documents the override consumed by cli.rs:60. std::env::consts::OS is compile-time platform metadata. Reconnect/watch intervals are fixed constants; native_session, explicit_local, generation, target, force, dashboard, and presentation booleans select active authentication/navigation/lifecycle branches. Preserved onboarding links, TLS pin rejection, exact route authority, SSH recovery, and shutdown settlement are user/platform contracts. No safe unused env/internal-knob deletion proved; no active overlap match.
3307 src/infra/state-migrations.doctor.ts READ; retained Environment and mode inputs bind canonical state/config/OAuth/agent roots, automatic startup versus explicit Doctor repair, copied-snapshot read-only planning, and plugin preparation. Retain migration receipts, fencing, deferred work, and startup once-cache.
2230 src/infra/update-managed-service-handoff.ts READ; retained Environment is captured and propagated across managed update, rollback, and foreground handoff processes. Timeout and authority options preserve exact process/lease identity, requester revocation, parked-service recovery, and published updater contracts; no unused default-only control proved.
2192 apps/linux/src-tauri/src/remote_gateway.rs READ; retained Fully read all 2192 lines, including inline cfg(test) module. Production env reads are documented OPENCLAW_CONFIG_PATH/OPENCLAW_STATE_DIR selectors, HOME expansion for private file SecretRefs, configured allowlisted env SecretRefs, and Windows SystemRoot SSH discovery. OPENCLAW_TEST_REMOTE_* controls exist only inside cfg(test) and isolate child-process credential rotation tests. Tunnel recover/selection/replacing and Saved/Submitted branches preserve live lifecycle and raw-credential-reference ownership; no removable knob proven.
2078 src/commands/doctor-auth-flat-profiles.ts READ; retained Environment selects shared and per-agent credential owners. renameProfileIds=false is used during JSON import before coordinated alias renames; injected loader and clock support migration verification. Preserve current SQLite ownership, verified archives, receipts, and rollback coverage.
1988 src/agents/cli-runner/prepare.ts READ; active-owner CLI preparation env transport serves MCP credentials and backend auth/tool/session contracts; heartbeat context and lifecycle closure overlap the active heartbeat owner.
1836 src/tui/tui.ts READ; retained PATH/Path and inherited auth-child environment support executable selection and local authentication. Local/backend/config and timing seams drive real TUI lifecycle and deterministic behavioral harnesses; connection/session generations and shutdown ownership are live.
1648 src/agents/auth-profiles/store.ts READ; retained OPENCLAW_STATE_DIR binds scoped credential ownership; OPENCLAW_AUTH_STORE_READONLY has a real producer in src/entry.ts for read-only CLI routes. VITEST/NODE_ENV gates failure-injection publication hooks used by credential/secret rollback regressions; persistence CAS and migration refusals are live contracts.
1621 src/commands/models/list.status-command.ts READ; active-owner Full current file read. Current batch already owns edits here. Agent-dir env overrides select the auth-store target; provider env maps and shell-env settings report actual credentials; probe CLI controls are user-facing. No additional deletion proven.
1620 extensions/qa-lab/src/cli.runtime.ts READ; retained QA CLI options feed registered suite/profile/credential/UI commands. OPENCLAW_QA_PROFILE is scoped and restored; credential payload size bounds and UI proxy token are functional controls, not default-only branches.
1619 src/gateway/managed-image-attachments.ts READ; retained OPENCLAW_STATE_DIR binds explicit media/session/delivery stores; size limits, transient TTL, active-run checks and authority callbacks protect media ownership. Incognito read adapter is retained for the active cutover.
1596 packages/ai/src/providers/openai-chatgpt-responses.ts READ; retained HTTP(S)_PROXY handling compensates for Bun WebSocket proxy behavior; transport/cache options preserve public provider behavior, first-event deadlines and request lifecycle. No Codex change proposed.
1578 extensions/browser/src/browser/chrome.ts READ; retained Managed-browser lifecycle consumes headless/env/platform launch options, strips proxy environment, and sets HOME/XDG paths; child/PID ownership, singleton recovery, abort and graceful close controls are live safety boundaries.
1565 extensions/qa-lab/src/suite-launch.runtime.ts READ; retained Suite owner uses process env for evidence identity, worker staggering, and prepared Docker/native execution; fail-fast, runtime routing, adapter isolation, retry custody, and weighted concurrency each have active branches. Retain lifecycle/evidence controls.
1514 src/cli/run-main.ts READ; retained Startup owner uses OPENCLAW_CONTAINER, OPENCLAW_GATEWAY_PORT, OPENCLAW_ALLOW_INSECURE_PRIVATE_WS and scoped env snapshots for public routing, secure probes, dotenv, recovery and proxy boot. Lazy branches preserve help and Gateway startup boundaries; no unused knob proven.
1513 src/agents/worktrees/service.ts READ; retained Environment and injected clock/config select the worktree state/capacity owner. Creation, rollback, snapshots, GC, and run leases retain live authority. Config acceleration and setup/provisioning controls select real paths; no proven unused knob.
1510 src/agents/model-selection-shared.ts READ; retained Environment is forwarded to current plugin metadata and manifest discovery. allowManifestNormalization/allowPluginNormalization preserve static versus plugin normalization and lazy alias scope; configured model policy and migration handling are live owners.
1499 src/agents/model-auth-availability.ts READ; retained Env participates in provider credential evidence and route selection. Prepared-runtime controls preserve profile pins, cooldowns, explicit credential ownership and unknown-vs-unavailable semantics; resolver injection supports route-boundary tests. No proven default-only removal.
1467 src/commands/doctor-state-integrity.ts READ; retained Doctor owns state/OAuth directory inspection and repair; OPENCLAW_STATE_DIR, OPENCLAW_HOME, OPENCLAW_OAUTH_DIR and OneDrive roots select real storage/platform contracts. Legacy and SQLite repairs retain recovery and deferred-migration state.
1463 extensions/imessage/src/monitor/monitor-provider.ts READ; retained Only direct environment use passes process.env to the pairing allowlist owner. Configured catchup, attachment roots, history, typing, read receipts, and startup cursor guards serve live channel contracts; no unused knob established.
1450 src/commands/doctor-session-sqlite.ts READ; retained Injected env selects migration state, target databases, deferred-plugin receipts and recovery manifests. Mode and archival guards enforce real import/recover/restore contracts; no default-only branch proved.
1442 src/auto-reply/reply/agent-runner-memory.ts READ; active-owner Active heartbeat overlap. process.env is passed to sandbox write admission; token/byte thresholds, native compaction ownership, lifecycle and memory-flush failure accounting are active behavior, not default-only knobs.
1430 src/gateway/config-reload.ts READ; retained Environment is consumed by authored-config fingerprinting and audit publication; reload modes, debounce, transaction ownership, restart intent and plugin drain controls implement current config publication and fencing. No unused knob proven.
1415 src/tui/embedded-backend.ts READ; retained Environment is forwarded to canonical session startup migration; queue, approval, lifecycle and prepared-model choices serve active local TUI behavior. No removable ambient flag found.
1394 src/agents/agent-hooks/compaction-safeguard.ts READ; retained VITEST/NODE_ENV only publish the private test API. Compaction quality retries, recent-turn preservation, provider selection, history share, and workspace sections are runtime-configured behavior with bounded summary and cancellation ownership.
1383 src/agents/btw.ts READ; retained Environment is forwarded to canonical provider auth preparation and streaming; harness selection, gateway binding, sandbox policy, tool-less side-question behavior, and run admission remain real lifecycle/security contracts. No private env toggle found.
1381 extensions/qa-lab/src/runtime-parity.ts READ; retained OPENCLAW_STATE_DIR pins capture to the isolated QA Gateway; runtime-pair, usage, missing-result and sentinel handling protect release evidence, with no unused environment toggle found.
1371 src/gateway/server-cron.ts READ; active-owner OPENCLAW_SKIP_CRON controls real scheduler admission; env binds the cron store and agent database ownership. Cron/heartbeat lifecycle is explicitly excluded and this exact file is in heartbeat-files.txt.
1366 src/cli/mcp-cli.ts READ; retained PATH/PATHEXT drive executable discovery; the timeout, parallel, probe, auth and TLS controls are actual registered MCP CLI/config surfaces, including documented status JSON compatibility.
1356 src/cli/gateway-cli/run-loop.ts READ; retained Environment identifies the real restart supervisor and transports restart tracing; owns process signals, drain deadlines, exact managed-update handoff and successor lifecycle. No default-only flag removal proven.
1356 src/infra/update-global.ts READ; active-owner Full file read. OPENCLAW_UPDATE_PACKAGE_SPEC is consumed by cross-OS release drivers; Corepack/npm defaults prevent unattended prompts and platform env preserves package-owner selection. Exact path overlaps PR 165124.
1336 apps/macos/Sources/OpenClaw/ApplicationRelocator.swift READ; retained OPENCLAW_REPLACEMENT_* values form a parent/child signed-bundle handoff with matching PID, kernel code hash, pipe readiness and verified launchd restoration; DEBUG-only monitoring opt-in avoids ordinary development relaunches. No removable default-only control proven.
1322 extensions/acpx/src/runtime.ts READ; retained Managed-tools MCP environment is session-owner propagation; bridge toggles select real tool surfaces. Lease IDs, legacy bare-key admission, generation fences and cleanup remain lifecycle contracts; no unused knob proved.
1308 src/wizard/i18n/locales/en.ts READ; retained Translation data only: environment names appear in onboarding and recovery instructions, not ambient reads or duplicate runtime knobs.
1298 extensions/openshell/src/backend.ts READ; retained OPENSHELL_WORKSPACE contributes to runtime lease and CLI capability-cache identity. Mirror/remote mode, provider creation options and legacy registered runtime adoption have distinct data-preservation and dependency contracts; all local owner branches are live.
1293 extensions/amazon-bedrock/stream.runtime.ts READ; retained AWS region/profile/HTTP1/proxy controls select real SDK transport behavior; OPENCLAW_CACHE_RETENTION and cache/thinking options retain provider contracts. Full stream assembly, event handling, transcript conversion, and terminal cleanup read.
1284 extensions/codex/src/app-server/auth-bridge.ts READ; retained CODEX_HOME/HOME and API-key/access-token handling isolate managed auth from native homes and subscription/platform billing. Prepared credentials, refresh serialization and Computer Use generation fencing are live contracts; no Codex change proposed.
1278 src/secrets/runtime-state.ts READ; retained Env snapshots pin the secrets refresh owner; includeConfigRefs/includeAuthStoreRefs and activation-lineage flags distinguish auth-only preparation, refresh, and rollback. No unused switch identified.
1261 src/plugins/discovery.ts READ; retained Environment contributes home/Nix/host-version/bundled-overlay provenance and discovery cache keys. OPENCLAW_DISABLE_BUNDLED_SOURCE_OVERLAYS is documented; root scopes, deduplication and ownership UID preserve distinct acquisition and safety policies.
1257 src/security/audit.ts READ; retained env/platform, filesystem/channel/deep switches select actual audit collectors and credential probes; Gateway token/password fallbacks preserve secret-ref precedence. Audit behavior is excluded from mutation scope.
1257 src/wizard/i18n/locales/zh-TW.ts READ; retained Translation data only; environment names describe supported onboarding credential, path, and insecure-private-WebSocket options. No environment reads or knob machinery to remove.
1255 src/wizard/i18n/locales/zh-CN.ts READ; retained Static WizardTranslationMap data, not an environment reader. Environment names appear in localized setup, credential, proxy, and Gateway guidance; no runtime knob machinery to remove.
1249 src/flows/model-picker.ts READ; retained Environment selects agent paths, provider auth and plugin metadata. Model-picker controls are consumed by setup/configure callers; includeProviderPluginSetups has a true production caller in src/wizard/setup.model-auth.ts:321.
1235 src/plugins/sdk-alias.ts READ; retained Reads standard platform cache roots, JITI dependency settings, NODE_ENV, dev-source-root and private-QA authority. Alias preference and cache options flow to live plugin loaders; private subpath grants and lazy artifact resolution are contracts.
1229 src/commands/agent-via-gateway.ts READ; retained OPENCLAW_GATEWAY_URL selects remote ownership; local/remote targeting, shell-env auth fallback, idempotent transport retries and signal aborts have distinct flows. Retry-delay injection is used by agent-via-gateway.test.ts.
1226 src/plugins/clawhub.ts READ; retained RuntimeVersionEnv feeds host-version compatibility admission. Base URL, tokens, integrity, trust and artifact fallbacks implement the external ClawHub install contract; no unused knob proved.
1204 src/cli/skills-cli.ts READ; retained process.env resolves the Gateway port for the exclusive offline maintenance lock. Public CLI options select real install, verification, workshop, and status behavior; retired curator commands deliberately preserve a Gateway/local error contract.
1195 apps/macos/Sources/OpenClaw/GatewayEndpointStore.swift READ; retained OPENCLAW_GATEWAY_TOKEN/PASSWORD, BIND and TLS select endpoint/auth facts; local SecretRef resolution also reads LaunchAgent env for Finder launches. Routing generation and tunnel identity are live authority, not optional knob scaffolding.
1195 apps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalog.swift READ; retained Native Codex catalog honors documented OPENCLAW_CODEX_APP_SERVER_BIN/ARGS and appServer configuration, with single-snapshot authorization, source-home identity and bounded catalog reads. No Codex behavior deletion proposed.
1195 src/commands/models/auth.ts READ; retained CLI and hosted Gateway auth share this owner. env selects credential persistence and OPENCLAW_STATE_DIR; credentialOnly, force, setDefault, remote OAuth and authority callbacks select distinct real flows.
1176 extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts READ; retained QA env selects credential leases, remote hydration/market, persistent browser profile, Slack destination, and bounded remote/approval timeouts. Options feed rendered subprocess workflows; browser profile is documented in docs/concepts/mantis.md. No safe default-only deletion proven.
1145 src/trajectory/export.ts READ; retained Environment supplies state/home redaction for portable exports. Event caps and target/legacy-marker validation protect bounded, correctly scoped export. systemPrompt/tools inputs are deliberately ignored by current behavior and explicitly exercised by export tests; no environment deletion or compatibility-safe public-parameter deletion established.
1136 src/config/mutate.ts READ; retained Config mutation owner binds environment generation and include provenance across preflight, commit, reread, rollback, and retries. Custom IO and write options preserve destination and authority contracts; no unused env knob proved.
1135 src/gateway/control-ui.ts READ; retained Environment is passed to runtime service version reporting. Terminal/CLI-agent/configured-root switches feed bootstrap and CSP/static serving; media tickets and authority rechecks are live access contracts.
1131 src/gateway/call.ts READ; retained Gateway URL/auth/port and handshake envs feed actual RPC bootstrap. OPENCLAW_HANDSHAKE_TIMEOUT_MS is documented and the test variant controls handshake behavior. Dispatch/current-owner callbacks fence RPC side effects.
1123 src/infra/npm-managed-root.ts READ; active-owner Active PR 165124 owns this exact file. Process env feeds safe npm installation; optional peer planning, override reconciliation and host-link preservation have distinct install contracts.
1108 extensions/codex/src/supervision-tools.ts READ; retained Shipped Supervisor compatibility tools retain explicit endpoint-env support and live owner/policy revalidation. Configured remote/native endpoints change connection identity; no Codex behavior deletion proposed.
1108 extensions/telegram/src/channel.ts READ; retained TELEGRAM_BOT_TOKEN is used to report whether logout leaves ambient credentials. Account routing, token-cache invalidation, status probing, and runtime injection retain live channel/public adapter contracts.
1095 src/plugins/install-security-scan.runtime.ts READ; retained OPENCLAW_INSTALL_SCAN_MAX_DEPTH and OPENCLAW_INSTALL_SCAN_MAX_DIRECTORIES bound package traversal. The existing scan entry-point tests prove accepted below-limit and rejected overflow inputs, plus in-tree links; trust/source flags and approval fingerprints protect install admission. No safe removal established.
1090 src/cli/gateway-cli/run.ts READ; retained Environment reads implement profile selection, documented startup/auth/logging options, shell-env precedence, managed-service identity and sidecar suppression. Supervised retry timing seams preserve bounded lifecycle recovery; test-only API gate is intentional.
1085 extensions/codex/src/app-server/side-question.ts READ; retained process.env is forwarded into Codex reviewer policy selection. Side-question controls enforce bound model/auth, sandbox, tool authority, fork identity, and cleanup; no Codex behavior change proposed.
1077 src/security/audit-extra.sync.ts READ; retained Environment feeds Gateway credential precedence and effective auth override auditing. Config switches describe actual exposure, sandbox, and channel policies. Audit mutation is excluded; no disposable feature toggle found.
1075 extensions/google/transport-stream.ts READ; retained GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT and GOOGLE_CLOUD_LOCATION select Vertex request routes. OPENCLAW_GOOGLE_GEMINI_FIRST_RESPONSE_RETRY_MS controls meaningful first-response recovery; transport tests cover stalled headers/body, preserved tools, thinking fallback, and acceptance-observer failures. Retain.
1074 src/gateway/server-startup-post-attach.ts READ; retained OPENCLAW_SKIP_CHANNELS/PROVIDERS control startup and have embedding/test callers; VITEST/NODE_ENV suppress sentinel wake. updateCanary and deferred startup preserve rehearsal and generation-owned sidecar behavior.
1058 src/node-host/invoke-system-run.ts READ; retained Environment overrides are validated and sanitized before execution, with inherited channel/subagent context omitted when explicit routing exists. Remaining options own approval snapshots, platform dispatch, cancellation and real dependency injection; no removable default-only policy proved.
1053 src/logging/diagnostic.ts READ; active-owner Gateway diagnostic heartbeat owns scheduling, liveness and stalled-session recovery. testTimings and injected samplers keep fake-clock proof cheap; VITEST/NODE_ENV only expose the test seam. Heartbeat closure is excluded from mutation proposals.
1050 src/commands/models/list.probe.ts READ; retained Environment credentials, SecretRefs, explicit profile/direct-key selection and concurrency/token limits drive real model probes; isolated state and admission cleanup prevent false successes and profile failover.
1042 extensions/qa-lab/src/live-transports/discord/discord-live.runtime.ts READ; retained QA credential and DISCORD_API_URL routing is exercised by live transport scenarios. CAPTURE_UI_METADATA and KEEP_THREADS flags are documented in docs/concepts/mantis.md and set by .github/workflows/mantis-discord-thread-attachment.yml; retain evidence and cleanup behavior.
1038 extensions/ollama/index.ts READ; retained OLLAMA_API_KEY and discovery settings drive distinct local/cloud auth and catalog routes. capContextTokens has both local=true and cloud=omitted callers; ambient fallback is constrained by endpoint and explicit credentials.
1025 src/agents/sessions/model-registry.ts READ; retained Dynamic env lookup identifies configured credential provenance. Catalog inclusion, captured catalogs, and source snapshots distinguish disk discovery from lifecycle-owned request forks; auth settings remain route-scoped.
1025 src/infra/state-migrations.session-store.ts READ; retained Explicit env pins migration paths; preservation flags distinguish shared-store provenance, foreign main aliases, and safe canonicalization. Retain migration compatibility and alias fencing.
1023 src/wizard/setup.finalize.ts READ; retained Environment is passed to installed-service, auth, and Control UI target owners. skipUi/skipHealth/installDaemon/loadedAction select actual setup, resume, health, and temporary Gateway cleanup paths; no dead default-only branch proven.
1020 extensions/lmstudio/src/setup.ts READ; retained OPENCLAW_DOCKER_SETUP is written by Docker setup and selects host endpoints. LMSTUDIO API-key environment input participates in interactive, noninteractive, guided, discovery and SecretRef flows. Preserve documented provider setup and callback-based public setup API.
1013 extensions/openai/openai-provider.ts READ; retained Provider resolves OPENAI_API_KEY, configured base URLs and account-scoped catalog/auth routes. Static fallbacks distinguish unavailable discovery from explicit auth rejection; no removable private env switch found.
1008 src/infra/restart.ts READ; retained VITEST/NODE_ENV gate prevents real supervisor restart under tests. Delay/deferral options preserve signal admission and lifecycle authority; preservePendingEmitHooksOnDeferralBypass has a production caller in restart-coordinator.ts.
1003 src/secrets/configure.ts READ; retained Environment is passed through secret provider discovery, credential resolution and apply preflight. CLI providers-only, skip-provider-setup and allow-exec controls distinguish real interactive setup and side-effect authorization.
993 src/plugins/contracts/tts-contract-suites.ts READ; retained This is reusable Vitest contract infrastructure despite its non-test filename. Provider credential env isolation and OPENCLAW_TTS_PREFS isolate meaningful selection, fallback, redaction, and auto-TTS behavior; not a production-knob deletion.
979 src/flows/doctor-core-checks.ts READ; retained Environment reaches state relocation, install identity and runtime diagnostics; defaultEnabled controls expensive opt-in Doctor inventories. Experimental Claws activation and repair/dry-run branches are substantive contracts; cron closures excluded.
973 src/agents/bash-tools.exec-runtime.ts READ; active-owner Active heartbeat closure. OPENCLAW_BASH_MAX_OUTPUT_CHARS and OPENCLAW_BASH_PENDING_MAX_OUTPUT_CHARS are documented in docs/gateway/background-process.md; execution authority and notification routing remain live.
972 src/media-understanding/runner.entries.ts READ; retained PARAKEET_OUTPUT_FORMAT and PARAKEET_OUTPUT_TEMPLATE mirror documented upstream output contracts (docs/nodes/audio.md and media-understanding.md); proxy env routes provider fetch. CLI/provider branches and limits preserve actual media contracts.
965 extensions/acpx/src/codex-auth-bridge.ts READ; retained CODEX_HOME/API_KEY/OPENAI_API_KEY/CODEX_CONFIG are adapter auth/config contracts. Generated wrappers strip internal lease flags, preserve custom commands and own process-tree cleanup; legacy CLI migration cannot be deleted solely by its name. No Codex behavior change proposed.
963 extensions/codex/src/app-server/client.ts READ; retained Process env is passed to the stdio transport; request options enforce deadlines, cancellation, catalog decoding, and native configuration fencing. Fixed retry constants and test transport constructor are meaningful controls; no Codex behavior deletion proposed.
957 apps/macos/Sources/OpenClaw/GatewayLaunchAgentManager.swift READ; retained Service environment preserves profile, state/config paths, SQLite library and installed PATH/runtime ownership. Attach-only marker, expected service custody and DEBUG interception prevent unintended service mutation; no unused knob proven.
949 src/plugins/provider-runtime.ts READ; active-owner Active PR 165124 owns this path. Environment routes plugin discovery/auth/catalog lookups; allowRuntimePluginLoad preserves metadata-only and prepared-handle paths, while legacy WebSocket hook is an SDK compatibility surface.
945 src/system-agent/verified-inference.ts READ; retained Environment is passed to workspace, plugin and credential owners; dependency seams support route-owner verification. Credential/runtime/artifact fingerprints and revalidation prevent stale inference proofs from granting writes.
931 extensions/openai/image-generation-provider.ts READ; retained AZURE_OPENAI_API_VERSION selects the Azure API contract; OPENAI_API_KEY participates in auth routing. OPENCLAW_QA_ALLOW_LOCAL_IMAGE_PROVIDER is used by Docker/release proofs and gated to loopback. Native/Codex/Azure routing controls remain active.
911 src/logging/diagnostic-stability-bundle.ts READ; retained Environment is passed only to the canonical state-directory resolver. Options select bundle location, timestamp, and shutdown evidence; parsers preserve saved bundle compatibility and redaction. No private environment tuning branch.
910 apps/macos/Sources/OpenClaw/NodeMode/MacNodeHostWorker.swift READ; retained OPENCLAW_NODE_EXEC_HOST=app and OPENCLAW_NO_RESPAWN=1 enforce execution/process ownership. OPENCLAW_NODE_EXEC_FALLBACK=0 is a stale no-op assignment with no production reader; docs explicitly state it has no routing effect. Retained: documented no-op environment contract; recorded for maintainer decision.
871 src/channels/plugins/setup-wizard-helpers.ts READ; retained Secret input mode, allowEnv/envValue, account selection and enablement options serve exported setup helpers; the assigned module does not read ambient process.env directly. Account-scoped promotion, wildcard allowlists and missing-token behavior are public channel setup contracts.
866 extensions/feishu/src/doctor.ts READ; retained env selects state/session stores for the channel Doctor. Canonical transcript inspection plus bounded legacy artifacts and source backups serve repair contracts; no removable env toggle found.
863 src/cli/plugins-cli.runtime.ts READ; retained Environment is passed to stale-plugin configuration diagnosis. Marketplace feed options and CLI policy/install controls are user-facing behavior; heavy plugin imports remain lazy.
851 src/secrets/apply.ts READ; retained Environment binds the target state/config and secret resolution. write, allowExec, scrubEnv, and scrubAuthProfilesForProviderTargets implement public secrets-plan/dry-run contracts; snapshot ownership and rollback are meaningful.
842 src/cli/command-secret-gateway.ts READ; retained Environment supplies SecretRef and Gateway credential resolution. Modes and exec/scrubbing policies have active command callers; legacy mode spellings reach the exported plugin-sdk/runtime and memory-core-host-runtime-cli API, so absence of internal legacy callers is not proof of removability.
813 extensions/comfy/workflow-runtime.ts READ; retained Environment reads resolve configured SecretRefs and provider headers. Mode, workflow node mappings, polling, timeout, and private-network policy are public Comfy config documented in docs/providers/comfy.md and plugin manifest.
812 extensions/voice-call/src/config.ts READ; retained Voice-call schema owns public provider, streaming, realtime, tunnel, session and security configuration. TELNYX_, TWILIO_, PLIVO_* and NGROK_* provide actual credential/endpoint fallbacks; deprecated tailscale remains configuration compatibility. No default-only internal knob proven.
804 src/secrets/runtime-web-tools.ts READ; retained Environment supplies provider credentials and scoped discovery. Explicit credential inputs, SecretRef failures, last-known-good state, and bundled/custom plugin discovery remain distinct contract cases; no default-only branch proven.
796 src/plugins/setup-registry.ts READ; retained Env identifies plugin discovery and disables process cache reuse for injected environments. Source fallback has a real false caller for declared setup inspection, and runtime registration modes protect cold setup behavior.
792 src/agents/auth-profiles/usage.ts READ; retained VITEST/NODE_ENV only expose cleanup of shared WHAM in-flight state; OPENCLAW_VERSION supplies request identification. Cooldown/probe constants and credential-generation checks protect live auth selection.
792 ui/vite.config.ts READ; retained Build SHA, timestamp, release/build identity, base path and dev Gateway environment settings drive distinct output/serve behavior. CI writes release flag; development docs document base path and dev URL. Source-reader injection separates synthetic build identity from checkout metadata.
785 extensions/qa-lab/src/gateway-process-boundary.ts READ; retained Environment keys carry verified Linux launcher command identity and credential-quarantine ownership. UID/generation/digest checks and lease retention preserve the QA isolation boundary.
785 extensions/telegram/src/fetch.ts READ; retained OPENCLAW_PROXY_URL fallback, standard proxy env and configured DNS/family choices drive real transport selection. Per-attempt cooldown/fallback and fresh-send dispatcher choices protect retry safety; lifecycle owns dispatcher destruction.
785 src/logging/diagnostic-support-export.ts READ; retained OPENCLAW_DISABLE_BONJOUR is summarized, not reinterpreted as a new runtime switch. env/stateDir bind config, logs, output paths, and redaction; bounded log/config options and injected snapshot readers serve support-export behavior.
784 src/agents/provider-transport-fetch.ts READ; retained OPENCLAW_SDK_RETRY_MAX_WAIT_SECONDS is documented in retry/model-failover docs and intentionally supports disabling the cap. Proxy, private-network, SSE, local-service lease and timeout policy are active transport boundaries.
773 src/fleet/service.runtime.ts READ; retained Service env selects fleet state; runtime/fetch/clock/token/sleep adapters isolate meaningful provisioning, health, rollback and ownership behavior. Create/start/resource/network/env choices are CLI-facing contracts.
768 src/infra/net/fetch-guard.ts READ; retained OPENCLAW_PROXY_ACTIVE and OPENCLAW_DEBUG_PROXY_ENABLED select managed proxy and capture behavior. Strict/trusted modes, DNS/redirect options and request-authority checks remain transport/security contracts; useEnvProxyForEligibleUrls has an actual MCP HTTP fetch caller.
764 src/sessions/session-lifecycle-admission.ts READ; retained VITEST/NODE_ENV only exposes the test API. Admission phases, mutation kind, pending interruption, writer identities, and generation-bound handoffs implement live lifecycle authority and settlement.
763 src/infra/update-check.ts READ; retained GIT_DIR/GIT_WORK_TREE determine installation ownership; package-spec plus loopback-registry override is a bounded update integration-test seam. Fetch, channel and cancellation options are consumed by updater ownership checks.
757 src/state/openclaw-agent-db.ts READ; retained Captured OPENCLAW_STATE_DIR and supervision mode preserve lease release ownership after ambient changes; extension loading and incognito branches enforce runtime capability and storage contracts.
756 src/agents/bash-tools.exec-run.ts READ; retained OPENCLAW_BASH_YIELD_MS is documented; PI_BASH_YIELD_MS retains compatibility coverage. Defaults control approval, sandbox/node dispatch, background custody, notification, and secret-store injection; authority/lifecycle checks are meaningful.
756 src/config/sessions/combined-store-gateway.ts READ; retained Environment pins physical session stores and worker state; configured-only, incognito and sentinel ownership controls encode distinct federation/admission contracts.
756 src/tui/gateway-chat.ts READ; retained Environment selects the configured Gateway/auth/port; pre-probed bound handoff intentionally ignores global target overrides. Startup retry and older-protocol fallbacks serve explicit transport/version contracts.
755 node-runtime-recovery.mjs READ; retained Runtime recovery reads inherited HOME/USERPROFILE, OPENCLAW_HOME, PATH, version-manager roots and managed-service selectors to find and capability-probe a supported Node before dist/config loads. OPENCLAW_NODE_UPDATE_RESPAWNED has producers in this module and openclaw.mjs and a consumer in node-runtime-update.mjs to prevent recursive recovery. allowInstall/acceptVersion/nodeVersion/installCommand have live updater use; safe probe environments and cwd exclusion protect runtime selection. No unused knob proven.
755 src/agents/prepared-model-catalog-worker.ts READ; retained Worker captures exact environment, auth facts and plugin generation; built-artifact preference participates in fingerprints. Pool reuse, retirement and recovery enforce generation ownership, not unused feature toggles.
755 src/commands/configure.wizard.ts READ; retained Passes process.env to canonical local/remote probe-auth owners. Section choices and web-search settings are interactive configuration; persistence rereads authoritative config and preserves write-path ownership.
753 src/process/supervisor/adapters/child.ts READ; retained OPENCLAW_SERVICE_MARKER selects service-owned process-tree custody. ownProcessTree, ownedWorker, exactEnv and Windows shell controls preserve distinct spawn/IPC/secret-delivery and cleanup contracts.
752 extensions/codex/src/app-server/dynamic-tool-build.ts READ; active-owner Active heartbeat file and overlapping PR 164265. Environment passes to tool normalization; flags control native/dynamic tool policy, registration, memory flush, sandbox execution, and profiler thresholds. No Codex behavior change proposed.
752 openclaw.mjs READ; retained Full launcher read. Compile-cache respawn markers prevent recursive child launches and distinguish source versus packaged cache ownership; Node recovery and native-host paths preserve bootstrap/protocol behavior. Home/state/config/container/plugin/version envs carry existing launcher inputs. OPENCLAW_DISABLE_CLI_STARTUP_HELP_FAST_PATH has a real writer in scripts/write-cli-startup-metadata.ts:809 so generation bypasses stale cached help; no removable default-only knob proven.
752 src/secrets/resolve.ts READ; retained Env, passEnv, provider env overrides, timeout/output limits, allowlists, JSON mode and caches implement SecretRef provider contracts and isolated exec credentials. Both settled/stop modes have distinct error ownership; no unused flag proven.
750 src/agents/tools/gateway.ts READ; retained OPENCLAW_GATEWAY_URL selects an explicitly remote authority target; URL/token overrides, optional provenance and in-process dispatch preserve separate remote and hosted authorization contracts. No dead knob proven.
748 src/config/sessions/session-transcript-reconcile.ts READ; retained Copies env before deferred work to bind database/state ownership. Fixed polling/backoff bounds, incognito routing, generation fences and worker lease settlement are functional lifecycle controls.
746 src/agents/github-tool-identity.ts READ; retained Environment overlays enforce configured GitHub credential/author isolation and scrub preview credentials. Read/publication identities, current-authority callbacks and managed-profile staging have distinct live security responsibilities.
746 src/state/openclaw-agent-db-lease.ts READ; retained Env locates the captured shared state owner across lease claims, stale-owner cleanup, maintenance authority and clean-close receipts. Optional callbacks and schema policies carry lifecycle/integrity facts rather than feature flags.
746 src/state/openclaw-agent-db-lifecycle.ts READ; retained Environment snapshots select exact lease/state owners. Retained native closes, idle eviction, incognito generation and integrity receipts are active lifecycle ownership, not tunable discovery.
745 src/gateway/server-reload-hot.ts READ; active-owner Candidate environment snapshot controls channel/provider suppression and reload publication. Cron/heartbeat handoff, recovery debt, and current-generation checks overlap the active owner.
744 src/agents/prepared-model-runtime.ts READ; retained VITEST/NODE_ENV gates test-only timeout and reset controls for real lifecycle scenarios. Force/catalog/readOnly/replacement options select distinct publication and admission contracts, with retained-generation cleanup and revocation fences.
743 src/infra/update-candidate-state.ts READ; retained OPENCLAW_AGENT_DIR/PI_CODING_AGENT_DIR preserve selected stores in migration inventories. includeUnconfiguredAgents=false has a real fresh-Doctor caller. Legacy inspection workers, path aliases, and schema/content version fallback protect released updater and rollback contracts.
743 src/node-host/node-worker-launch-store.kernel.ts READ; retained Environment affects externally supervised cleanup binding. Capacity, receipt retention, process identity, schema admission, and transactional claim/finish parameters carry real launch-journal contracts.
742 src/commands/doctor-gateway-services.ts READ; retained Gateway env, runtime pins, wrapper selection, install identity, Nix and updater repair policy govern real service ownership and token persistence; no default-only toggle established.
742 src/sessions/user-turn-transcript.ts READ; retained Only ambient test flags expose persistUserTurnTranscript for test support. Recorder controls enforce approved-input custody, idempotency, lifecycle generation, late-media prefix preservation and blocked-turn outcomes; no dead recorder branch established.
740 src/agents/subagents/registry/subagent-registry.ts READ; retained VITEST/NODE_ENV expose lifecycle reset/control helpers; other tunables are fixed retry/announcement budgets. Resume source distinguishes startup orphan reconciliation from live delivery, with exact-run ownership and detached admission retained.
740 src/plugins/plugin-metadata-snapshot.ts READ; retained allowCurrent, preferPersisted, allowScopedSnapshot and workspace-scoped selection have production nondefault callers in management, install, config, setup and provider readers. Environment fingerprints and lifecycle-owned caches prevent cross-scope reuse.
739 src/agents/agent-create.ts READ; active-owner Environment resolves held database recovery paths. Bootstrap/staged-config controls protect first-agent creation and rollback authority; listed in active heartbeat ownership paths.
738 src/plugins/providers.ts READ; retained Full file read. Runtime owner activation declares includeUntrustedWorkspacePlugins but never reads it; setup discovery has its separate meaningful implementation. Only a one-line internal type cleanup is proven, with no runtime behavior reduction. Retained: now owned by open PR165198.
736 src/cli/update-cli/update-command-service-maintenance.ts READ; retained Update env markers identify service process/run handoff and preserve the admitted manager environment. Options control genuine inspect/refresh/stop, Windows recovery and Doctor restoration boundaries.
736 src/plugins/doctor-contract-registry.ts READ; retained env and OPENCLAW_DISABLE_BUNDLED_SOURCE_OVERLAYS bind selected candidate manifests. Scope, read-only discovery, declaration validation and historical migration options maintain installed/bundled owner authority, including external compatibility through 2027.1.
736 src/talk/client-voice-session.ts READ; retained VITEST/NODE_ENV expose only private test state. Transcript capability, origin, close policy, and current consult bindings govern confirmation and durable writes; clocks and deadline guards are meaningful lifecycle controls.
735 src/agents/embedded-agent-runner/run-orchestrator.ts READ; retained Environment selects plugin metadata; isolated-read-only/runtime-generation branches preserve distinct probe, refresh, lease cleanup, lifecycle and fallback ownership. Flags are lifecycle/admission facts rather than removable ambient toggles.
734 src/config/sessions/session-entry-read-runtime.ts READ; active-owner Environment snapshots pin OPENCLAW_STATE_DIR and physical session targets across awaited worker reads. Native incognito branches belong to the explicitly retained P7c migration; authority/backing/dataOnly distinctions remain meaningful.
734 src/plugins/tools.ts READ; retained Environment drives manifest availability and generation reuse; allow/deny lists, client capabilities, inspection ownership and per-invocation fences select and protect live plugin tools. No default-only option proven.
733 src/infra/package-update-steps.ts READ; retained Environment selection binds Bun/pnpm mutations to verified install roots. Timeout, replacement, candidate validation, activation, cleanup-custody, and local-override options govern real staged-update recovery; no removable default-only knob established.
732 extensions/crabbox/src/crabbox-worker-provider.ts READ; retained PATH/executable/platform adapters resolve provider-owned binaries. Warm-image, setup, enrollment and timeout inputs drive active worker paths; cancellation, current-authority and cleanup settlement must remain.
732 src/system-agent/setup-inference-turn.ts READ; retained process.env feeds current plugin installation metadata and workspace resolution. Injection, timeout, owner-binding and tool-free settings support staged/live inference verification and drift refusal.
730 src/config/sessions/targets.ts READ; retained Env selects physical session-store/database locators; configured, retired, recovery, fixed/shared and explicit CLI selections have distinct ownership contracts. No legacy-path deletion justified by this read.
728 src/cli/update-cli/update-command-post-update.ts READ; retained Environment propagation retains the admitted managed service during plugin convergence, rollback and restart. candidateRuntime and restart callbacks encode distinct finalization/recovery paths, not unused ambient flags.
727 src/cli/logs-cli.ts READ; retained OPENCLAW_SYSTEMD_UNIT and OPENCLAW_PROFILE select the actual local journal owner; polling, byte limits, follow and formatting are public CLI options. Recovery state preserves distinct journal/RPC cursors.
727 src/config/runtime-snapshot.ts READ; retained Environment captures accompany immutable runtime-config preparation and guarded publication. Snapshot/preparer generations and assertion callbacks fence stale writes; preserveConfigEnv retains config-owned environment cleanup semantics.
727 src/infra/state-migrations.audit-logs.ts READ; retained Doctor-only audit migration owner; process.env is copied with the explicit target state directory. Append checkpoints, inode recovery, quarantine, and ownership locks are migration/data contracts; audit closure excluded from mutations.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

l379 environment-owner coverage

Fully READ 1,211 inventoried environment-reading modules over 200 lines (626,062 inventory lines), including root launchers and native Rust/Python/JavaScript owners. This is the cross-cutting environment-owner inventory, not a claim that every unrelated monorepo module was read. Named test/generated/script paths and reserved audit/cron trees were excluded from discovery; remaining test-infrastructure false positives are identified in row reasons. Counts refer to the read snapshot; changed owners/callers were subsequently reviewed and tested. Documented contracts and active-owner candidates were retained.

Part 2/8, descending original size.

READ coverage 2/8
Lines File Read/disposition Finding
727 src/talk/client-voice-confirmation.ts READ; retained VITEST/NODE_ENV gates a consumed test reset/snapshot API. Runtime options protect challenge supersession, persisted utterance binding, expiry and one-shot run grants; no safe unused switch proved.
726 src/gateway/desktop/managed-linux.ts READ; retained Environment is a sanitized managed X11/D-Bus generation, not an ambient enable flag. Runtime injection supports deterministic readiness and process/audio lifecycle tests; restart budgets are constants and generation-bound computer leases must remain.
726 src/infra/gateway-lock.ts READ; retained Env selects exact state/config lock ownership and VITEST/NODE_ENV avoids ambient test acquisition unless allowInTests. Timing/process-reader injection supports contention and stale-owner proof; historical projections protect shipped Gateway exclusion.
725 packages/ai/src/transports/anthropic-payload-policy.ts READ; retained ANTHROPIC_BASE_URL determines direct-endpoint eligibility and conservative cache retention. Cache, compaction, service-tier, tool-clearing, and OAuth gates encode provider payload contracts; deprecated helper status alone does not establish removal eligibility.
725 src/commands/doctor-lint-runner.ts READ; retained Environment selects update rehearsal phases and scopes private state/config snapshots. Inspection disposal and source/private views protect operator state and advisory update outcomes.
725 src/daemon/schtasks-process.ts READ; retained OPENCLAW_GATEWAY_PORT and OPENCLAW_SERVICE_KIND select actual persisted service identity. Deadline, captureExisting, restart, and settlement options govern bounded process inspection and ownership-safe Windows stop/restart.
725 src/gateway/server-methods/update.ts READ; retained OPENCLAW_NO_RESPAWN is a documented embedding contract rechecked before foreground update effects. Supervisor detection, requester authority and managed handoff options preserve current update ownership.
725 src/plugins/capability-provider-runtime.ts READ; retained Environment identity protects reuse of process-owned metadata. Selection branches distinguish active providers, manifest aliases, voice catalogs and documented legacy TTS availability; no default-only control proved.
725 src/state/openclaw-database-preflight.ts READ; retained env selects state and configured agent databases; preparation options distinguish maintenance, startup, preserved snapshots and deferred integrity admission. These are active schema/readiness and cleanup contracts, not ambient feature knobs.
724 extensions/openai/provider-policy-api.ts READ; retained OPENAI_BASE_URL participates in explicit model/provider/environment precedence and credential transport policy. Runtime compatibility and route-intent controls protect official versus custom endpoint and subscription egress contracts; no Codex behavior change proposed.
724 src/agents/embedded-agent-runner/compaction-session-execution.ts READ; retained process.env is passed to metadata and replay owners. Compaction controls implement manual/automatic/server modes, transcript authority, model retries, usage accounting and timeout settlement; no unused private knob proven.
724 src/agents/failover-error.ts READ; retained Only environment input is forwarded to command formatting for profile-correct reauthentication hints. Other branches classify provider failures versus coordination and terminal-stop facts, not feature knobs.
724 src/daemon/inspect.ts READ; retained Environment supplies selected service labels, Windows task/profile identity, and platform discovery paths. deep and requireComplete select distinct inventory contracts; service markers identify ownership rather than optional behavior.
724 src/node-host/node-worker-workspace.ts READ; retained Environment selects node state/home roots and prepared workspace lifetime. Retention snapshots, generation protection, process admission, timeout, reset, seed, transfer, and ephemeral mode belong to workspace ownership; synchronous acquisition is explicitly retained public plugin capability.
724 src/state/openclaw-agent-execution.ts READ; retained Environment is captured in shared-state worker context and checked against existing physical owner identity. Idle and contention constants govern connection retirement; creation, borrowed-generation, cancellation, and cleanup-failure controls are live lifecycle branches.
722 src/plugins/management-service.ts READ; retained env selects metadata discovery, credentials and read-only mutation policy; cache generations preserve boot facts while management publishes desired install state. Optional catalog/metadata inputs retain cold-control-plane composition.
721 src/commands/doctor/shared/missing-configured-plugin-install.repair.ts READ; retained Env is forwarded through install discovery, update deferral and policy persistence. Repair options preserve update/Doctor lifecycle leases, consent refusal, baseline merging and transactional retirement. No safely redundant knob proven.
721 src/gateway/server/ws-connection/connect-session.ts READ; retained Only direct ambient env consumption resolves the serving service version for paired local-node upgrade rejection. Other branches implement authenticated capability, profile, presence and pairing-generation admission.
720 src/agents/model-auth-provider-config.ts READ; retained Env reads resolve actual credentials, authored SecretRefs, historical markers and AWS chain provenance. Sentinel and source-snapshot policies protect credential boundaries; config/profile/local-provider precedence remains substantive.
720 src/gateway/worker-environments/local-workspace-projection.ts READ; retained Environment selects authoritative workspace state; restore/retire/provision flags govern journal recovery, guest quiescence and custody. Removing branches would change settlement and live-authority contracts.
719 src/cli/update-cli/update-command-rollback.ts READ; retained Environment selects exact stopped-service/update state; older-binary allowance is scoped to guarded recovery. Schema/config fences, package compensation, and restart authorization carry real recovery contracts.
719 src/gateway/server-plugin-reload.ts READ; retained OPENCLAW_SKIP_CHANNELS and OPENCLAW_SKIP_PROVIDERS govern replacement channel startup; injected env is carried consistently through metadata, loading and recovery. Drain/publication/rollback controls have distinct lifecycle responsibilities.
718 src/fleet/service-support.runtime.ts READ; retained Environment identifies the fleet registry and restores inspected user env provenance. Resource limits, attempt labels and checkpoint controls preserve container ownership and recovery.
718 src/infra/device-pairing-store.ts READ; retained OPENCLAW_STATE_DIR scopes explicit alternate pairing stores while bound worker context preserves the admitted connection. Optional setup schema, token consumption, delivery confirmation, and pruning preserve durable/security contracts.
716 src/agents/subagents/spawn/acp-spawn.ts READ; active-owner Exact path occurs in heartbeat-files.txt, so no mutation candidate. process.env is captured for the parent relay state; spawn parameters select public ACP mode, sandbox, cleanup, stream and timeout behavior while authority and child admission are revalidated.
715 extensions/device-pair/index.ts READ; retained Only environment pass-through goes to pairing URL resolution. Full-access, cleartext and owner-current decisions protect bootstrap authority; QR delivery modes serve supported channels and setup presentation.
715 src/agents/plugin-model-catalog.ts READ; applied Applied after caller/contract verification: Private Doctor catalog replacement helper has two callers; both pass a singleton planned map equal to migrationPayloads and deleteMissing:false. Its optional deletion knob and empty-plan branch are unreachable.
715 src/cli/update-cli/update-command-execution.ts READ; retained Managed-service env, run env and candidate checks select the authorized update owner; preflight/activation/recovery switches preserve schema fences, Doctor compensation and published-driver behavior.
715 src/config/config-env-vars.ts READ; retained Canonical environment provenance/publication owner; explicit env inputs and preservation options distinguish OS, dotenv, config, Windows aliases, concurrent publication rollback, and equal-byte ownership changes.
713 src/config/io.write.ts READ; retained Env controls resolution, state paths and diagnostic write logs. Core path retains config-lock and Doctor authority, include preservation, deferred migration fencing and rollback publication; test logging switch exercises visible write diagnostics.
713 src/gateway/server-lifecycle.ts READ; active-owner Active heartbeat/cron lifecycle closure. QA diagnostic timing input and minimal Gateway mode support meaningful lifecycle proof; close fencing, retained work and sidecar ownership cannot be removed as knobs.
713 src/infra/update-startup.ts READ; active-owner OPENCLAW_NO_AUTO_UPDATE is documented and checked again before applying; VITEST/NODE_ENV plus allowInTests isolate background update work. The file is already owned by overlapping PR 165124.
713 src/node-host/node-worker-supervisor.ts READ; retained Environment snapshot configures journal/workspace/child execution; options select real container and workspace owners. Admission, idle retention, cancellation, process settlement and shutdown fencing must remain.
712 extensions/qa-lab/src/live-transports/shared/credential-lease.runtime.ts READ; retained QA credential source/role/endpoints and lease timing/payload bounds configure actual Convex acquisition, chunk decoding, renewal, and release. Payload limit controls have bounded-payload regression consumers; HTTP/time/random seams support deterministic broker behavior proof.
712 src/cli/update-cli/update-command-run.ts READ; retained Update run owner uses handoff/post-core markers with ledger custody, current-authority checks, and recovery admission. These markers coordinate installed-driver and candidate generations and cannot be flattened as flags.
712 src/gateway/session-row-projection.ts READ; retained Environment is captured once with the owner state directory. Config/model-catalog suppliers, placement reader and lifecycle invalidations maintain materialized-session freshness and authority; no unused flag established.
711 src/infra/install-package-dir.ts READ; retained process.env feeds the safe npm installer. Hardlink policy, host-dependency omission, deferred settlement and authority callbacks preserve installation/update rollback contracts; no environment feature switch or removable default-only mode proven.
709 src/agents/prepared-model-runtime.owner.ts READ; retained Environment fingerprints partition exact prepared owners and refresh generations. readOnly/loadRuntimePlugins/skipCredentials/workspace and binding flags constrain real registry, credential and lifecycle ownership; no default-only removable machinery proven.
709 src/config/sessions/session-accessor.sqlite-entry.ts READ; retained Environment cloning pins database path and state root across queued writes. Patch guards, worker routing and maintenance options control different real commit paths; no default-only deletion proved.
708 src/daemon/schtasks-control.ts READ; retained Environment selects exact Scheduled Task/node identity; fallback, preserveAutoStart, restoreOnFailure, and definition controls distinguish real update and service-custody paths.
707 src/config/sessions/session-accessor.sqlite-transcript-reports.ts READ; active-owner Environment snapshots pin transcript database ownership. Incognito report adapter is the protected active P7c migration; keep native/incognito and file worker boundaries, writer claims, cleanup settlement, and publication ordering.
707 src/gateway/cron-stream-job-owner.ts READ; active-owner Reads process.env only to launch the owned stream source. Retry/backoff, stop deadlines, generation fences, and source-retirement state serve cron scheduling; this prohibited cron closure is retained without mutation proposals.
707 src/gateway/server-startup-finish.ts READ; active-owner Active heartbeat overlap. Environment is passed to database-integrity and auth owners; minimalTestGateway/updateCanary prevent service side effects and lifecycle guards fence deferred sidecars and hot reload.
707 src/process/spawn-broker/host.ts READ; retained Process env is captured into real spawn options. Native-resource and ordinary process modes have different readiness, restart, and settlement lifetimes; no ambient tunable override exists here.
706 src/agents/embedded-agent-runner/run/run-attempt-dispatch.ts READ; active-owner Active heartbeat overlap. Environment is passed to trajectory recording; dispatch carries admitted policy, provider, sandbox, prompt and lifecycle facts to the backend. No Codex behavior change proposed.
706 src/commands/doctor-session-sqlite-restore.ts READ; retained Environment selects the migration state root. Archive identity, duplicate selection, consumption receipts and historical manifest repair implement retained-data recovery; cannot remove these based on legacy naming.
705 src/infra/update-candidate-canary.ts READ; retained OPENCLAW_UPDATE_IN_PROGRESS and Doctor result-path env are child-process protocol markers. Migration policy separates preserved-input startup from Doctor rehearsal; timeout, receipts, authority, and cleanup carry update safety/lifecycle contracts.
703 src/commands/doctor-maintenance.ts READ; retained UPDATE_RUN_ID_ENV and service-repair policy carry updater/Doctor custody. Stop, repair, restoration and deferred cleanup flags represent live ownership states, not optional feature variants.
703 src/logging/logger.ts READ; retained OPENCLAW_TEST_FILE_LOG enables real file logging for QA support export and numerous redaction/reload tests; default silent Vitest mode avoids heavy config startup. Runtime logging config invalidation and log limits have concrete owners.
703 src/node-host/invoke.ts READ; active-owner Current batch owns system.which executable resolution. PATH/Path handling and fresh uncached resolver admission are active cross-platform behavior; remaining dispatch controls carry policy, cancellation, and worker authority.
702 src/agents/cli-runner/execute.ts READ; retained Reads documented CLI logging/preserve-env controls and forwards sanitized backend/skill environment. Selected account clearing, remote placement, exact tool availability, MCP custody, and fork persistence are active contracts.
701 src/wizard/setup.ts READ; retained Gateway token/password env fallbacks feed actual local and remote setup probes. CLI flow/import/skip flags have user-visible paths; config merge base, model verification and migration acknowledgment preserve authored state.
700 src/infra/state-migrations.meeting-transcripts.ts READ; retained env and OPENCLAW_STATE_DIR select the exact migration database under exclusive ownership. afterImport/afterArchive hooks expose crash boundaries; rollback, archive receipts, and canonical-export preservation are migration/recovery contracts.
698 src/cli/update-cli/update-command-post-core.ts READ; retained Post-core environment handoffs carry channel, run, install-record and completion state into fresh runtimes. Shipped older-parent/target paths have explicit version/capability contracts and writer-settlement requirements.
698 src/flows/doctor-health.ts READ; active-owner Active heartbeat change path. Updater result-path/run markers, repair phase, debug proxy and NOCOW markers are live Doctor/update handoff contracts; retain.
698 src/plugins/channel-presence-policy.ts READ; retained Env credentials and manifest configuredState contribute channel presence under trust policy. Ambient suppression and persisted-auth inclusion deliberately differ for runtime activation, migration and read-only discovery.
697 src/agents/simple-completion-runtime.ts READ; retained Environment is passed to provider/auth/plugin owners. Model discovery, transport and bindAuthOwner switches select live auth/runtime paths; useAsyncModelResolution is explicitly deprecated as a retained SDK source-compatibility no-op in simple-completion.types.ts. No deletion candidate.
697 src/gateway/session-worktree-preparation.ts READ; retained process.env selects the managed-worktree registry; source, sandbox, deferred creation and setup-script decisions protect accepted workspace intent and rollback ownership.
696 src/cli/daemon-cli/lifecycle-core.ts READ; retained Environment identifies native service/config/token scope. Uninstall flags have opposite production settings for gateway and node daemon callers, so they are not default-only knobs.
695 src/agents/tools/ask-user-tool.ts READ; retained VITEST/NODE_ENV only exposes the reset bridge; gatewayCall and questionPrompt support real harness transport/prompt paths. Reservation, answer, delivery and cancellation state transitions preserve cross-bundle authority.
695 src/commands/daemon-install-helpers.ts READ; retained Environment merge is the service installation owner: durable config, SecretRefs, ambient eligible Linux provider keys, preserved operator opt-ins, PATH, wrappers, and launchd identity have distinct provenance and precedence. No unused knob proven.
695 src/gateway/server-restart-sentinel-agent-delivery.ts READ; retained OPENCLAW_STATE_DIR comes from the admitted queue owner, binding managed media to the requester store. Retry counters, settlement flags, and delivery options enforce idempotence and uncertain-delivery handling; no removable knob proven.
694 src/channels/plugins/read-only.ts READ; retained Environment and workspace inputs select manifest/setup inventory. includePersistedAuthState and includeSetupFallbackPlugins preserve distinct inventory and setup flows; metadata-first laziness is intentional.
692 extensions/openai/realtime-voice-bridge.ts READ; retained OPENAI_API_KEY supplies the configured custom-endpoint route; direct/default/Azure auth have distinct flows. Backpressure limits and reconnection/rotation state own real transport lifecycle rather than tunable dead machinery.
692 src/claws/packages.ts READ; retained env is passed to plugin setup requirements and canonical install/lease owners. install/update, reuse, provenance and rollback branches protect real package ownership; injected deps enable isolated boundary proof.
692 src/infra/update-immutable-activation.ts READ; retained Captured service env anchors canary, protection and restart budgets; OPENCLAW_SYSTEMD_UNIT binds recovery to the selected service. Current-owner and stopped-service fencing are necessary across activation and rollback; no default-only branch proven.
691 src/cli/config-model-validation.ts READ; retained env and previousEnv compare authored model references across environment/config edits; dependency-value redaction and lazy resolver injection preserve validation confidentiality and avoid heavyweight resolution for unchanged refs.
690 src/cli/command-secret-targets.ts READ; retained Environment is passed to configured channel secret discovery. Provider/account filters and optional versus forced paths express credential scope; prepared snapshot reuse prevents unrelated secret-owner failures.
690 src/gateway/server-restart-sentinel.ts READ; active-owner Active heartbeat-file owner exclusion. VITEST shortens the busy-retry delay; captured queue environment, current admission, durable continuation ownership, and pending-update retry bounds support restart recovery.
689 src/secrets/audit.ts READ; retained Environment is explicit input to secret discovery and resolution. allowExec controls whether audit executes SecretRefs and reports skipped resolution; plaintext/legacy residue paths protect existing credential state.
688 src/commands/onboard.ts READ; retained Environment credentials validate public noninteractive secret-ref options before destructive reset. Guided/classic dispatch honors explicit CLI automation contracts and reset/migration refusal boundaries.
687 src/daemon/systemd-service-files.ts READ; retained OPENCLAW_SYSTEMD_UNIT, OPENCLAW_PROFILE, and OPENCLAW_SERVICE_KIND identify installed services; manager/local, loaded/location-only, environment-file, and account modes preserve native service contracts.
686 src/agents/model-catalog-view.ts READ; retained Environment is passed to provider catalog discovery and static lookup. Options select real configured/live/static browse modes, captured runtime observations, route variants, credentials, and scoped provider fallback; no deletion proven.
686 src/cli/update-cli/update-command-target.ts READ; retained Environment carries admitted update state and install target discovery. Dry-run/channel/tag/source switches are update contracts; package pinning, capacity checks, and service-root authority remain necessary.
684 extensions/qa-lab/src/live-transports/telegram/adapter.runtime.ts READ; retained Environment resolves the explicitly selected private production bot; credential descriptors choose human-app versus Convex Test Server userbot proof. Direct-message and participant controls enforce real route, identity and lease-quiescence behavior rather than unused default flags.
684 src/agents/subagents/registry/subagent-registry-read-cache.ts READ; retained OPENCLAW_TEST_READ_SUBAGENT_RUNS_FROM_SQLITE enables genuine persistence/projection tests under Vitest, including postimage publication ordering. Cache admission, retired facts, fresh reads, and cancellation retries bind current database ownership; retain.
682 extensions/browser/src/cli/browser-cli-manage.ts READ; retained No ambient environment read: env names occur in actionable Gateway-auth error guidance. CLI options are registered user-facing management, doctor, profile and tab controls; timeout override is exercised by the deep snapshot probe.
682 src/agents/provider-local-service.ts READ; retained Process environment is merged with public localService.env for child launch and diagnostic redaction. Readiness/idle settings and test diagnostics cover real service leases, aborts, shared startup and process cleanup.
682 src/cli/cron-cli/shared.ts READ; active-owner Protected cron/heartbeat campaign overlap. Public cron flags, environment setup parsing and OPENCLAW_SKIP_CRON diagnostic guidance retained; no mutation proposed.
682 src/commands/doctor-heartbeat-scratch-migration.ts READ; active-owner Exact heartbeat overlap file; Doctor repair/preview, disabled-owner retention, CAS rollback and source-claim recovery protect migrated operator content. Excluded heartbeat/cron owner; retain.
682 src/logging/diagnostic-run-activity.ts READ; retained VITEST/NODE_ENV exposes an internal test API. Production owns generation-bound run/tool/model activity and recovery cutoffs; apparent knobs are liveness/provenance and test controls, not removable defaults.
682 src/node-host/runtime.ts READ; retained PATH preparation and captured env feed node-local executable/plugin/worker admission. enableAgentRuns, forceWorkerRuns, ephemeral, sharing and command allowlist select genuine worker/app/node capabilities; cleanup and update-pause ownership retained.
680 extensions/matrix/src/matrix/client/config.ts READ; retained Explicit account/scoped/global environment credential precedence and env SecretRefs are active Matrix configuration. Network policy, proxy routing, sync limits, encryption, and device backfill retain account/token lineage.
679 src/cli/gateway-cli/pre-bootstrap.ts READ; retained Environment snapshots and selection signatures fence config/state retargeting, trusted dotenv reload, reset, and destructive override authority. Profile/service markers and restoration branches are lifecycle and security behavior.
679 src/system-agent/setup-inference-credentials.ts READ; retained Setup passes the live environment to provider discovery/preparation. New/saved, interactive/manual, utility and remote choices represent credential persistence and onboarding contracts with cancellation fencing.
678 extensions/memory-core/src/migration/doctor-memory-sidecar.ts READ; retained State env binds Doctor imports to canonical agent databases. Legacy config layers, retry sidecar writers, empty-placeholder cleanup, vector options, and QMD lock/workspace retirement have preservation/recovery duties; names alone do not justify deletion.
678 src/agents/embedded-agent-runner/run/attempt-session-prepare.ts READ; retained process.env is forwarded into provider transcript policy. Raw-run, replay, compaction and persistence options protect prompt bytes, canonical transcript custody and lifecycle hooks rather than unused tuning.
678 src/commands/doctor-memory-search.ts READ; retained env selects plugin/provider inspection context. includeWorkspaceMemoryHealth=false and skipAuthProfileResolution=true are used by collectMemorySearchHealthFindings; gateway probe flags distinguish skipped inspection from verified readiness. These options prevent side effects in health collection.
678 src/flows/search-setup.ts READ; retained Provider envVars detect credentials and construct SecretRefs. Quickstart, disabled-state preservation, secret input mode and persistent-effect callbacks affect real onboarding selections and consent; no default-only control proven.
676 src/agents/embedded-agent-runner/model.static-catalog.ts READ; retained Environment and metadata snapshot identity own static catalog cache generations; runtime-discovery and provider scope preserve manifest/discovery fallback distinctions.
674 extensions/codex/src/node-cli-sessions.ts READ; retained CODEX_HOME pins node resume to the selected catalog source. Limits/timeouts and source-home checks serve list/resume commands; no Codex behavior change proposed.
674 src/cli/update-cli/update-command-git.ts READ; retained PATH scanning retires only verified installer wrappers; GIT_OPTIONAL_LOCKS/GIT_NO_LAZY_FETCH keep dry-run inspection nonmutating. Git/package switches, snapshot callbacks and recovery paths are concrete updater contracts.
674 src/commands/doctor/shared/preview-warnings.ts READ; retained env is forwarded to channel, plugin, secret, auth, and migration owners. allowExec controls explicit SecretRef execution in read-only preview; warning aggregation retains public configuration and upgrade diagnostics.
674 src/config/sessions/session-history-eviction.ts READ; retained Captured env pins the physical store; force, warn/enforce, preservation and reclamation mode govern real disk-budget scheduling and extraction-before-deletion behavior.
673 src/agents/model-auth-provider.ts READ; retained Credential precedence, lockedProfile, auth-profile fallback and SecretRef sentinel options encode real provider credential-selection boundaries. Process env is passed to provider missing-auth guidance; no unused default-only switch proved.
672 src/flows/doctor-health-contribution-runners.config.ts READ; retained Environment selects read-only/Nix and installed-parent update capabilities. runPostWriteRepairs=false is used by initial/staged writes; staged migration, config authority, and post-write repairs remain required.
671 extensions/ollama/src/setup.runtime.ts READ; retained Ollama cloud/local mode and environment-selected base URL/credentials feed real setup, discovery, model inspection, and cancellation paths. Dependency injection preserves bounded auth/discovery behavior; no unused default-only option found.
671 src/agents/runtime-plan/prepare-auth.ts READ; retained Environment is credential evidence consumed by the shared auth planner. Auth fallback, native forwarding, user pins, cooldown probing, and route overrides distinguish real authority and provider modes; no Codex behavior deletion proposed.
671 src/cli/daemon-cli/status.print.ts READ; retained Environment selects profile-correct service labels, log paths and actionable recovery commands; deep/json are public CLI output options. No private unused switch identified.
671 src/cli/update-cli/shared.ts READ; retained OPENCLAW_GIT_DIR is documented source-update selection. Completion child env suppresses plugin discovery and the remaining options express CLI, candidate admission, staging and recovery contracts.
670 src/agents/prepared-model-runtime.facts.ts READ; retained Captured environment participates in scoped plugin/catalog/auth discovery and inventory fingerprints. Options control real static/live preparation, credential-provider coverage and resource ownership; retained generations and lazy discovery are intentional.
669 packages/ai/src/transports/openai-responses-client.ts READ; retained Azure deployment-map environment is consumed by its dedicated transport. SSE/WebSocket, continuation, timeout, compaction and code-mode controls have distinct transport paths; no default-only knob established.
669 src/commands/doctor-update-schema-guard.ts READ; retained OPENCLAW_UPDATE_* markers identify shipped updater handoffs (including 2026.9.2 and Windows 2026.9.4). They select rehearsal versus post-core repair without granting authority; current maintenance and verified backup checks must remain.
669 src/commands/triage.ts READ; retained Captured installation selectors and OPENCLAW_SHELL=exec reach repair processes. Diagnostic-only, interactive, embedded, and recovery paths preserve explicit repair consent and admitted update ownership.
669 src/config/sessions/session-entry-read.worker.ts READ; retained Environment cloning preserves selected physical database scopes across worker transport. Projection/authorization/lifecycle selectors choose distinct admitted reads; identity and current-source checks remain necessary.
668 src/config/sessions/session-transcript-worker-runtime.ts READ; retained Captured environment and OPENCLAW_STATE_DIR pin physical transcript/database owners. Lane selection, retirement and cleanup callbacks enforce worker custody and write settlement; retain incognito/process-held paths and meaningful admission controls.
667 src/agents/auth-profiles/runtime-read.ts READ; retained Clones captured environment and freezes OPENCLAW_STATE_DIR for async readers. External CLI discovery, selected-profile scoping, migration refusals, and read-only options carry credential ownership; synchronous SDK path has an explicit transaction-bound contract.
667 src/agents/isolated-completion.ts READ; retained process.env feeds prepared runtime auth, while timeout/tool-surface/profile settings enforce isolated completion and host/harness authority. Legacy and V2 harness methods are SDK contracts, not default-only flags.
667 src/commands/doctor-config-flow.ts READ; active-owner Active heartbeat-owned path. Doctor repair/preview, legacy roster and provider migrations, plugin metadata snapshots, and source-bound config write decisions are live ownership contracts; no proposal in this closure.
666 extensions/diagnostics-otel/src/service.ts READ; retained OTEL SDK disablement, resource detectors, per-signal endpoints/protocols and export budgets implement upstream OpenTelemetry env/config contracts, with retained startup/shutdown health.
666 src/infra/tailscale.ts READ; retained PATH lookup and test-only binary override serve real route-process tests. Whois cache/error TTL controls have meaningful negative-cache and bypass tests; route claims retain process and sudo authority.
663 extensions/github-copilot/index.ts READ; retained COPILOT_GITHUB_TOKEN and COPILOT_GITHUB_DOMAIN are credential/tenant contracts. Persisted prior domain deliberately differs from current env selection to prevent token reuse across tenants; runtime imports remain lazy.
663 src/agents/embedded-agent-runner/run/auth-controller.ts READ; retained Process env supplies provider runtime auth and recovery hints. Read-only auth accounting, transient cooldown probe and profile preparation control materially different run/failover paths.
662 src/cli/daemon-cli/install.ts READ; retained OPENCLAW_UPDATE_IN_PROGRESS selects service-definition reconciliation for published updater interop. Wrapper/runtime pins, safe retained service env and TLS CA restoration belong to install/update ownership.
661 src/infra/state-migrations.runtime-state.ts READ; retained OPENCLAW_STATE_DIR selects the authoritative migration target; JSON sources retire only after SQLite commit. Voice wake, regenerated macOS config health, binding approvals, and conversation bindings are preservation migrations, not obsolete env features.
659 src/cli/update-cli/update-command-result.ts READ; retained Environment selects update ledger, recovery and managed-service scope; controls describe recorded mutation/restart outcomes rather than hidden feature flags.
659 src/cli/update-cli/update-command.ts READ; retained UPDATE_RUN_ID and OPENCLAW_UPDATE_RUN_HANDOFF select original-capture versus owned continuation. Candidate admission, retained-runtime and recovery paths preserve update authority and cannot be folded as unused modes.
659 src/mcp/channel-bridge.ts READ; retained process.env is passed to the shared Gateway bootstrap owner. claudeChannelMode and verbose are real MCP surface controls; queue bounds, wait limits, and approval expiry/ownership protect event and permission lifetimes.
659 src/plugins/session-catalog-family.ts READ; retained PATH/env supports local and node CLI terminal resume. Family options compose distinct providers, discovery caps and continuation semantics; process-home access policy and node capabilities remain enforced.
658 src/config/sessions/legacy-main-session-migration.ts READ; retained Environment pins retained migration stores. forceScan has a production writer in src/agents/agent-create.ts:243, and mode selects detection versus Doctor-owned data movement. Completed-ledger shortcut and conflict quarantine are active recovery contracts.
658 src/state/openclaw-state-db-maintenance.ts READ; active-owner Full file read. Environment is write-ownership admission, and version/options gates drive real schema publication and migration contracts. Exact path is in heartbeat-files.txt; cron/audit/schema closure retained.
657 extensions/discord/src/monitor/thread-bindings.manager.ts READ; retained VITEST/NODE_ENV preserves timer behavior under fake timers. persist, enableSweeper, idleTimeoutMs and maxAgeMs govern real thread lifecycle and test isolation; manager fencing, drain and native-create settlement cannot be collapsed as defaults.
657 src/commands/cleanup-utils.ts READ; retained Environment binds cleanup to the exact config/state owner. Dry-run, preserved workspaces, state-row removal and mutation assertions protect destructive cleanup and its lock namespace; retained legacy workspace reset is a migration path.
655 src/cli/update-cli/update-command-service.ts READ; retained Process/service environment selection preserves update target identity. Restart, service-root refresh, definition preservation and health-recovery flags distinguish supported installation/recovery states and executor fencing.
654 src/config/sessions/session-history-worker-runtime.ts READ; retained History requests capture storage environment before async discovery. Read-only/cold-restore modes, queue bounds and generation fences protect distinct history contracts; no default-only env flag found.
654 src/infra/exec-approvals-store.ts READ; retained Env/path inputs bind authorization to the captured physical policy owner; supervisor-mode comparison prevents cross-context batching. Cron policy use and mutation fences are excluded from removal.
653 src/cli/daemon-cli/lifecycle.ts READ; retained Environment carries exact service selection and update authority. OPENCLAW_UPDATE_IN_PROGRESS intentionally changes readiness/plugin-health handling for published updater parents; restart/stop fallbacks retain verified ownership.
653 src/infra/session-cost-usage-worker-runtime.ts READ; retained Captures OPENCLAW_STATE_DIR and database targets into transferable worker context. Incognito compute bindings, physical identity checks, worker settlement, and refresh locks carry live ownership; no unused tunable found.
652 extensions/codex/src/conversation-binding-preparation.ts READ; retained process.env is forwarded into Codex policy/provider preparation. Permission roots, native subscriptions, incognito and source-history transfer are live binding contracts; no Codex behavior change proposed or inferred without sibling-source proof.
652 extensions/matrix/src/onboarding.ts READ; retained Matrix default and per-account env credentials are explicitly presented to users and resolved through the auth-readiness owner. Configure update/add-account, access and private-network choices are live wizard contracts.
652 src/gateway/server-methods/terminal.ts READ; retained Process environment supplies PTY PATH and shell context; request options distinguish shell/start/resume routes and enforce live connection, node pairing and CLI-agent policy after awaits. Capability flags retain older client wire-shape compatibility.
651 src/agents/models-config.providers.implicit.ts READ; retained LIVE/OpenClaw live flags enable bounded provider catalog discovery; override timeout applies only in that live mode. Discovery/auth/static-catalog options carry current generation and provider scope, with late outcome fencing.
651 src/commands/doctor/shared/codex-route-session-repair.ts READ; retained env selects agent/auth/session migration scopes; VITEST/NODE_ENV only exposes repair test API. shouldRepair/authProfileOnly and blocked identity maps preserve collision-safe credential/model migration; no Codex behavior change proposed.
651 src/infra/system-run-approval-binding.ts READ; retained PATH/PATHEXT and shell startup environment are approval identity/security inputs. Hash binding, wrapper identity and mutable-file revalidation prevent post-approval drift. No execution authority check is a cleanup candidate.
650 src/cli/update-cli/update-command-fresh-doctor.ts READ; retained Environment deliberately clears inherited service markers and carries native Doctor results, phases, and run identity. Fresh-child versus shipped CLI capability selection and failure classification preserve installed updater compatibility.
650 src/config/schema.help.runtime.ts READ; active-owner Public config-field help, including documented env fallbacks, not an independent env policy owner. Exact path intersects heartbeat-files.txt and is excluded from this cleanup.
650 src/state/openclaw-state-lease.ts READ; active-owner Native versus worker storage, heartbeat strategy, renewal, draining, and ownership assertions are live lease/lifecycle contracts; file overlaps the active heartbeat owner.
646 src/infra/update-failure-report.ts READ; retained Environment/stateDir pin the report receipt owner; host/browser/reconcile and allowBrowserFallback distinguish actual publication contracts. Current-authority, preview, no-start and receipt hooks protect at-most-once submission and uncertain-outcome recovery.
645 src/gateway/server-startup-config.ts READ; retained Environment is forwarded to source-config and secret preparation; no ambient feature flag is owned here. Injected preparation supports startup isolation while deferred publication, source-only recovery, and revision predicates enforce current credential lineage.
645 src/media/playback-transcode.ts READ; retained Only direct environment gate publishes a test API for cache keys and completion synchronization. Runtime admission, live waiter authority, source identity, codec policy, cache bounds, and ffmpeg limits are meaningful playback contracts.
644 src/agents/harness/compaction.ts READ; retained Environment feeds prepared runtime auth. Native-compaction selection, route-locked auth and retained source authority are real harness boundaries; no Codex behavior change proposed.
644 src/agents/provider-attribution.ts READ; retained Environment supplies service version for provider attribution. Endpoint metadata and compat flags select native/proxy request behavior; exported request contracts and vendor attribution policies are not default-only knobs.
644 src/infra/state-migrations.plugin-doctor.ts READ; retained Env selects canonical state, OAuth paths and rehearsal confinement. Doctor-only/phase/planned-action options and optional authority retain migration ordering and offline lease contracts; migration age is insufficient for deletion.
644 src/logging/diagnostic-support-redaction.ts READ; retained HOME/USERPROFILE/stateDir supply private path prefixes. Bounded redaction, config/snapshot distinctions and optional truncation limits serve diagnostics/privacy behavior; no unused control proven.
643 extensions/codex/src/app-server/run-attempt-connection.ts READ; retained Process/shell environment projection, CODEX_HOME, client ownership, sandbox placement, session permissions, cancellation, and session/model authority compose real run boundaries. No Codex behavior change proposed.
643 src/gateway/server-methods/projects.ts READ; retained Env feeds GitHub credentials and managed worktree discovery; includeObserved and nativeGitHubSearch express actual request/config choices. Request authority is revalidated across awaits, and checkout deletion checks owner references.
642 src/agents/tools/image-tool.ts READ; retained VITEST/NODE_ENV expose provider-dependency test injection; modelHasVision/deferAutoModelResolution preserve native vision versus lazy fallback selection. Sandbox, media limits and live operator authority are real execution contracts.
642 src/flows/doctor-health-contributions.ts READ; retained Environment selects Doctor/update/service state. The VITEST/NODE_ENV publication is consumed by doctor-health-contributions.test-support and the repository test API registry; ordered migrations, deferred inspections and repair refusal guards remain active.
641 src/boards/sqlite-board-store.ts READ; active-owner Env is snapshotted and OPENCLAW_STATE_DIR pinned before board operations. Incognito actor adapters are explicitly retained for active P7c; identity and post-commit invalidation preserve authority and settlement.
641 src/plugins/plugin-registry-snapshot.ts READ; retained Plugin snapshot reader uses environment for owner/source selection and explicitly distinguishes current, persisted and derived inventory. Freshness checks belong to management admission and preserve installed ownership.
640 src/plugins/install-managed-npm.ts READ; retained Safe npm environment, fresh-cache recovery and package-manager compatibility options are used in transactional installation. Preflight, dry-run, replacement-ID and integrity controls protect install contracts.
639 src/agents/apply-patch.ts READ; retained VITEST/NODE_ENV only publish the private parser/application test API. Workspace containment, sandbox mapping compatibility, mutation queues, aborts and no-op messaging are behavior/security contracts; no runtime env knob.
639 src/daemon/schtasks-runtime.ts READ; retained Environment selects Windows service/task identity and carries OPENCLAW_SERVICE_KIND/OPENCLAW_TASK_SCRIPT through the supervisor and cmd fallback. observe/control, deadline and requireEffective modes preserve installed-command ownership and bounded inspection; recovery paths are active.
638 apps/linux/src-tauri/src/desktop_node.rs READ; retained Full module including inline tests read. OPENCLAW_NO_RESPAWN keeps the app-owned node PID supervised; OPENCLAW_STATE_DIR/CONFIG_PATH bind app identity to the canonical CLI config; gateway token/password are delivered in env instead of argv and redacted from diagnostics. CF_ACCESS credentials are explicitly removed to prevent unrelated ambient auth. Desired revision, disable_for_run, cancellation and process teardown retain desktop-sharing ownership contracts.
638 src/secrets/runtime.ts READ; retained Environment and explicit dirs are retained refresh inputs. Config/auth-ref inclusion, unavailable-owner isolation, cold refs and lineage preserve separate credential/transport ownership; no private env toggle or proven unused default-only option.
637 src/system-agent/setup-inference-activate.ts READ; retained Env is passed to runtime-provider canonicalization and metadata preparation. Activation flags select real setup routes, native catalog consent and credential promotion; owner revalidation/compensation protects concurrent config and saved sign-ins.
634 src/commands/backup-shared.ts READ; retained Environment selects activated plugin backup inventory and canonical state ownership. includeWorkspace/onlyConfig and symlink/private-capture guards implement explicit backup CLI and data preservation contracts.
634 src/infra/restart-stale-pids.ts READ; retained env binds Gateway owner leases and configured port selection. assertCurrent, protectedPid, verified ancestry, process identity, and probe timeout choices are cleanup safety contracts, not removable default knobs.
633 src/agents/worktrees/checkout.ts READ; retained Git environment overrides and external attributes invalidate clone acceleration because they alter checkout semantics. enabled, sourceOnly, deferred checkout, profile, budgets, and rollback callbacks serve distinct registration/materialization ownership paths.
633 src/commands/doctor/shared/stale-auth-order.ts READ; retained OPENCLAW_AGENT_DIR/PI_CODING_AGENT_DIR include retained credential owners in safe repair proof. Test API publication has explicit consumers and repository test-publication registration; migration guards retain unreadable sources.
633 src/daemon/schtasks-layout.ts READ; retained OPENCLAW_WINDOWS_TASK_NAME/PROFILE/HIDDEN_LAUNCHER and Windows home selectors define persisted service identity and launcher variants. Effective-read/deadline/profile options protect inspection; September launcher compatibility remains an explicit contract.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

l379 environment-owner coverage

Fully READ 1,211 inventoried environment-reading modules over 200 lines (626,062 inventory lines), including root launchers and native Rust/Python/JavaScript owners. This is the cross-cutting environment-owner inventory, not a claim that every unrelated monorepo module was read. Named test/generated/script paths and reserved audit/cron trees were excluded from discovery; remaining test-infrastructure false positives are identified in row reasons. Counts refer to the read snapshot; changed owners/callers were subsequently reviewed and tested. Documented contracts and active-owner candidates were retained.

Part 3/8, descending original size.

READ coverage 3/8
Lines File Read/disposition Finding
632 src/agents/sandbox/browser.ts READ; retained Browser environment values are the sandbox image/CDP/noVNC contract. Config hashes, authenticated endpoints, workspace custody, and lifecycle queues govern replacement and reuse; no ambient feature flag to retire.
632 src/state/openclaw-state-db-readonly.ts READ; retained Environment identifies the selected database. Artifact-preserving/current/live/native modes distinguish snapshot custody, maintenance and side-effect guards; cancellation and admission fences are meaningful state contracts.
630 src/config/sessions/session-accessor.sqlite-message-cut.ts READ; retained Storage environment is captured across worker dispatch. Fork/rewind/switch modes, expected identity and projection callbacks enforce transcript mutation, repository and cleanup contracts.
629 extensions/voice-call/index.ts READ; retained OPENCLAW_CLI avoids service startup in one-shot CLI processes. Registration epoch, scheduler lifetime and tool/RPC options have active runtime consumers.
628 extensions/codex/src/app-server/bounded-turn.ts READ; retained OPENCLAW_CODEX_APP_SERVER_ARGS and CODEX_HOME are deliberately filtered/rebound for private turns. Isolation, external-capability refusal, managed hooks and cancellation budgets enforce native tool boundaries; no Codex behavior change proposed.
628 src/gateway/worker-environments/node-worker-workspace-actions.ts READ; retained Only direct process.env use is the repository setup child overlay, adding source/worktree paths. Native quiescence, transfer authorization, restore and checkpoint branches preserve live placement custody.
628 src/plugins/status.ts READ; retained Explicit env/workspace/plugin IDs select metadata discovery scope; runtimeInspection and loadMode govern real registry inspection and disposal. Snapshot/runtime branches preserve lazy plugin loading.
627 apps/macos/Sources/OpenClaw/GatewayProcessManager+Hosting.swift READ; retained App-hosted environment intentionally merges retained service settings, runtime paths, and exact profile/state/config selectors. Migration, pause, generation, and custody branches serve real update recovery.
626 src/cli/update-cli/update-command-service-recovery.ts READ; retained Environment binds service ownership during update recovery. Preserve definition, health identity, original-service compensation, database schema admission, executor fencing, and process settlement conditions are essential recovery branches.
626 src/plugins/providers.runtime-core.ts READ; retained Environment roots and mode/cache/activate/registryScope options select prepared, loaded-only, setup, and generation-bound registries. Runtime selection honors manifest ownership and current activation; no proven default-only knob.
625 extensions/browser/src/browser/chrome.executables.ts READ; retained PLAYWRIGHT_BROWSERS_PATH/XDG_CACHE_HOME and native Windows install-root variables locate actual browser installations. Explicit executablePath and platform selectors drive real discovery; fallback layouts cover dependency/platform contracts.
625 extensions/memory-core/src/memory/manager-database-context.ts READ; retained captureWriteOptions freezes the memory database environment. readOnly/allowExtension and private-writer/reentrancy/generation controls select published versus shadow work and retain SQLite publication, cleanup and identity fencing.
624 extensions/telegram/src/bot/helpers.ts READ; retained process.env supplies canonical pairing-store scope. skipPairingStoreRead preserves already-authorized command behavior during store failure; forum cache and topic distinctions implement Telegram contracts.
624 src/infra/state-migrations.workspace-setup.ts READ; retained Doctor-only opt-in, injected env/home, claim hooks, and removal hooks support migration discovery and failure/race coverage. Receipts, archives, historical workspaces, and rehearsal exclusions retain preservation duties.
623 extensions/codex/src/app-server/config-options.ts READ; retained Explicit app-server and computer-use env/config precedence, home scope, sandbox policy and launch cache keys are supported configuration contracts. Computer-use envs retained as documented; no Codex behavior change proposed.
623 src/plugins/manifest-registry-installed.ts READ; retained Env selects bundled overlays and plugin trust/hardlink policy; includeDisabled, pluginIds and metadata snapshots are control-plane inventory selection. Package channel env/setup fields are manifest contracts.
622 src/gateway/probe.ts READ; retained Caller env scopes device identity, token storage and edge auth. Detail levels, explicit credentials, origin scope and stored-auth suppression alter read-only probing and prevent credential/pairing cross-target changes.
622 src/infra/system-run-mutable-file-operand.ts READ; retained process.env feeds the shell startup-environment security check. Interpreter, wrapper, cwd, code-loading, and mutable-file options determine whether approved execution can be bound safely.
619 src/plugins/uninstall.ts READ; retained process.env enters the safe npm environment for legacy shared-root removal. deleteFiles/extensionsDir and install-kind branches enforce uninstall intent and canonical managed-path ownership.
618 src/cli/daemon-cli/status.gather.ts READ; retained Merges process/service environment to resolve explicit versus native service target and credentials. deep, probe, exec SecretRef policy, and running/restart plugin targets select meaningful CLI/Doctor diagnostics.
618 src/infra/update-immutable-install.ts READ; retained PATH is adjusted to the adopted runtime during exact-SHA preparation. dryRun/enableActivation/runtime/service inputs implement explicit immutable install and v1-to-v2 adoption contracts, with owner and generation checks retained.
618 src/plugins/provider-auth-choice.ts READ; retained Env and beforePersistentEffect pin provider auth and write scope; default-model preservation, remote mode, cancellation and deferred profile persistence serve actual onboarding flows.
617 src/skills/loading/workspace-skill-loader.ts READ; retained Skill source caches include state directory and prepared metadata identity; discovery options distinguish remote workspace, gateway inventory, execution tiers, library pins, and eligibility. Lifecycle invalidation and authority are meaningful.
616 src/cli/config-cli-runner.ts READ; retained Captured resolution env prevents authored config values drifting during set/patch. Dry-run, merge, replace and conditional expectations are public CLI behavior; supplied paths, roster remaps and write guards preserve exact mutation intent.
615 extensions/microsoft-foundry/onboard.ts READ; retained AZURE_OPENAI_ENDPOINT seeds API-key setup; tenant/model/API/auth options select real Azure and Foundry paths. Entra-only model guard is required for the API-key flow.
615 extensions/qa-lab/src/mantis/visual-task.runtime.ts READ; retained CRABBOX_RECORD_PROVIDER/LEASE_ID are record-driver handoff inputs; Mantis env fallbacks support explicit leases. Browser/vision/settle options drive CLI recording and screenshot assertions, with failure artifacts and lease cleanup retained.
615 src/daemon/systemd-scope.ts READ; retained DBUS, SYSTEMD_UNIT_PATH, SUDO_USER, profile/home/state/config and service-kind selectors establish actual manager identity and absence proof. Different discovery booleans have distinct real callers within the owner.
615 src/system-agent/setup-apply.ts READ; retained Setup uses environment for config validation and Gateway auth. Resume/installDaemon/workspace and expected-route controls preserve approved first-agent and service ownership; no private toggle identified.
614 src/state/agent-deletion-journal.ts READ; active-owner Listed in heartbeat-files.txt. Environment canonicalizes state-owned deletion paths; journal purpose and completed-only controls distinguish runtime admission, maintenance recovery and exact deletion claims. Retain fencing and cleanup owner.
613 src/daemon/launchd-runtime.ts READ; retained OPENCLAW_SERVICE_KIND and OPENCLAW_GATEWAY_PORT feed installed-service probe ownership. skipEnable, preserveAutoStart, preservedEnabled and retryPendingTeardown distinguish explicit start from update recovery and launchd teardown; no unused knob proven.
613 src/plugin-sdk/channel-entry-contract.ts READ; retained OPENCLAW_DISABLE_BUNDLED_ENTRY_SOURCE_FALLBACK is explicitly presence-based shipped packaging behavior, used by release and built-artifact smoke scripts. Setup migration flags have an explicit 2027.1 external-plugin window; lazy loader/profile and test-loader seams remain useful.
611 src/state/openclaw-agent-db-schema.ts READ; retained Environment selects and fences the database owner. Register, integrity reuse, process-death and target-schema parameters control admission/migration behavior. Schema paths and maintenance authority cannot be removed based on default use.
610 src/gateway/server-methods/system-changes.ts READ; retained Environment selects the two audit readers; injected stores enable isolated bounded pagination/collapse evidence. Audit projection and retention/cursor contracts are outside deletion scope.
609 src/agents/embedded-agent-runner/prepared-compaction-runtime.ts READ; retained Env is passed to provider reasoning policy while prepared auth/tools/prompts mirror real compaction behavior. Policy variants bound private prompt content, resources and cleanup; no isolated default-only env knob found.
608 src/agents/cli-executable-identity.ts READ; retained PATH and platform executable resolution are inputs to immutable CLI identity proof. Rooted paths, interpreter/package-tree hashing and runtime-artifact policies protect durable setup authority.
608 src/cli/completion-runtime.ts READ; retained SHELL, HOME, USERPROFILE, ZDOTDIR, XDG_CONFIG_HOME and canonical state resolution select actual shell profiles/cache paths. Legacy and portable-hook handling preserves user-owned shell content; platform/env injections cover cross-platform behavior.
608 src/plugins/manifest-registry-build.ts READ; retained Environment controls plugin roots, hardlink policy and compatibility-host admission. Candidate/discovery inputs preserve manifest-first execution and duplicate precedence. Host-version compatibility and installed ownership are public plugin contracts.
607 extensions/qa-lab/src/evidence-summary.ts READ; retained OPENCLAW_E2E_PROFILE/OPENCLAW_QA_PROFILE, package-source metadata, and runner fields describe actual QA evidence provenance. Versioned evidence, occurrence containment, and slim/full projections retain reporting contracts.
606 src/agents/model-catalog-decisions.ts READ; active-owner Active overlap with PR 165124. Environment is passed into prepared auth evaluation; requester pins, account catalogs, discovery options, and current-authority callbacks serve real private-versus-shared catalog ownership.
606 src/cli/update-cli/update-command-plugins.ts READ; retained Post-core convergence environment and authored-env restoration are update compatibility boundaries; capability consent, integrity drift, install receipts, and config authority remain necessary.
606 src/config/sessions/session-transcript.worker.ts READ; retained Environment fallbacks and platform-semantic cloning serve worker read scopes. Request-kind branches preserve distinct history, membership, archive and accounting contracts; cleanup owns admitted database handles.
605 src/agents/agent-scope-config.ts READ; active-owner Active heartbeat overlap. Environment selects scoped agent paths; explicit/ambient/legacy data ownership and ACP workspace provisioning preserve configured and migrated directory contracts rather than abandoned defaults.
603 src/agents/tools/media-generate-background-shared.ts READ; retained Captured transcript storage environment and lifecycle generation prevent detached work from changing requester owner. Keepalive/retry constants retain delivery and continuation custody. Cron continuation branches are excluded from mutation scope.
603 src/plugins/management-install.ts READ; retained Environment selects managed plugin installation state. Source variants, release-cohort resolution, pinning, capability consent, lifecycle leases, deferred runtime, and before-effect checks are used install contracts.
602 extensions/telegram/src/polling-session.ts READ; retained Uses the canonical adoption-stall env resolver. Polling thresholds, worker/drain options, committed offset ACK boundary, backoff, and session/cycle transport lifetimes are active recovery and isolated-QA controls.
600 extensions/qa-lab/src/cli.ts READ; retained CLI exposes operational QA controls and lazy runtime loading; Convex environment names are help text for explicit broker options. Deprecated evidence spelling remains a CLI shape, not an unused environment read.
599 src/config/sessions/session-cold-storage.ts READ; retained State-directory environment is captured into worker targets; cold-storage config, bounded batches and restore cooldowns implement live archival policy with admission and database-generation fences.
599 src/skills/lifecycle/install.ts READ; retained PATH, GOBIN, npm prefix, LC_ALL and GOTOOLCHAIN control real child installation and readiness behavior. Installer choice, timeouts and remote workspace routing are active contracts.
598 src/agents/mcp-ui-resource.ts READ; retained VITEST/NODE_ENV expose bounded-store cleanup only to tests. Fixed view limits, expiry and request bounds accompany runtime leases, requester identity and authorization checks; display/CSP/tool options carry external MCP/UI contracts.
598 src/commands/doctor-heartbeat-task-migration.ts READ; active-owner Active heartbeat ownership exclusion. Environment selects migration state; shouldRepair preserves preview semantics and nowMs fixes scheduling/transaction time. Scratch revisions, declaration identity, and legacy timestamp cleanup are migration contracts.
598 src/node-host/node-worker-bundle-installer.ts READ; retained Env selects node state and sanitized worker prewarm context. bundlePrewarm and retention generations are protocol/lifecycle choices; archive limits, resumable downloads and integrity checks protect real bundle installation.
595 src/agents/embedded-agent-runner/compact.ts READ; retained process.env feeds prepared plugin metadata. Native/manual compaction, pinned harness selection, authorized transcript preflight and fallback controls preserve admitted runtime generation and cancellation settlement.
595 src/agents/subagents/spawn/acp-spawn-parent-stream.ts READ; active-owner Active heartbeat change path. Captured env owns diagnostic persistence; bounded flush/retry/stall timers and streaming controls drive parent progress and settlement.
595 src/cli/update-cli/update-command-finalize.ts READ; retained UPDATE_EFFECTIVE_CHANNEL_ENV and POST_CORE_UPDATE_SOURCE_CONFIG_PATH_ENV carry installed-driver facts across a fresh candidate process without persisting an implicit channel. Deferred completion cache and maintenance custody govern real update repair paths.
595 src/gateway/server-runtime-state-prepare.ts READ; retained OPENCLAW_SKIP_CHANNELS and OPENCLAW_SKIP_PROVIDERS control readiness consistently with channel startup; channel skip is documented for embedding/troubleshooting. Auth uses current environment; minimalTestGateway, updateCanary and sidecarStartup select meaningful startup and isolation contracts.
594 src/flows/doctor-core-checks.runtime.ts READ; retained Environment is passed to daemon and trusted-plugin discovery; no standalone env feature switch. Provider hook validation reports malformed plugin results and local audio findings project actual inspected capabilities.
594 src/gateway/gateway-cli-backend.live-helpers.ts READ; retained Live CLI helper knobs control documented args, image/MCP probes, advisory skipping, and environment isolation. A narrow retired codex-cli timeout predicate is unreachable through the sole live caller; candidate is test support, not product logic. Retained: candidate is test infrastructure, outside this production cleanup; no production LOC claim.
593 apps/macos/Sources/OpenClaw/TalkMLXSpeechSynthesizer.swift READ; retained OPENCLAW_MLX_TTS_BIN is explicitly documented in docs/nodes/talk.md and docs/gateway/config-agents/messages-and-talk.md. Injectable timing/transport and memory-pressure controls preserve cancellation, fallback, and helper lifecycle behavior.
593 extensions/cua-computer/src/commands.ts READ; retained OPENCLAW_CUA_DRIVER_ENDPOINT is app-provided macOS daemon readiness; PATH resolves raster tools. Driver/image/timer adapters preserve provider isolation and native platform behavior; no Codex behavior change proposed.
593 src/config/validation-plugin-rules.ts READ; active-owner Exact path overlaps heartbeat-files.txt; leave with active owner. Full/skip/core-only and strict/runtime validation modes have concrete config-read/write behavior; environment scopes plugin metadata and channel selection.
593 src/daemon/runtime-paths.ts READ; retained Runtime lookup consumes BUN_INSTALL, HOME/USERPROFILE, PATH and Windows roots. OPENCLAW_SQLITE_LIBRARY/HOMEBREW_PREFIX are documented Bun service inputs; probe allowlist deliberately excludes secrets/preloads.
593 src/infra/update-recovery-backup-reader.ts READ; retained Env identifies selected state/config and legacy capture scope. Manifest generation hashes, pinned directories, run/driver lineage and terminal receipts bind recovery evidence; no default-only cleanup can discard those checks.
592 src/commands/doctor-session-canonical-keys.ts READ; retained env selects canonical session stores and archives; apply controls dry-run versus durable Doctor repair. Batching, cross-store preservation and exact-row expected revisions are real migration safeguards.
592 src/infra/state-migrations.media-persistence.ts READ; retained Env selects Doctor-owned migration targets; schema cutover and archive hooks protect supported migration, source-race and durability contracts. The v15/v16 cutover has an explicit future removal floor, not a current deletion.
591 node-host-launcher.mjs READ; retained OPENCLAW_CONTAINER deliberately excludes container invocations; OPENCLAW_STATE_DIR anchors the supervisor state database. Child argv markers require a connected supervisor and carry managed state identity; IPC bootstrap messages retain the selected environment across respawn. Fixed restart/readiness budgets, schema compatibility, activation locks and Windows selector recovery enforce the node auto-update lifecycle. No safe removal candidate.
591 src/gateway/server-startup-bootstrap.ts READ; retained OPENCLAW_GATEWAY_PORT, restart handoff env, config env publication, raw-stream diagnostics, and VITEST-only minimal Gateway startup have explicit bootstrap owners. Canary and ambient-trigger choices preserve startup/config/lifecycle behavior.
590 src/auto-reply/reply/reply-run-registry.registry.ts READ; retained VITEST/NODE_ENV only expose registry reset for isolated tests. Timeout/abort controls and per-source admission barriers retain exact reply ownership and lifecycle cleanup.
590 src/daemon/systemd-install.ts READ; retained Service env source metadata separates managed inline/file values from operator values; migration preserves shell references and removes stale credentials/version metadata. Publication recovery and system/user ownership checks are substantive.
589 src/cli/update-cli/update-command-config.ts READ; retained Environment resolves authored config includes and SecretRefs during update restoration. Read-only planning, tolerated admission failures and pre-update snapshots preserve installed-driver/config upgrade behavior.
587 src/gateway/github-publication-git-transport.ts READ; retained Environment overrides disable Git hooks/replacements and pin private snapshot indexes. beforeRun and post-await assertions preserve publication authority; no removable feature switch identified.
587 src/gateway/worker-environments/bundle.ts READ; retained Npm proof env disables prompts/scripts; producer options select package/cache/version/protocol facts and exclusive cache custody. Verification and command injection support exact published artifact proof; lazy preparation/prune serialization are meaningful.
586 extensions/diffs/src/browser.runtime.ts READ; retained Browser executable override trio is explicitly documented in docs/tools/diffs.md. PATH/platform paths are discovery inputs; browserIdleMs is exercised by browser lifecycle tests and retained as meaningful test control.
586 extensions/matrix/src/cli-shared.ts READ; retained VITEST suppresses forced CLI process exit in tests; verbose/json and recovery-key stdin controls are CLI contracts. Account publication validates the captured config before writing.
584 src/config/sessions/session-accessor.sqlite-maintenance-kick.ts READ; retained Environment and database identity are captured for detached maintenance. skipMaintenance, preserved active keys, generations, quiet retries, and executor custody protect real write/reclamation behavior; no environment debug tuning found.
583 src/status/summary.ts READ; active-owner Active heartbeat-owned path. Runtime version reads environment; options govern sensitive data redaction, channel startup cost, CLI projection, captured session stores, and desktop status. Retain the status and heartbeat projection boundaries.
582 src/commands/doctor/shared/stale-agent-model-ref-repair.ts READ; retained Environment chooses metadata and per-agent models.json sources. pluginProviderIds/persistedProviderIdsByAgentId isolate meaningful stale/retired-model migration tests; preservation depends on incomplete discovery and persisted provider ownership.
582 src/plugins/management-mutations.ts READ; retained OPENCLAW_CLAWHUB_URL/CLAWHUB_URL select hosted versus custom catalogs. enable/install/reload controls are consumed by management and CLI and retain capability consent, source hashes and lifecycle-lease authority.
582 src/system-agent/operations-parse.ts READ; retained This is closed user-command grammar and dependency contracts, not an ambient env-toggle owner. operatorApprovalOnly has ordinary and delegated production callers; secret parsing/redaction and persistent-action classification remain user-facing authority boundaries.
581 extensions/beam/src/mirror.ts READ; retained Mirror config is an explicit catalog-consent contract with poll/window bounds; env resolves configured secret input. Clock/fetch/catalog seams support lifecycle and delivery proof, while retry/redirect state belongs to the selected receiver.
581 src/commands/doctor/cron/legacy-repair.ts READ; active-owner Excluded cron owner. Env selects repair state; read-only, quarantine recovery and model-policy flags separate actual inspection and repair flows. No mutation proposed.
579 src/agents/embedded-agent-runner/run/runtime-preparation.ts READ; retained process.env feeds prepared provider runtime lookup. Auth cooldown probes, runtime/harness selection and prepared profile controls preserve auth fallback and admitted-run authority.
579 src/node-host/runner.ts READ; retained Gateway token/password env precedence preserves paired device identity. Worker, ephemeral, bootstrap, parent-stdin and stop-after-connect options have concrete runtime/service behavior.
579 src/state/openclaw-quarantine-store.ts READ; retained Environment selects quarantine SQLite state. Consume and runtimeProof modes implement integrity receipt ownership, clean-close invalidation and safe checkpoint reuse.
578 src/pairing/setup-code.ts READ; retained OPENCLAW_GATEWAY_TOKEN/PASSWORD are public auth inputs. URL preferences, local/remote selection, TLS, issued bootstrap, and expiry options preserve pairing transport/access policy and meaningful test injection.
577 extensions/opencode/session-catalog.ts READ; retained SAFE_ENV_KEYS bind CLI invocation and cache invalidation. OPENCODE_PURE plus standalone private config/project-disable enforce version-specific read isolation; v1/v2 branches are upstream compatibility, not removable feature knobs.
577 src/config/defaults.ts READ; retained ANTHROPIC_API_KEY/OAUTH_TOKEN and authored auth metadata determine provider-owned context-pruning defaults. Catalog seeding, explicit aliases and model token limits preserve config materialization; session.mainKey handling remains a config compatibility path.
577 src/state/openclaw-state-db.ts READ; retained Shared-state DB environment chooses physical ownership. Automatic/Doctor repair, canonical-schema requirements, busy-timeout and publication modes enforce maintenance/admission contracts.
576 src/gateway/cli-session-history.claude.ts READ; retained HOME selects Claude projects; homeDir enables explicit source location. preserve/recover reseed modes differ for fallback seed versus import; native metadata, image correlation and reseed receipts protect transcript content.
575 src/infra/triage-continuation.ts READ; retained OPENCLAW_UPDATE_RUN_HANDOFF and sentinel/run markers route installed-CLI IPC continuations, then are cleared after admission. Live process identity, requester authority and uncertain cleanup are required handoff boundaries.
574 packages/memory-host-sdk/src/host/session-transcript-corpus.ts READ; retained Captured environment binds corpus discovery to configured physical stores; readOnly/includeContentRevision/includeRetainedSqlite select actual reader and inventory behavior. Retained/incognito exclusions and worker admission are active ownership boundaries.
574 src/plugin-state/plugin-blob-store.sqlite.ts READ; retained env identifies error/storage targets; TTL, overflow and namespace limits implement blob-store policy with expired-row cleanup custody. No ambient feature flag or unused option proved.
573 extensions/qa-lab/src/suite-runtime-agent-session.ts READ; retained OPENCLAW_STATE_DIR isolates QA session writes to gateway.tempRoot. Reader options select transcript cursors, empty results, code-mode evidence and memory-reset evidence; readEntries/retryDelaysMs support bounded FTS-race proof rather than unused production policy.
573 src/daemon/schtasks-install.ts READ; retained Windows scheduled-task install composes caller-owned native identity with task activation selectors. Hidden-launcher, profile/state/port values and rollback/fallback ownership affect real platform behavior.
572 src/cli/daemon-cli/restart-health.ts READ; retained OPENCLAW_UPDATE_IN_PROGRESS preserves shipped-updater startup grace. requirePluginHealth, waitForMissingService and supervisorKeepsAlive have production false/true callers for diagnostic/recovery versus restart flows; progress and identity checks remain.
571 src/infra/state-migrations.shared-auth-store.ts READ; retained OPENCLAW_STATE_DIR binds shared-auth relocation. doctorOnlyStateMigrations and artifactPreservingReadOnly gate distinct detection/admission flows; copy, ownership flip, receipt preservation and cleanup are durable migration responsibilities.
570 src/agents/cli-runner/bundle-mcp.ts READ; retained MCP env projection carries bearer credentials and per-turn approval/capture state; resume hashes intentionally canonicalize ephemeral values. Backend modes, native search policy, denials, exclusive config, and cleanup are active harness contracts.
569 src/config/io.audit.ts READ; retained Audit ownership exclusion retained. WATCH_MODE/SESSION/COMMAND record producer provenance; environment selects audit storage. Legacy scrub, process redaction, row caps, and best-effort append are meaningful audit/recovery behavior.
569 src/plugins/install-persistence.ts READ; retained Environment selects lifecycle leases and paths. Enablement, deferred runtime application and before-effect guards implement install publication, rollback, migration and source-cleanup ownership.
568 apps/macos/Sources/OpenClaw/ManagedNodeGatewayMigration.swift READ; retained Environment state/config/port checks establish the managed service target. Retry/core-repair flags and operation injection preserve same-version migration and rollback ownership.
568 src/infra/restart-sentinel.ts READ; retained Environment scopes durable restart/update receipts and formats follow-up commands. existingOnly has a true read-only caller; revision/producer guards and failure-report reservation/sweep operations retain separate contracts.
567 extensions/openai/realtime-transcription-provider-factory.ts READ; retained OPENAI_API_KEY is a real credential source after configured API key and profile handling. Language/model/prompt/VAD settings are provider config; transcript bounds/order and terminal history protect connection behavior.
566 src/agents/worktrees/service-preparation.ts READ; retained Environment scopes allocation/registry custody; setup scripts receive OPENCLAW_SOURCE_TREE_PATH and OPENCLAW_WORKTREE_PATH. Source/rollback guards and uncertain-outcome handling protect live worktree ownership.
566 src/state/openclaw-state-lease-heartbeat.ts READ; active-owner Protected heartbeat owner. Only source-runtime TSX_TSCONFIG_PATH is inherited into otherwise isolated worker env; renewal, ACK, expiry, startup handoff and cleanup controls carry live lease authority.
563 extensions/codex/src/migration/source.ts READ; retained CODEX_HOME and scoped HOME select the explicit source app-server migration environment. memoryOnly/authOnly/eligibility/app verification separate real import phases. No Codex behavior change proposed; sibling-source validation was therefore unnecessary.
563 extensions/matrix/src/matrix/monitor/index.ts READ; applied Applied after caller/contract verification: Production fixes startupGraceMs to zero, then threads it through handler/event helpers; only a media test fixture supplies a nonzero value. The grace plumbing can be removed while preserving cold-start filtering and healthy-sync diagnostics.
563 src/cli/update-cli/update-command-resume.ts READ; retained POST_CORE_UPDATE and update-run environment fields form the installed-parent/candidate resume protocol. Shipped legacy-parent completion, parent process identity, executor authority, Doctor settlement, and plugin record freshness require these branches.
563 src/commands/doctor-gateway-daemon-flow.ts READ; retained Environment carries profile/service labels and configured service ownership. Deep, noninteractive, healthSkipped and service-repair policy prevent wrong-service or unattended restarts while preserving install/bootstrap diagnostics.
563 src/config/env-preserve.ts READ; retained Environment resolves authored templates for config-write comparisons. Matching and explicit-set paths protect array identity and escaped reference intent; all branches serve data-preservation behavior rather than internal feature toggles.
562 src/agents/bash-tools.exec-request-preparation.ts READ; retained Env propagation is the exec security/identity boundary: plugin/store filtering, Gateway-only GitHub credentials, routing identity and node/sandbox distinctions. Preparation caches invalidate on host/workdir rewrites; no default-only option proven.
562 src/commands/doctor/shared/stale-plugin-config.ts READ; retained Environment selects installed plugin metadata/index state. Preservation options prevent deleting valid or uninspected config; incomplete discovery and restrictive allowlist handling are safety contracts. Heartbeat cleanup adjacency is excluded from proposed edits.
561 src/state/openclaw-agent-execution-incognito.ts READ; active-owner Full staged incognito actor read. Environment pins the canonical state directory, existingOnly controls borrowed actor lookup, and authority/worker cleanup preserve ephemeral ownership. Explicit P7c migration retention instruction applies; inactive comments do not authorize removal.
560 extensions/qa-lab/src/multipass.runtime.ts READ; retained Live-provider env forwarding, CODEX_HOME mapping, config transfer, redacted artifacts, and resource flags are active runner behavior. Rejected thinkingDefault deletion: cli.runtime.ts:961-970 passes it by spread and the guest command emits --thinking despite the exported Omit type.
559 src/plugins/memory-runtime.ts READ; retained VITEST/NODE_ENV expose isolated runtime reset. Public memory-host-search exports closeActiveMemorySearchManagersCore under a stable SDK name; cfg no-op and legacy result adaptation cannot be removed as private knobs.
556 packages/terminal-core/src/table.ts READ; retained TERM, TERM_PROGRAM and WT_SESSION select Unicode versus ASCII borders on Windows. Public render options control real output geometry, ANSI/grapheme behavior and terminal-safe rendering; no unused env knob found.
556 src/commands/doctor-session-transcripts.ts READ; retained Environment selects state/config scope and recovery command hints. Repair and post-session migration controls coordinate retained legacy sources and current SQLite row repairs; old names alone do not justify removal.
556 src/infra/state-migrations.legacy-sessions.ts READ; retained Environment pins the detected state root. Deferred plugin sources, alias/owner checks, SQLite-family preservation, reversible moves, and migration receipts protect persisted state; legacy names alone do not justify removal.
555 src/cli/update-cli/update-finalization-lifecycle.ts READ; retained UPDATE_RUN_ID_ENV and POST_CORE_UPDATE_ENV bind the inherited update driver and ledger. Captured env, phase budgets, custody, cancellation, and teardown diagnostics preserve finalization/recovery authority.
554 apps/macos/Sources/OpenClaw/CuaDriverHostCoordinator.swift READ; retained CUA_DRIVER_* environment and serve arguments establish embedded daemon/TCC ownership, liveness and managed mode. Injection points isolate process/readiness/permission tests; no Codex CUA environment deletion proposed.
554 src/agents/worktrees/snapshot-host.ts READ; retained env binds snapshot registry/state ownership; fixed GIT_NO_LAZY_FETCH, GIT_NO_REPLACE_OBJECTS and GIT_OPTIONAL_LOCKS protect exact-ref verification. Exact-state versus ordinary expiry paths preserve different recovery custody and cannot be retired as old-name compatibility.
554 src/state/openclaw-agent-db-registry-listing.ts READ; retained Environment is captured for the selected state registry. Schema inclusion, artifact preservation and unchangedBy witnesses implement maintenance/read custody and exact transaction publication semantics.
553 src/agents/model-catalog.ts READ; retained Model catalog knobs select read-only/static startup versus provider augmentation and metadata scans; env is auth/routing input. ingress.timing is diagnostic configuration. Route variants and provider outcomes retain distinct contracts.
552 src/agents/auth-profiles/oauth.ts READ; retained Only direct env conditional exposes the test API. forceRefresh, allowProfileFallback and validateOAuthCredential distinguish refresh, fallback and credential-validation behavior; degraded-secret ownership and cancellation cannot be collapsed.
551 src/infra/worker-native-lifecycle.ts READ; retained Worker environment capture and SHARE_ENV are native WorkerOptions semantics. Runtime generation, resource descriptors and broker retirement preserve physical cleanup custody.
550 apps/linux/src-tauri/src/runtime_action.rs READ; retained OPENCLAW_SQLITE_LIBRARY selects the explicitly bundled SQLite library; both install commands and generated wrappers clear inherited OPENCLAW_SQLITE_LIBRARY/LD_LIBRARY_PATH before selecting the admitted runtime. Runtime confirmation binds expected pin, service revision, config path and port; fresh versus existing-service modes have distinct authorization and recovery behavior. SQLite selection is documented in docs/install/bun-compatibility.md; no default-only internal knob proven.
550 src/system-agent/config-redaction.ts READ; retained Env scopes current plugin metadata for model-visible redaction; no runtime rediscovery occurs. Sensitivity and dynamic-owner branches preserve secrets even on invalid config. One trivial private default parameter was insufficient grounds for a material candidate.
546 src/agents/subagents/swarm/swarm-scheduler.ts READ; retained Fast-test env changes retry delay and VITEST/NODE_ENV expose isolated reset state. FIFO holds, launch/removal settlement and lifecycle ownership are substantive; enqueueSwarmRun and isSwarmRunActive both have production registry callers.
546 src/commands/doctor-tools-md-migration.ts READ; retained env selects durable migration archive; shouldRepair separates preview and mutation. Source hash, inode/read-permission checks and preserved beta artifacts protect operator files; no migration deletion based on age.
545 extensions/browser/src/browser/config.ts READ; retained Documented OPENCLAW_BROWSER_HEADLESS plus DISPLAY/WAYLAND_DISPLAY implement explicit override and missing-display behavior. Config/profile knobs include transport, relay, SSRF and headless contracts; remaining timeouts are already canonical constants.
545 src/config/io.runtime.ts READ; retained Environment capture and pinned async publication guard source changes; config read/write modes serve distinct observation, migration, and runtime activation paths. clearConfigCache is a no-op but remains exported by the public runtime-config-snapshot SDK subpath, so retained.
545 src/config/sessions/session-accessor.entry-mutation.ts READ; retained Session mutations freeze storage environment and physical identities before yields. Worker preparation and same-session metadata merging preserve custody, FIFO settlement and abort mutation fencing.
544 src/security/install-policy.ts READ; retained security.installPolicy exec env/passEnv, output bounds and timeout settings form an explicit policy-process contract; empty baseEnv deliberately restricts inherited credentials and limits fail closed.
543 src/cli/update-cli/update-command-initialization-run.ts READ; retained OPENCLAW_UPDATE_RUN_ID and scoped target env preserve original updater identity. Initialization/capture policy and candidate admission branches support different installed schema generations and artifact targets.
541 extensions/discord/src/monitor/provider.lifecycle.ts READ; retained READY and runtime READY timeout envs are documented in docs/channels/discord/troubleshooting.md. Both use bounded positive parsing; lifecycle reconnect, fatal-close and stale-socket settlement are active behavior.
539 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-shared.ts READ; retained OPENCLAW_QA_MATRIX_NO_REPLY_WINDOW_MS is documented in QA operator flow and bounds negative-reply evidence. Scenario flags and client/context options cover distinct topology, mention, sync-cursor, and restart contracts.
538 src/agents/bash-process-registry.ts READ; active-owner Active heartbeat closure. OPENCLAW_BASH_JOB_TTL_MS is documented; pending-output and retention state enforce delivery and cleanup. child is explicitly retained for public SDK declaration compatibility.
537 extensions/twitch/src/setup-surface.ts READ; retained OPENCLAW_TWITCH_ACCESS_TOKEN is exposed by the setup wizard and only applies to the default account; access/role/group options are user-facing channel configuration.
537 src/infra/update-candidate-plugins.ts READ; retained env and OPENCLAW_DISABLE_BUNDLED_SOURCE_OVERLAYS bind source discovery to the candidate package during private update projection. Locator/record hashes, symlink identity and revalidation preserve safe update isolation.
534 src/infra/deferred-plugin-migrations.ts READ; retained Update environment markers change actionable warning wording. Artifact-preserving reads, expectedPending checks, and completion/rollback scopes preserve durable migration obligations across asynchronous writes.
534 src/plugins/management-uninstall.ts READ; retained CLI versus management environment/config selection is deliberate; keepFiles, runtime application/deferral, and clawManaged preserve package ownership, drainage, and config/index commit semantics.
533 extensions/llama-cpp/src/external-server/setup.ts READ; retained Environment participates in provider API-key resolution and header SecretRefs. Guided, interactive, and noninteractive setup preserve endpoint-specific credential removal and model discovery; options are public setup/config contracts.
533 src/commands/doctor-auth.ts READ; retained GH_TOKEN/GITHUB_TOKEN only trigger a one-time retired ambient-Copilot notice; COPILOT_GITHUB_TOKEN preserves explicit auth. Keychain/read-only options and legacy Codex/shared-auth notices serve active Doctor migration and recovery, not runtime fallback knobs.
533 src/infra/provider-usage.auth.ts READ; retained Provider API-key/env/profile and plugin metadata gates avoid unnecessary runtime imports; VITEST environment merge preserves isolated manifest discovery. Store/auth injection and OAuth-only classification retain real credential-source and SecretRef contracts.
532 apps/macos/Sources/OpenClaw/CommandResolver.swift READ; retained PATH and stored project/CLI settings implement macOS runtime discovery. DEBUG source helpers, active-profile filtering and SSH host-key policy encode build/profile/security contracts.
532 src/gateway/server-restart-sentinel-notice.ts READ; retained VITEST reduces recovery spacing for bounded delivery tests; production retains 45-attempt durable queue custody, platform-send evidence and permanent completion retention. No default-only knob proved.
531 src/infra/state-migrations.managed-outgoing-images.ts READ; retained Doctor-only gate and explicit state env bind legacy media import to its owner. TTL/time and claim/verify/remove seams support expiry and rollback/failure behavior; claim recovery and byte verification preserve historical artifacts.
530 src/commands/doctor-sqlite-nocow.ts READ; retained Only environment mutation removes POSIXLY_CORRECT for ACL tools. File identity, ACL preservation, open-handle checks, WAL-aware snapshots and atomic exchange are offline durability safeguards.
530 src/commands/doctor/shared/codex-route-warnings.ts READ; retained Doctor owns config/session route migration and diagnostics. Computer-use settings and custom app-server command warnings are authored config contracts; no Codex behavior change proposed.
529 extensions/openai/realtime-voice-session-policy.ts READ; retained OPENAI_API_KEY fallback, explicit configured credential precedence, keychain references, Azure tool-name limits and Realtime VAD/voice fields are real provider/session policy contracts.
529 src/secrets/target-registry-query.ts READ; retained Env scopes plugin/channel secret contract discovery; core and channel indexes avoid full plugin materialization. Target-id/type/path distinctions and legacy array matching are plan contracts, not unused flags.
528 src/infra/restart-intent.ts READ; retained env binds the restart intent database and service owner. Explicit v2026.9.4 legacy-lock upgrade contract, current process identity, target PID and payload-scoped cleanup retain authority across handoff.
527 src/flows/doctor-health-contributions-initial.ts READ; retained Environment selects real Doctor config/state owners. defaultEnabled and updateWork vary by contribution; retained legacy dependency selector explicitly preserves the stable v2026.8.1 CLI identity.
526 src/plugins/installed-plugin-index-store-write.ts READ; retained Env selects database and compatibility host identity. preserveAdmissions is false for direct writes and true for refreshes; policy fast path, caller lease, revision rollback, and live metadata invalidation each have active ownership roles.
525 src/daemon/launchd-service-files.ts READ; retained Environment owns service identity, private env-file publication and TMPDIR permissions. Empty NODE_OPTIONS clears inherited flags; OPENCLAW_SERVICE_VERSION retirement and exact generated-wrapper recognition preserve published installation upgrades.
525 src/logging/subsystem.ts READ; retained TERM/COLORTERM/TERM_PROGRAM, FORCE_COLOR/NO_COLOR and Windows GITHUB_ACTIONS handling implement terminal output contracts. Dynamic verbosity, diagnostic interest and redaction distinctions are meaningful sink behavior.
524 extensions/memory-core/src/memory-forget.ts READ; retained Environment pins the agent database state root. dryRun is a user-facing nonmutating path; lineage reprepare, tombstones, workspace locking and exact-content rewrites preserve selective forget and retry behavior.
524 src/infra/update-immutable-service.ts READ; retained OPENCLAW_SYSTEMD_UNIT, state/config/profile env values bind service identity. allowStopped/allowStarting distinguish adoption, activation and recovery; current process/cgroup checks cannot be removed as knob plumbing.
523 src/config/sessions/session-accessor.pending-inputs.ts READ; retained Environment is captured before pending-input preparation to bind exact transcript storage. Completion tracking, replay fingerprints, distinct current assertions, and settlement preserve idempotency and durable input custody.
523 src/infra/clawhub-client.ts READ; retained URL/token/config-path variables support registry selection and external ClawHub CLI credentials; CLAWDHUB variants explicitly retain older CLI spelling compatibility. Timeout/size/retry controls bound real HTTP requests.
523 src/plugins/git-install.ts READ; retained Git environment tombstones constrain clone execution; safe npm env selects staged dependency installation. dryRun, update, deferred commit and publication assertions are active installer/consent responsibilities.
522 src/commands/doctor-gateway-health.ts READ; retained Process state/config environment locates the exact service and reports mismatches. Credential-exec opt-in, remote mode and diagnostic time budgets preserve read-only health and slow-host behavior, not unused tunables.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

l379 environment-owner coverage

Fully READ 1,211 inventoried environment-reading modules over 200 lines (626,062 inventory lines), including root launchers and native Rust/Python/JavaScript owners. This is the cross-cutting environment-owner inventory, not a claim that every unrelated monorepo module was read. Named test/generated/script paths and reserved audit/cron trees were excluded from discovery; remaining test-infrastructure false positives are identified in row reasons. Counts refer to the read snapshot; changed owners/callers were subsequently reviewed and tested. Documented contracts and active-owner candidates were retained.

Part 4/8, descending original size.

READ coverage 4/8
Lines File Read/disposition Finding
522 src/plugins/installed-plugin-index-record-reader.ts READ; retained Environment is captured for installed-index/root selection and cache identity. Recovery preserves ledger authority, selected npm generations and compatible persisted selectors; options represent real paths and recovery conditions.
520 src/infra/shell-env.ts READ; retained OPENCLAW_LOAD_SHELL_ENV, OPENCLAW_DEFER_SHELL_ENV_FALLBACK and OPENCLAW_SHELL_ENV_TIMEOUT_MS support explicit shell import/defer/budget behavior. Sync/async probes share sanitized startup input and preserve terminal isolation.
518 src/gateway/server-reload-managed-secrets.ts READ; retained Runtime environment travels with config transaction ownership and is published at the secrets/runtime commit edge. Revision/lineage checks, source-only publication, rollback and auth-client generation invalidation are active lifecycle responsibilities, not default-only knobs.
518 src/infra/state-migrations.debug-proxy.ts READ; retained Environment selects the target shared-state DB; this is data migration of legacy capture SQLite/blobs with conflict checks and resumable archiving, not a debug feature gate. No migration deletion proposed.
517 extensions/qa-lab/src/mantis/run.runtime.ts READ; retained Environment is passed to real Git/pnpm lane commands. Baseline/candidate, runner, timeout, fast/build/install controls support the QA command; transport is a validated public option.
515 extensions/feishu/src/client.ts READ; retained OPENCLAW_PROXY_ACTIVE distinguishes mandatory managed proxy routing from ambient proxy defaults. Cached agents retain generation cleanup; request and redirect fences preserve read/send authority.
515 extensions/telegram/src/telegram-ingress-drain.ts READ; retained OPENCLAW_TELEGRAM_SPOOLED_HANDLER_TIMEOUT_MS is explicitly retained by Telegram AGENTS as the adoption stall control. Poll timing and dispatch callbacks feed the shared ingress owner; legacy lane reconciliation preserves signed-release spool inputs.
514 src/state/openclaw-agent-worker-store.ts READ; retained Captures env/state/database identity and retains admitted executor ownership across queued writes, close, shutdown and publication settlement. retainExecutionUntilClose is lifetime control, not an ambient feature flag.
512 extensions/qa-lab/src/gateway-child-setup.ts READ; retained QA child env/options isolate fixture home/state, packaged candidates, mock/live auth and transport boundaries. Packaged bootstrap stripping and same-port env publication prevent accidental operator Gateway access; controls are behavior-test contracts.
512 src/gateway/worker-environments/workspace-sync-scripts.ts READ; retained HOME selects worker-owned manifest storage. Eligible/publish/resolve/memo modes have real adapters; maxHashMemoBytes has node-worker and sync-helper callers, so it is not a default-only knob.
511 src/agents/cli-runner/cli-run-transcript.ts READ; active-owner Active heartbeat-owned path in supplied exclusion list. Environment snapshots bind transcript fallback writes to state ownership; persistence suppression, yielded progress, and context-engine paths carry user-turn and lifecycle contracts.
508 src/config/sessions/session-accessor.sqlite-scope.ts READ; retained Environment snapshots bind database path and lifecycle. Foreground/worker write admission, target-resolution cache, diagnostics, incognito native ownership, and legacy artifact marker retain explicit storage/plugin contracts.
507 src/infra/update-migrated-finalize.worker.ts READ; retained Worker flags and private environment markers are installed-updater handoff contracts. Explicit v2026.9.3 grantless-parent support restores captured TMP selectors and retains original installation/executor authority; not eligible as an old-name cleanup.
507 src/state/openclaw-agent-db-admission.ts READ; retained Environment is copied before async admission so path and permission inputs cannot drift. Callback/integrity/repair options enforce physical owner and live authority at operation and commit; no default-only knob proved.
506 src/agents/cli-credentials.ts READ; retained CODEX_HOME is an external CLI state contract. Keychain prompting, platform/exec injection, TTL, and source fingerprints support active credential discovery and refresh without cross-home credential selection; no Codex behavior change proposed.
506 src/gateway/server-plugin-subagent-runtime.ts READ; retained Environment only resolves manifest metadata for model policy. Override, tools, synthetic-scope and runtime-lifetime options enforce plugin subagent authorization; preserve the public runtime contract and post-await guards.
505 extensions/codex/src/migration/apply.ts READ; retained Migration plugin-list timeout bounds curated-marketplace discovery and has a focused timeout test consumer. Auth/config reconciliation and app-server leases carry migration contracts. No Codex behavior change proposed without sibling source audit.
505 src/config/sessions/session-transcript-worker-readers.ts READ; retained Environment capture binds worker reads to transcript storage; read variants implement concrete metadata/history protocols, bounded transfers and result-kind validation. No unused feature knob established.
504 src/agents/sessions/session-manager-metadata.worker.ts READ; retained Session metadata worker borrows the canonical actor connection and captures its environment. Message controls carry pending-input custody, commit admission, projection settlement, and replay fences; no removable knob.
504 src/config/sessions/session-accessor.sqlite-replacement-worker.ts READ; retained Frozen env and callbacks bind worker execution, native admission, transaction facts, publication and cleanup. Retained executor/preparation options are lifecycle seams, not unused flags.
504 src/gateway/server-reload-managed.ts READ; retained process.env feeds database restart admission; transaction runtime-environment publication/rollback is owned here. minimalTestGateway, recovery availability and runtime overlay options carry explicit lifecycle behavior and preserve async context across in-process restarts.
503 src/gateway/server-methods/session-create-project.ts READ; retained process.env supplies configured GitHub credential selection; setup execution is derived from current admin authority. Saved workspace intent, explicit repository modes and commit guards preserve admitted session ownership.
501 src/cli/completion-cli.ts READ; retained COMPLETION_SKIP_PLUGIN_COMMANDS_ENV has real updater and release-check callers so completion repair can avoid plugin activation. Public shell/install/write-state flags are retained; no private default-only flag proven.
501 src/infra/update-candidate-snapshot.ts READ; retained TMPDIR/TMP/TEMP choose capacity-checked snapshot destinations; explicit child environment allowlist retains candidate isolation. Progress, cleanup uncertainty, measured allocation, and worker budgets are update safety behavior.
500 src/commands/doctor-auth-migration-receipts.ts READ; retained env binds durable migration receipts to the correct state owner. Fingerprints, locks, completed-receipt recovery and archive compensation protect persisted credentials; VITEST/NODE_ENV only exposes focused test API.
498 src/commands/doctor-update-rehearsal-inventory.ts READ; active-owner Active heartbeat owner path. Exact environment markers and cleared selectors prove a disposable update rehearsal remains local before plugin/database admission; preserve isolation and update-driver contracts.
497 apps/macos/Sources/OpenClaw/MenuBar.swift READ; retained One private DEBUG-only environment startup trigger duplicates the existing Debug-menu pairing demo action. Full repository search found the env name only here and no docs, CI or test consumer; retain the shared demo and menu. Retained: shared pairing-demo owner DebugActions.swift belongs to the reserved heartbeat work.
497 extensions/imessage/src/client.ts READ; retained NODE_ENV/VITEST guard prevents tests from starting the real imsg helper. Configured CLI/database/remote paths and request timeouts serve actual RPC callers; close, reap, and bridge-stall recovery gates are meaningful lifecycle behavior.
497 extensions/qa-lab/src/suite-planning.ts READ; retained OPENCLAW_QA_SUITE_CONCURRENCY and OPENCLAW_QA_SUITE_WORKER_START_STAGGER_MS control real worker scheduling; CI sets stagger explicitly. Scenario env, isolation, transport policy and injectable sleep preserve QA workload contracts.
497 src/commands/status-all/diagnosis.ts READ; retained process.env chooses supervised/native Gateway log locations. Diagnostic switches reflect observed Gateway/channel state; activity and output bounds are fixed reporting policies rather than ambient tuning.
497 src/daemon/service-definition-backup.ts READ; retained Environment selects exact native definition artifacts; OPENCLAW_WINDOWS_TASK_HIDDEN_LAUNCHER=1 inventories the wrapper for backup. Receipts and mutation hooks protect recoverable service restoration.
496 src/agents/shell-snapshot.ts READ; retained OPENCLAW_EXEC_SHELL_SNAPSHOT is documented in exec/environment/embedding docs. enabled is nonconstant: bash-tools.exec-host-spawn sets it from params.execCommand to protect bound execution plans. Trusted env capture/filtering and runtime restoration remain required.
496 src/meeting-bot/transcripts-bridge.runtime.ts READ; retained Environment fixes transcript storage root. isEnabled is supplied by SessionDurableTranscripts as live policy, not a test-only/default-only option; lifecycle and ingestion queues preserve final capture and subscriber ownership.
496 src/security/audit-plugins-trust.ts READ; active-owner Full file read. OPENCLAW_STATE_DIR scopes hook-install evidence; plugin allow/deny, native-skill exposure, tool-policy, and registry integrity findings are active audit behavior. Audit mutation excluded by task scope.
496 src/wizard/setup.migration-stage.ts READ; retained OPENCLAW_STATE_DIR separates staged and final databases; projection, phased promotion and recovery retention implement onboarding migration ownership.
495 src/agents/embedded-agent-runner/run/attempt-setup.ts READ; active-owner Active heartbeat overlap. env reaches provider runtime handle resolution; mid-turn precheck, cache TTL and server-clearing flags carry real config/provider contracts. Transform installation and removal share lifecycle ownership.
495 src/proxy-capture/proxy-server.ts READ; retained Managed-proxy direct-connect override is documented in docs/cli/proxy.md and exercised through real HTTP/CONNECT boundary tests. Private assertion env parameter is always defaulted, but removing it saves zero lines; no substantive candidate.
494 extensions/qa-lab/src/suite-run-standard.ts READ; retained OPENCLAW_QA_KEEP_TEMP retains owned runtime artifacts and is documented in docs/help/testing/qa-runners.md. Runtime patches, failure preservation, parity capture and cleanup/evidence options select real QA behavior.
494 src/infra/update-startup-auto-run.ts READ; retained Supervisor env selects supported managed handoff; campaign identity, repeated Doctor-failure backoff, cancellation and sentinel revision checks preserve update custody. No removable user-independent control proved.
493 packages/ai/src/providers/google-interactions-shared.ts READ; retained GEMINI_API_KEY/GOOGLE_API_KEY supply provider credentials after explicit options. Payload hooks and debug host logging are transport contracts; streaming completion/error and cleanup behavior has no private env toggle.
493 src/plugin-state/plugin-state-store.sqlite.ts READ; retained Env is state-database selection; TTL, overflow, CAS and bounded import/delete operations are plugin-state contracts. Infinite aggregate capacity preserves the Doctor API while keyed state owns retention.
492 src/infra/update-doctor-result.ts READ; retained OPENCLAW_UPDATE_POST_INSTALL_DOCTOR_RESULT_PATH is package-parent/Doctor-child IPC. Config/database receipts, hashes, refusal/advisory outcomes, and safe temporary-path validation are recovery contracts.
490 src/infra/state-migrations.transcript-directives.ts READ; retained Environment selects migration targets and maintenance leases. Prepared target/discovery inputs avoid repeated census; bounded cursors preserve current and archived transcript migrations and cannot be retired based on naming age.
489 extensions/qa-lab/src/live-transports/matrix/substrate/e2ee-client.ts READ; retained OPENCLAW_STATE_DIR namespaces isolated QA plugin state. Crypto bootstrap, timeouts, private-network access and shutdown are used by real encrypted scenario clients and protect independent participant stores and media-operation settlement.
488 extensions/memory-core/src/dreaming-dreams-file.ts READ; retained TZ is used for narrative dates. Backfill timezone is currently unused, but the helper and timezone field are exported by extensions/memory-core/api.ts and src/plugin-sdk/memory-core-bundled-runtime.ts and passed by three production callers; retain rather than break the SDK shape.
488 src/gateway/server/ws-connection/connect-hello.ts READ; retained process.env is passed only to runtime service version resolution. Advertised capabilities, auth recovery scope, bootstrap settlement, and health refresh are protocol/lifecycle behavior; no environment knob to delete.
486 extensions/whatsapp/src/session.ts READ; retained OPENCLAW_WHATSAPP_WEB_SOCKET_URL is a shipped July contract (docs/releases/2026.7.1.md:687); explicit socket override, proxy env, timing and directory mode support real connection/proof behavior. Credential hooks fence persistence.
486 src/agents/auth-profiles/usage-write.ts READ; retained Captures scoped env/state before async owner selection. Env-only auth mode intentionally skips persistent usage; FIFO reservations, mutation tokens, inherited ownership and unknown-outcome invalidation are active lifecycle boundaries.
486 src/config/sessions/session-store-target-inventory.ts READ; retained Env is cloned with platform semantics and pins OPENCLAW_STATE_DIR before worker discovery. Configured/recovery/read selections and registry mutation filters retain physical generation and incognito ownership contracts.
486 src/infra/state-migrations.exec-approvals.ts READ; retained Doctor-only migration flag gates security-policy inspection/import. Before-claim/verify and remove-source controls support source-change/failure proof; receipts and archived empty stubs retain policy recovery.
485 extensions/crabbox/src/crabbox-worker-node-enrollment.ts READ; retained Environment carries private bootstrap/enrollment credentials, stripped before child creation, plus actual platform/session state. Desktop and runtime modes select real enrollment versus immutable snapshot behavior.
485 src/infra/package-lifecycle.ts READ; retained process.env is inherited by package lifecycle scripts. Timeout/runScript and wait-versus-refuse modes support update work and safe disposal. Shipped lifecycle markers, retained locks and settlement checks are upgrade boundaries.
484 extensions/qa-lab/src/live-transports/slack/adapter.runtime.ts READ; retained OPENCLAW_DEBUG_PROXY_ENABLED/SESSION_ID provide native-write evidence. agentE2e changes lease health, write deadlines, final receipts and cleanup semantics; adapter option and lifecycle paths are meaningful QA controls.
484 src/channels/plugins/bundled.ts READ; retained Environment selects bundled setup roots. Artifact kinds, failure/recursion isolation, source-bound caches, and setup/secrets fallbacks implement actual lightweight/full plugin contracts; no unused knob proven.
484 src/gateway/tools-invoke-shared.ts READ; retained VITEST-only memory diagnostics explain intentional plugin-slot test defaults. Invocation role, scopes, uploads, approval mode and current-authority guards are HTTP/RPC boundary contracts.
483 extensions/matrix/src/matrix/client/storage.ts READ; retained env/stateDir select isolated canonical state; device/token-root selection preserves token rotation. SQLite compare-and-apply fallback explicitly supports the published >=2026.9.4 host floor; legacy sync-cache migration remains an upgrade contract.
481 src/commands/doctor-skill-workshop-sqlite.ts READ; retained Environment separates source paths from lint state snapshots and rehearsal read-only paths. Legacy proposal, rollback and backup relocation is migration recovery, not dead tunable machinery.
481 src/config/sessions/session-transcript-reconcile.worker.ts READ; retained OPENCLAW_STATE_DIR and external supervisor mode reconstruct the captured worker lease owner. Disk/memory/release variants, source identity, chunk bounds, schema checks, and final release preserve reconciliation custody.
481 src/node-host/node-worker-container-engine.ts READ; retained Docker/Podman endpoint and connection env are pinned to admitted daemon identity. Worker HOME/PATH/tmp/cache/CA rewrites support container execution; lifecycle labels and revalidation protect cleanup ownership.
481 src/state/openclaw-state-db-read-connection.ts READ; retained Environment participates in fresh-open admission for streamed reads. Retained-reader and snapshot options control native handle custody, schema admission and cleanup, with no feature flag to remove.
480 extensions/qa-lab/src/mantis/run-cleanup.runtime.ts READ; retained process.env is passed to Git cleanup; commandTimeouts retain one total cleanup deadline. removeLegacyMantisWorktrees has a production caller in mantis/run.runtime.ts:411 and protects ownership receipts.
480 src/agents/agent-lifecycle-registry.ts READ; active-owner Active heartbeat owner path and cron receipt authority integration. Environment binds the selected shared database; deletion journal, leases, transaction publication, rollback, and cleanup fencing are live authority.
479 extensions/zalouser/src/channel.adapters.ts READ; retained ZALOUSER_PROFILE/ZCA_PROFILE are documented in docs/channels/zalouser.md and declared by package channel metadata. resolveZalouserQrProfile has three production callers in channel.ts; lazy channel runtime and delivery adapters remain active.
479 src/infra/update-repair-agent.runtime.ts READ; retained Environment restore/scrub logic isolates repair targets while retaining host-owned executable/credential selection. Doctor repair markers prevent activation; model/tool policy, budgets, maintenance handoff, and cleanup are real authority boundaries.
478 src/agents/auth-profiles/sqlite.ts READ; retained Env/stateDir/sharedStoreWrite retain selected credential database ownership and migration bootstrap; agent/shared-state paths, transaction admission and prepared owner all have meaningful contracts.
477 extensions/amazon-bedrock-mantle/discovery.ts READ; retained AWS bearer-token and region variables implement provider auth and endpoint selection. Strict discovery propagates catalog failures; enabled, clock/fetch/token-provider seams govern real opt-out and credential/cache behavior.
477 src/agents/command/prepare.ts READ; active-owner Active heartbeat-file owner exclusion. process.env reaches prepared plugin metadata; timeout/thinking/session flags are actual command controls, and ACP/worktree preparation retains admitted lifecycle authority.
477 src/commands/agent-exec.ts READ; retained OPENCLAW_STATE_DIR/CONFIG_PATH/WORKSPACE_DIR are temporarily redirected and restored for one-shot isolation. isolated/authEnvOnly select credential and installed-plugin inheritance; cleanup preserves retained-state and lock ownership.
477 src/plugins/current-plugin-metadata-snapshot.ts READ; retained Environment fingerprints and plugin scope flags prevent reuse across discovery owners. Immutable generations, synchronous-policy preparation, workspace compatibility and current-cache admission are distinct paths; no unused flag identified.
477 src/plugins/update-channel.ts READ; retained Environment selects installed/bundled plugin paths and lifecycle ownership. Channel, skip IDs, source bridges, timeouts and capability consent govern actual update migrations and cannot be collapsed to defaults.
477 src/sessions/session-upstream-monitor.ts READ; retained Process-home fallback is constrained by install identity. VITEST/NODE_ENV publishes the bounded tick test API consumed by monitor and canonical-descendant integration tests; idle/provenance/current-link checks guard settlement.
476 src/agents/embedded-agent-runner/run/attempt-system-prompt-prepare.ts READ; retained System prompt preparation passes process environment to provider policy and preserves full/minimal/raw/finalization modes. Tool generations, permission refresh, memory contributors, and current-run assertions are active behavior.
475 extensions/facetime/src/audio-pump.ts READ; retained HOME selects installed SoX; child env strips credential-shaped names. Spawn injection and playback clocks support real native capture/playback tests; suppression readiness, drain callbacks and termination protect media lifecycle.
475 src/infra/update-failure-report-prepare.ts READ; retained Environment is redaction context and state-root selection. Bounds, public-code projection, preview digest, and reconciliation marker protect explicitly reviewed report content.
473 extensions/discord/src/monitor/thread-bindings.state.ts READ; retained VITEST/NODE_ENV disables default persistence for test isolation. Account-scoped tokens, bindings, webhooks, lifecycle durations, and shared source/dist registry are active state owners; async/sync loading handles concurrent compatibility readers.
473 src/acp/server.ts READ; retained Environment enters canonical Gateway bootstrap. CLI aliases/options are explicitly parsed and help-documented; startup buffering, reconnect, ledger shutdown, and protocol-version normalization preserve external ACP client contracts.
473 src/commands/status.scan.shared.ts READ; retained Environment selects Gateway origin/auth scope and status runtime. Probe budgets, readiness, local fallback, skip/detail controls, native versus legacy memory-provider paths, and existing-store-only checks serve real status behavior. No material safe deletion proven.
473 src/flows/doctor-tool-schema-runtime.ts READ; retained Environment determines update lint deferral, metadata scope and runtime schema inspection. Requester/OAuth exclusions and disposal hooks prevent unauthorized probes or token rotation during read-only Doctor inspection.
472 extensions/browser/src/browser/extension-install-layout.ts READ; retained HOME/USERPROFILE, CHROME_CONFIG_HOME/XDG_CONFIG_HOME and LOCALAPPDATA implement Chromium platform location contracts. Ownership checks, stable-copy receipt and unpacked/store extension identity are live install boundaries.
472 src/infra/exec-approvals-config.ts READ; retained OPENCLAW_STATE_DIR is the real profile/state locator. Defaults, schemas and legacy normalization protect persisted exec approval/socket policy; removal would alter security or migration contracts.
472 src/infra/push-apns-store.ts READ; retained OPENCLAW_STATE_DIR/baseDir binds registration operations to the selected SQLite owner. Direct/relay discrimination, environment normalization and expected pairing generation protect real APNs contracts; worker admission fences writes.
470 src/config/sessions/session-accessor.sqlite-replacement-projection.ts READ; retained Environment is captured before selecting database scope. Selection, canonical aliases, creation, reset consumption, maintenance preservation and worker/native commit paths serve distinct session mutation contracts with live authority and row CAS.
470 src/security/audit-gateway-config.ts READ; active-owner Security audit owner retained; no audit mutation proposed. Supplied env and auth overrides must match actual gateway credential resolution; dangerous flag collection, bind, proxy and rate-limit configuration are intentional operator/security contracts.
469 src/process/exec-spawn.ts READ; retained Command spawning owns environment normalization, broker selection, cancellation, and process-tree settlement. shouldSpawnWithShell is an exported process-runtime SDK safety contract despite returning false; retain the public seam.
468 src/commands/doctor/shared/plugin-tool-allowlist-warnings.ts READ; retained Environment feeds trusted manifest metadata only. Any/every modes reflect distinct allow/deny questions; config policies and MCP/plugin warnings implement documented user-visible selection semantics.
467 extensions/amazon-bedrock/embedding-provider.ts READ; retained AWS_REGION/AWS_DEFAULT_REGION and credential environment names implement AWS SDK integration. hasAwsCredentials injection supports meaningful static/bearer/chain/missing-package boundary tests; retained rather than counted as dead test-only machinery.
467 extensions/codex/src/app-server/transport-process-snapshot.ts READ; retained Environment use normalizes ps locale/timezone; procfs subprocess intentionally receives an empty env to suppress ambient preloads. Deadlines, process identity, byte limits, and selected/full scans protect cleanup containment.
467 src/commands/onboard-non-interactive/local.ts READ; retained Ambient env supplies service diagnostics and canonical Gateway probe auth. skip/install/bootstrap/auth flags come from onboarding CLI behavior; separate absent-Gateway and failed-install outcomes remain meaningful.
466 src/cli/config-cli-validation.ts READ; retained process.env resolves configured SecretRefs and plugin integrations. dryRun/allowExec, unchanged-candidate validation, selected refs, deferred migration guards, and prepared model env are public mutation/validation behavior.
465 src/plugins/capability-consent.ts READ; retained Environment selects authoritative plugin metadata, install records and lifecycle lease. Acknowledgment/review tokens, update-only enablement and persisted-surface checks enforce current capability consent.
464 src/cli/update-cli/update-command-service-plan.ts READ; retained Environment identifies service manager, installation root, runtime and gateway port. Inspection, retained-command and root-change options govern update admission and published-driver compatibility.
462 src/auto-reply/reply/commands-allowlist.ts READ; retained Environment selects the pairing store. Parsed resolve/scope/config/store options are actual slash-command inputs, with distinct authorization and DM/group write boundaries.
462 src/daemon/launchd-lifecycle.ts READ; retained Environment selects managed LaunchAgent identity. preserveDefinition/preserveAutoStart and mutation guards control restart/update recovery; protected PID checks and detached handoff ownership are substantive lifecycle behavior.
461 extensions/crabbox/src/crabbox-worker-profile.ts READ; retained setupEnv is an explicit allowlist with validation and missing-value failure; provider/target/desktop/warmImage/TTL are profile contracts, not private env overrides. Lease id and renewal-derived timing preserve allocation lifecycle.
461 extensions/cua-computer/src/mcp-driver-client.ts READ; retained Environment scrub prevents ambient CUA driver settings from selecting another embedded driver; child telemetry/update checks are explicitly disabled. MCP limits, enum adaptation, session start/disposal, and lazy runtime loading implement the driver contract.
461 src/cli/update-cli/status.ts READ; retained Install identity/Nix env controls service inspection and update-in-progress env formats deferred-migration guidance. JSON/human output includes real update, recovery, service, and channel facts; no removable mode proven.
461 src/gateway/cron-exit-watchers.ts READ; active-owner Protected cron closure: no mutation recommended. process.env is propagated to supervised watched commands; retry schedule, reservation fencing and cancellation settlement belong to the active cron lifecycle owner.
461 src/plugins/plugin-instance-module-loader.ts READ; retained JITI_JSX and Bun/Node capability checks choose real loader semantics; source capture, SDK aliasing, expected digests, recovery and per-instance module disposal are active plugin lifecycle boundaries.
460 apps/macos/Sources/OpenClaw/CloudWorkerHost.swift READ; retained Signed cloud host strips inherited profile/config/CUA/bootstrap inputs and sets lease-owned state plus CUA endpoint. CLI arguments and process receipts bind the leased runtime; environment handling is isolation-critical.
460 packages/ai/src/transports/anthropic-transport-stream.ts READ; retained ANTHROPIC_BASE_URL and provider key lookup are transport configuration. Interleaved-thinking, auth headers, compaction replay and refusal buffering select meaningful provider contracts.
460 src/infra/restart-handoff.ts READ; retained Env selects shared restart state. Clock/TTL/PID inputs enable bounded validation of supervisor handoffs and expiry; persisted shape and one-consumer semantics are real lifecycle contracts.
459 extensions/amazon-bedrock/discovery.ts READ; retained AWS_REGION/AWS_DEFAULT_REGION and credential-chain presence drive real Bedrock discovery. Discovery strictness, refresh/config defaults, clock/client injection and region routing are substantive public/catalog/test controls.
459 src/flows/doctor-health-contributions-final.ts READ; active-owner Contains heartbeat/cron migration contribution closure excluded by task. Other env use defers configured plugin repair during updates; health defaultEnabled and updateWork metadata define scheduling contracts.
459 src/plugins/provider-auth-persistence.ts READ; retained env/stateDir select protected credential store and per-profile locks. Staging versus login persistence and resetFailureState have separate callers; compensation retains unreverted profiles and fences concurrent commit.
458 src/infra/update-managed-service-handoff-control.ts READ; retained OPENCLAW_UPDATE_RUN_HANDOFF and NODE_DISABLE_COMPILE_CACHE are emitted for actual child phases. Private admission gate, lease-bound IPC, activation acknowledgment and joined process cleanup cannot be simplified as default-only knobs.
457 src/plugin-sdk/qa-runtime.ts READ; retained Public QA SDK supplies credential/runtime, Docker, port, health, and scoped-store cleanup contracts. Injectable command/fetch/sleep/timeouts support QA behavior; no SDK removal proposed.
456 extensions/openai/openai-chatgpt-device-code.ts READ; retained OPENCLAW_VERSION supplies upstream request headers. fetchFn, cancellation, current-authority callbacks, request bounds, and poll intervals are real auth/transport contracts. No Codex behavior change proposed.
456 src/agents/media-generation-task-status-shared.ts READ; retained Candidate: recent-start recorder still accepts taskLabel, providerId, and progressSummary even though current cache stores only taskId/runId/startedAt/requestKey. History shows metadata moved to the native operation owner in 4a0be71; inputs were left behind. Preserve all duplicate/status behavior and test reset controls. Retained: its necessary caller is now owned by open PR165198.
455 extensions/qa-lab/src/suite.ts READ; retained OPENCLAW_QA_SUITE_PROGRESS has process/release lane callers and CI fallback; OPENCLAW_QA_TRANSPORT_READY_TIMEOUT_MS is set by ci.yml, openclaw-release-checks.yml, qa-live-transports-convex.yml and qa-profile-evidence.yml. Cleanup/nested-run/metric controls support actual suite boundaries.
455 src/infra/backup-sqlite-snapshot.ts READ; retained Overrides OPENCLAW_STATE_DIR only to bind inventory-owned global/quarantine paths. Canonical owner validation, alias groups, audit witnesses, and source identity fences preserve backup contracts; no unused env option found.
454 extensions/memory-core/src/memory/manager-search-knn-subprocess.ts READ; retained Child env intentionally forwards only OS/path/temp essentials. Fixed global and per-database admissions have distinct limits; process lifetime, cancellation, output bounds and idle retirement are active safety/performance behavior.
454 extensions/ollama/src/embedding-provider.runtime.ts READ; retained Environment credential resolution honors explicit opt-out, SecretRef opacity and host-bound key/header ownership. Provider/remote config, dimensions and local-service acquisition are active; no public option deletion proved.
454 extensions/slack/src/setup-core.ts READ; retained SLACK_BOT_TOKEN/APP_TOKEN/USER_TOKEN are setup credential sources restricted to the default account. Bot/user identity and socket/http modes alter required credentials; shared token helper has four real callers.
453 src/infra/device-identity-store.ts READ; retained Environment selects canonical identity database; identityKey scopes persisted rows. Legacy importer markers, key-material validation/salvage, read-only bootstrap handling, and transactional insertion preserve pairing continuity.
453 src/storage/locations.ts READ; retained Environment is passed to canonical SecretRef and provider resolution. Encryption, scoped key validation, aborts, and mutation preconditions preserve configured storage identity and publication safety.
452 extensions/discord/src/monitor/gateway-plugin.ts READ; retained Env resolves gateway metadata timeout; debug proxy and configured proxy select real transports. Testing injection supports socket/register behavior; shipped SDK capture fallback has an explicit minimum-version contract.
452 extensions/elevenlabs/speech-provider-factory.ts READ; retained XI_API_KEY participates in speech credential fallback; configured Talk keys retain explicit precedence. Voice/model/normalization/seed/latency/output choices are provider-facing config and speech contracts.
452 src/daemon/service.ts READ; retained Process/selected env enforce service ownership; gateway/node kind and platform adapters preserve separate service identities. Runtime pins, rebind capture and native mutation guards are lifecycle authority.
452 src/infra/net/proxy/proxy-validation.ts READ; retained OPENCLAW_PROXY_URL participates in explicit override/config/env precedence. Allowed/denied canaries, APNs reachability, CA and injected checks implement distinct validation contracts.
451 src/agents/command/acp-lifecycle.ts READ; retained Proxy environment reads emit only present key names for ACP diagnostics. auditOnly/completionSource and tool lifecycle tracking protect event/terminal semantics; audit-related behavior retained.
451 src/config/validation-plugin-config.ts READ; retained env resolves authored paths and Codex diagnostics. Defaults/deferred-plugin/compat markers distinguish validation, migration and authored opt-outs; no removable default-only policy identified.
450 src/logging/logger-file-transport.ts READ; retained VITEST changes exit-hook installation for isolation. Appender and queue-size controls support bounded overflow, pending-append and forced-exit behavior; transport generation and draining have active ownership.
448 extensions/crabbox/src/crabbox-managed-binary.ts READ; retained Environment binds managed binary storage and child execution; binary/cwd/runner/signal seams select live acquisition. Version/download budgets, checksum proof, publication recovery, and shared waiter cancellation have real contracts.
447 src/cli/skills-cli.format.ts READ; retained No ambient environment read: reports skill env requirements and config-path guidance. JSON/eligible/verbose/agent options are CLI contracts; legacy curator status is an explicit compatible protocol type.
446 src/agents/main-session-recovery/main-session-restart-recovery-marking.ts READ; retained Environment supplies default state root. Active IDs, timestamps, lifecycle revisions and commit guards protect restart recovery from live owners and yielded continuations; these are authority facts, not knobs.
446 src/cli/program/register.onboard.ts READ; retained CLI setup/auth/runtime flags are registered and consumed through Commander and wizard owners; gateway-token env reference is a user-facing SecretRef option, not a hidden process flag.
445 src/config/sessions/transcript-write-context.ts READ; retained Captured storage env participates in exact target comparisons. Optional writer/initial-writer/metadata contexts represent different admitted lifecycle states; fences and assertions must remain through asynchronous writes.
444 extensions/googlechat/src/google-auth.runtime.ts READ; retained HTTP_PROXY/HTTPS_PROXY/NO_PROXY handling adapts google-auth-library agent/proxy/TLS contracts to SSRF-guarded fetch. Credential field and response bounds are security constraints, not unused switches.
444 src/commands/onboard-helpers.ts READ; retained GIT_COMMIT/GIT_SHA record wizard provenance. Probe timeout, polling and auth options distinguish one-shot reachability, configured-model and startup readiness contracts. Reset paths preserve active onboarding locks.
443 src/agents/sandbox/docker-backend.ts READ; retained Environment forwarding and OPENCLAW_PREPEND_PATH preserve container shell/PATH semantics. GitHub credential transport, container generation and Podman target checks enforce admitted execution/cleanup ownership.
441 extensions/buzz/src/setup-surface.ts READ; retained BUZZ_PRIVATE_KEY and BUZZ_AUTH_TAG are setup credential fallbacks scoped by account config. Injected discovery/generation/wait/verify functions support meaningful setup behavior; identity cache prevents back-navigation rotation.
441 src/cli/update-cli.ts READ; retained POST_CORE_UPDATE_ENV is a driver marker selecting deferred completion-cache repair. Hidden finalize/admit/migration-plan leaves are updater protocols; dry-run, restart, recovery and capability options remain CLI contracts, not removable internal toggles.
441 src/plugins/payload-verification.ts READ; applied Applied after caller/contract verification: Only production owner of collectMissingPluginInstallPayloads is update-cohort, which passes skipDisabledPlugins=true and syncOfficialPluginInstalls=true at both calls. These selectable modes can collapse while preserving disabled-nonofficial exclusion and trusted-official inclusion.
440 src/gateway/server-plugins.ts READ; active-owner Exact path appears in heartbeat-files.txt. Full file read: environment and load options carry plugin activation/discovery context; runtime bindings, retirement and scope checks retain live plugin authority. Excluded from recommendations.
439 extensions/qa-lab/src/mantis/discord-smoke.runtime.ts READ; retained Mantis token/token-file/env selectors, guild/channel settings and public metadata redaction are documented in docs/concepts/mantis.md and used by mantis-discord-smoke.yml; skipPost is a meaningful read-only smoke mode.
439 src/channels/plugins/catalog.ts READ; retained Environment scopes plugin catalog paths/discovery. Official/external overrides and origin/ref exclusions implement precedence and trust separation; explicit local/npm/clawhub install metadata is user-facing catalog behavior.
439 src/gateway/worker-environments/node-enrollment.ts READ; retained Environment selects pairing Gateway URL. now injection supports bounded enrollment; transfer-size variants, live provisioning authority, TLS identity, grant revocation, and availability polling are meaningful.
439 src/infra/update-database-backup.ts READ; retained Environment selects the admitted source state for worker capture; preserveSourceArtifacts, maintenance custody, rehearsal exclusions and additional paths preserve backup/restore coverage and physical identity. No deletion justified.
438 src/agents/embedded-agent-runner/model.ts READ; retained Environment reaches provider unknown-model hints. Model options carry prepared runtime ownership, harness-owned discovery, authored transport preservation, dynamic preparation deferral, auth profiles, aliases, and static fallback; no Codex behavior change proposed.
438 src/config/sessions/session-accessor.sqlite-reclamation.ts READ; retained Reclamation captures only physical OPENCLAW_STATE_DIR and external-supervisor policy. Plan variants and transaction callbacks retain deletion, projection, history protection and committed cleanup behavior; schema and retention changes are out of cleanup scope.
438 src/plugins/host-hook-cleanup.ts READ; retained Environment supports retained deleted-agent discovery. Cleanup reason, persistent-state skipping, scheduler preservation, target resolvers, and deferred consumers distinguish actual plugin retirement lifetimes and authority.
437 extensions/acpx/src/service.ts READ; retained Both probe switches are documented in docs/tools/acp-agents-setup.md:265-267; OPENCLAW_SKIP_ACPX_RUNTIME is used by isolated E2E/proof drivers. TOKIO_WORKER_THREADS is a native dependency override. Probe and inspection controls retain real service-health/lifecycle behavior.
437 src/agents/auth-profiles/upsert-with-lock.ts READ; retained Environment binds shared auth writes to an explicit state directory. Replacement/reset/metadata options coexist with OAuth generation fencing and conditional rollback; deleting flags would alter credential write contracts.
437 src/gateway/server-methods/channel-pairing.ts READ; retained Environment selects pairing state; CLI format/code variants require exact local owner and admin guard, while UI request/notify/bootstrap flags are real protocol contracts.
436 src/plugins/plugin-module-loader-cache.ts READ; retained JITI_TSCONFIG_PATHS is dependency-facing source resolution. Native/source-transform choices, alias caches and Bun import deduplication preserve module identity, laziness and generation ownership.
435 src/gateway/gateway-cli-backend.live-probe-helpers.ts READ; retained Live-test helper uses CLI debug and MCP probe timeout/body env controls for actual loopback/schema/image/cron proof. Cron probe closure is outside cleanup scope; retain meaningful test controls.
435 src/pairing/pairing-store.ts READ; retained Environment selects shared SQLite pairing state; account/adapter/authority parameters preserve channel boundaries. readChannelAllowFromStoreSync is explicitly protected by src/plugins/compat/channel-pairing-record.ts and SDK migration compatibility-policy.md.
434 src/agents/sandbox/podman-runtime.ts READ; retained CONTAINER_HOST/CONTAINER_CONNECTION/CONTAINER_SSHKEY match Podman client-version selection and pin lifecycle authority; precedence and recovery are documented in podman-backend.md.
434 src/gateway/server-methods/session-catalog-list.ts READ; retained process.env prepares the login-shell executable path before provider listing. Request controls implement metadata-only, search, pagination and connection-bound progressive delivery with lifecycle checks.
433 extensions/anthropic/session-catalog-scan.ts READ; retained CLAUDE_CONFIG_DIR selects upstream-owned catalog root. allowProcessHomeFallback is supplied through provider list/read/continue/open calls and host session-catalog policy; watcher TTL/cache controls protect freshness and isolation.
433 src/system-agent/agent-turn.ts READ; retained VITEST/NODE_ENV only publishes injectable run proof helpers. Operator approval, CLI session continuity and exact verified inference binding constrain the system agent; embedded versus CLI paths are distinct supported execution routes.
432 src/commands/backup-resource-inventory.ts READ; retained OPENCLAW_STATE_DIR anchors canonical protected SQLite ownership. onlyConfig is a backup mode; plugin resources and custom roots deliberately override regenerable-path exclusion. Frozen inventory and inode aliases enforce archive ownership.
431 extensions/qa-lab/src/qa-credentials-admin.runtime.ts READ; retained Convex site/prefix, maintainer secret, actor id, and HTTP timeout are active admin CLI controls; timeout is documented in docs/help/testing/qa-runners.md. Injectable fetch/env support protocol/error proof.
431 src/commands/status.scan-overview.ts READ; retained Environment binds config/secret/bootstrap observations, with VITEST fast-path isolation. Reference check confirmed distinct status-all, fast-json, and normal scan callers exercise the optional channel, fallback, and advertised-link switches.
431 src/daemon/service-audit.ts READ; retained Reads service PATH, embedded gateway secrets and managed/proxy environment provenance to diagnose drift. Platform, expected-port/path/command and timeout options serve real service comparison contracts.
430 src/commands/doctor/shared/codex-route-model-ref.ts READ; retained Environment is forwarded to configured Codex route diagnostics. Legacy provider/model identities and blocked rewrites preserve migration inputs and authored route pins; no Codex behavior change proposed.
428 src/plugins/loader-load-context.ts READ; retained Env, activation source, discovery, registration identity and runtime binding options form the canonical loader cache identity. Branches preserve lazy metadata reuse, candidate isolation and policy generations; no unused switch proved.
428 src/plugins/provider-discovery.runtime.ts READ; retained Environment feeds manifest auth-credential eligibility and scoped module loading. entries-only/complete-coverage/synthetic-auth/catalog controls preserve lightweight discovery and exact runtime fallback; no redundant knob proven.
427 extensions/vault/vault-secret-ref-resolver.js READ; retained Full resolver read. VAULT_ADDR/TOKEN/TOKEN_FILE/NAMESPACE and OPENCLAW_VAULT auth method/mount/role/JWT file/KV mount/version select real token, token-file, JWT, Kubernetes and KV v1/v2 contracts. Inputs are declared in openclaw.plugin.json and documented in docs/plugins/vault.md. Bounded errors, same-origin requests, manual redirects and provider-versus-secret failure classification preserve the exec SecretRef contract; no private default-only knob.
426 src/gateway/approval-web-push.ts READ; retained Optional stateDir scopes durable approval lookup by OPENCLAW_STATE_DIR. Preferences, TTL, current browser authority and terminal delivery receipts govern real notification/recovery behavior.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

l379 environment-owner coverage

Fully READ 1,211 inventoried environment-reading modules over 200 lines (626,062 inventory lines), including root launchers and native Rust/Python/JavaScript owners. This is the cross-cutting environment-owner inventory, not a claim that every unrelated monorepo module was read. Named test/generated/script paths and reserved audit/cron trees were excluded from discovery; remaining test-infrastructure false positives are identified in row reasons. Counts refer to the read snapshot; changed owners/callers were subsequently reviewed and tested. Documented contracts and active-owner candidates were retained.

Part 5/8, descending original size.

READ coverage 5/8
Lines File Read/disposition Finding
425 src/state/agent-database-startup.ts READ; active-owner Startup admission environment binds exact shared state; deferred inspections retain Gateway adoption and activation ownership plus schema witnesses. Exact heartbeat-files.txt overlap: reserved for active owner.
424 extensions/feishu/src/setup-surface.ts READ; retained FEISHU_APP_ID and referenced env values support onboarding and existing credentials. Wizard/login exports, account policy and scan/manual flows are active. Cosmetic fixed 50ms progress delay is too small and unrelated to justify a knob-removal candidate.
424 src/config/sessions/session-parent-fork.ts READ; retained Ambient env is captured before source/target discovery. Optional target, guard, executor and patch data preserve cross-store fork and publication authority.
424 src/infra/telemetry.ts READ; retained OPENCLAW_TELEMETRY_ENDPOINT and DO_NOT_TRACK are documented operator controls; CI suppresses reports, VITEST/NODE_ENV prevent incidental network calls. Storage context and success caching prevent duplicate reports.
423 src/commands/doctor-model-catalog-credentials.ts READ; retained State-dir env binds credential migration to its store. Provider env-reference marker handling preserves authored SecretRefs; migration retains conflicting child/shared credentials and verifies persistence.
422 src/plugins/cli-registry-loader.ts READ; retained Environment and metadata revision belong to invocation-scoped preparation. SDK resolution, metadata/runtime selection, and resource ownership preserve lazy registration and invalidate stale inputs; no redundant default-only switch proven.
421 src/commands/doctor-security.ts READ; retained Environment supplies gateway auth and secret-store inspection; config/approval checks report effective security and upgrade conditions. Heartbeat/audit-adjacent warning behavior retained, no removable private toggle.
420 src/state/agent-database-admission.ts READ; active-owner env selects refusal scope and live preparation authority. Exact path intersects heartbeat-files.txt; admission/deletion guards are excluded from cleanup.
419 extensions/irc/src/setup-surface.ts READ; retained IRC_HOST/NICK and documented NickServ password/register-email envs feed actual wizard choices. Internal USE_ENV/TLS markers connect prepare with later prompts and choose port defaults; both branches remain reachable.
419 src/cli/update-cli/update-command-convergence.ts READ; retained OPENCLAW_COMPATIBILITY_HOST_VERSION conveys installed target version to downgraded/candidate runtime. Fresh-process/current-core/candidate branches own separate publication and recovery phases.
419 src/commands/doctor/shared/context-engine-host-compat.ts READ; retained Environment scopes plugin inspection, agent paths, and workspace resolution. Host selection follows authored runtime/model policy; only globally incompatible engine selections are repairable.
418 apps/linux/src-tauri/src/cli.rs READ; retained Full module including inline tests read. OPENCLAW_DESKTOP_CLI is documented in apps/linux/README.md and docs/platforms/omarchy.md and consumed by the native startup/Omarchy integration; override explicitly disables managed-wrapper updates. HOME/USERPROFILE/PATH identify the local install. OPENCLAW_NO_RESPAWN retains bounded Chrome setup process ownership; output limits/deadline, availability tracking and injected spawn callbacks have real lifecycle and test consumers.
418 extensions/crabbox/src/crabbox-worker-desktop-windows.ts READ; retained ProgramFiles/SystemRoot and OPENCLAW_STATE_DIR select actual Windows binaries and worker state. Launcher, VNC handover, cancellation and process/session checks protect captured identities; no removable private env knob found.
417 apps/macos/Sources/OpenClaw/StatusMenuController.swift READ; retained DEBUG environment/CLI controls provide synthetic menu fixtures, opening and the real right-click event route for UI proof. Lifecycle observation generations and background presentation policy are active native behavior; retain.
417 src/cli/update-cli/update-command-admit.ts READ; active-owner Active heartbeat-owned path. Candidate admission deliberately strips authority/configuration environment markers, inspects state without mutation, and enforces shipped-updater tree/schema/plugin-retention contracts.
416 extensions/raft/src/gateway.ts READ; retained Writes fresh RAFT_CHANNEL_TOKEN into the owned bridge environment for authenticated loopback wake transport. Dedupe, timeout, body limits, and stop flags protect protocol and process lifecycle, not unused tuning machinery.
416 src/agents/auth-profiles/runtime-snapshot-owner.ts READ; retained env captures explicit auth-store ownership and legacy diagnostic candidates. Metadata distinguishes persisted, inherited, external and resolved-secret facts; migration refusal and publication ownership cannot be collapsed safely.
416 src/daemon/service-audit-systemd.ts READ; retained Env resolves managed unit identity and canonical service environment. systemctl effective settings, fallback base parsing and historical installer values distinguish supported repair from operator overrides; backups explicitly inspect gateway credential keys.
416 src/gateway/session-row-membership-read.ts READ; retained env is propagated to read workers for physical store admission. Category versus structural readiness, incognito exclusion, membership revocation and generation matching are authorization/projection facts rather than tunables.
415 src/daemon/service-env.ts READ; retained Canonical proxy, SQLite, profile, wrapper, TLS, state/config, and service markers construct durable managed-service env. PATH filtering and platform controls preserve installer/runtime contracts, including Linux user-bin policy.
415 src/entry.ts READ; retained OPENCLAW_DISABLE_CLI_STARTUP_HELP_FAST_PATH is consumed by scripts/write-cli-startup-metadata.ts to render live source help. AUTH_STORE_READONLY protects secrets audit; color/profile/startup environment behavior is user-facing or lifecycle-owned.
414 src/infra/outbound/outbound-session.ts READ; retained Captured OPENCLAW_STATE_DIR and external-supervisor marker keep source/destination persistence with the intended owner. Exact-recipient, sandbox inheritance and commit guards are real routing/authority controls.
414 src/secrets/provider-env-vars.ts READ; retained Provider env names and aliases derive from public manifest metadata. Trust filtering, enabled auth evidence, async discovery and broad scrubbing intentionally serve different credential boundaries.
413 extensions/memory-core/src/memory/file-watcher.ts READ; retained Filesystem observation mode/interval consume shared operator overrides. Debounce, retry exhaustion, capacity degradation and retirement preserve watcher lifecycle and meaningful fallback behavior.
413 packages/ai/src/transports/openai-responses-replay-internal.ts READ; retained AZURE_OPENAI_API_VERSION is documented in docs/providers/openai/azure.md. Recovery options preserve encrypted history/compaction, previous-response and accepted-stream/service-tier semantics.
413 src/projects/project-clone-runtime.ts READ; retained Env sanitization disables inherited Git execution/config overrides. objectDirectory serves staged fetch, while timeout/signal/token/authority options feed real clone and fetch operations.
411 src/infra/npm-install-env.ts READ; active-owner Full file read. Npm env keys and npmrc layers drive freshness bypass, project install isolation, retries, script-shell, and explicit config discovery. Exact path overlaps PR 165124.
410 src/agents/shell-utils.ts READ; retained Reads platform shell/PATH variables and documented OPENCLAW_SHELL context marker. Custom-shell and ANSI handling serve concrete execution contracts, including Windows Git Bash/WSL and split-stream escape sequences.
410 src/daemon/launchd-foreign-jobs.ts READ; retained env identifies protected profile/service labels. Shell-altering environment detection and fresh inspection constrain Doctor removal to verified foreign lifecycle jobs; controls are safety-relevant.
410 src/flows/bundled-health-checks.ts READ; retained Env carries plugin inventory/snapshot scope. Direct, deferred and isolated checks are chosen by actual selection and update-readiness inputs, protecting live pre-restart plugin state.
409 src/commands/doctor/repair-sequencing.ts READ; retained One env and current plugin metadata scope flow through ordered Doctor repairs. Package-swap markers defer model retirement; consent, installed-ID recovery, and durable versus candidate notes are live repair contracts.
409 src/config/sessions/paths.ts READ; retained Env controls state/home selection with explicit agent ownership. Incognito precedence and persisted absolute transcript rerooting preserve isolation, backup/rehearsal portability, and structural legacy path contracts.
409 src/state/openclaw-agent-execution-operations.ts READ; retained Environment is passed to descendant authority checks and native-binding preparation. Lazy operation registrations retain distinct worker-side transaction, publication and lifecycle contracts, not unused feature switches.
408 src/auto-reply/reply/queue/enqueue.ts READ; retained VITEST/NODE_ENV only publishes resetRecentQueuedMessageIdDedupe through the registered test API. restartIfIdle=false is used by parkSteerCandidate; queue controls preserve FIFO, overflow, route/principal dedupe and cancellation.
408 src/model-catalog/pricing.ts READ; retained Environment is captured for plugin metadata and remote-price preparation. Cache entries track exact config/catalog generations; provider pricing policies, private-endpoint exclusion and passthrough handling are observable billing estimate contracts.
405 src/agents/sandbox/validate-sandbox-security.ts READ; retained HOME/OPENCLAW_HOME/USERPROFILE derive blocked credential roots and invalidate the path cache. Dangerous override options are explicit security configuration contracts; source, canonical ancestor and reserved-target checks must remain.
405 src/config/sessions/session-sqlite-target.ts READ; retained Captured storage environment and registry snapshots resolve physical ownership before reader custody. Explicit registry status, prepared candidate paths and path matching prevent owner inference from filenames; suffix/shared/incognito branches are meaningful.
405 src/gateway/server-secrets-reload.ts READ; retained OPENCLAW_SKIP_CHANNELS/OPENCLAW_SKIP_PROVIDERS prevent forbidden restart during secret reload. joinInFlight/forceColdRefKeys and generation CAS preserve refresh ordering, exact-account recovery and rollback.
405 src/plugin-sdk/windows-spawn.ts READ; retained PATH/PATHEXT and injected platform/execPath implement public Windows spawn SDK behavior; explicit allowShellFallback is a documented compatibility/security decision at the call boundary.
404 src/commands/doctor-device-pairing.ts READ; retained Doctor uses selected state environment to identify legacy device auth while active pairing reads retain their own state view. Health checks and migration notices remain functional; no flag removal.
404 src/commands/doctor-session-sqlite-recover-report.ts READ; retained env resolves trusted session recovery targets and migration manifests. Prepare/validate callbacks, historical/deferred stores and maintenance lease are real recovery boundaries; no default-only switch proven.
404 src/media-understanding/local-audio.ts READ; retained WHISPER_CPP_MODEL and SHERPA_ONNX_MODEL_DIR select operator model artifacts; PATH determines executable discovery. Inspection injection allows platform/backend behavior proof without model startup.
403 src/agents/model-auth-runtime.ts READ; retained Env lookup, synthetic auth eligibility, prepared auth, secret sentinels, and plugin-synthetic switches distinguish auth capability and SecretRef authority; no unused option proven.
403 src/gateway/server-startup-plugins.ts READ; retained Environment feeds metadata and ambient channel activation. minimalTestGateway supports lightweight boundary tests; ambientEnvTriggers suppression and runtime claims protect startup ownership. Lazy runtime imports are intentional.
403 src/infra/state-migrations.acp-replay.ts READ; retained Doctor-only opt-in imports and verifies the retired ACP replay ledger into the selected state directory. Source claims, exact reconciliation and resumable cleanup retain a stored-data migration contract; age alone is not removal evidence.
402 src/cli/startup-trace.ts READ; retained OPENCLAW_GATEWAY_STARTUP_TRACE is documented in logging and Gateway supervision docs. Timeline path/config activation, boot step collection, canary milestones, deferred formatting, and exit flushing are live diagnostics/update contracts.
402 src/cli/update-cli/update-command-service-command.ts READ; retained OPENCLAW_NO_RESPAWN keeps delegated native CLI work under its original process owner. Capability and original-definition requirements bind candidate probing, backup receipts and safe restart/compensation rather than optional debug behavior.
402 src/gateway/desktop/computer-service.ts READ; retained Environment comes from the explicitly configured native host or managed desktop lease. Provider config selects capability, and idle/execution generations preserve exact host and idempotency custody; no ambient feature switch found.
401 src/commands/doctor/shared/channel-plugin-blockers.ts READ; retained env evaluates package-declared channel credential triggers. ambientEnvTriggers suppresses those signals under an explicit policy; per-owner trust and disabled-state reporting prevent widening sibling plugin eligibility.
401 src/plugins/provider-auth-choices.ts READ; retained Environment supplies manifest metadata; includeWorkspacePlugins/includeUntrustedWorkspacePlugins/includeUnsupportedPlatforms distinguish setup display from executable-policy projection. declaredOnly is used in both values by the local exported owners.
397 src/plugins/install-config.ts READ; retained Environment resolves plugin recovery paths. allowInvalidConfigRecovery is manifest/catalog-owned authority and installed-location evidence restricts repairs to the requested plugin.
397 src/trajectory/runtime.ts READ; retained OPENCLAW_TRAJECTORY=0 is a documented operator opt-out (docs/tools/trajectory.md:135). Byte/depth/cache bounds preserve bounded redacted capture and secret-revision invalidation; no safe knob deletion proved.
396 src/infra/update-immutable-generation.ts READ; retained Environment sanitization clears Git context overrides so verification inspects the selected release tree. Sealed/unsealed verification and exact v1 launcher upgrade distinguish preparation from activation and preserve installed-driver compatibility.
395 src/proxy-capture/store.sqlite.ts READ; retained Deprecated path-based and shared synchronous constructors retain explicit shipped Plugin SDK contracts and exact return types. env selects canonical shared state; lease/finalization and legacy schema admission remain required.
394 src/commands/doctor-session-snapshots.ts READ; retained Environment resolves historical skill/home/store paths. This is advisory inspection of preserved migration originals, with configured store inputs and error reporting; no safe deletion proven from the legacy JSON surface.
394 src/config/paths.ts READ; retained Nix/read-only/home/profile/state/config/include/OAuth/port envs are canonical path and identity contracts, with documented include/read-only semantics and shipped service ownership protections.
394 src/infra/diagnostics-timeline.ts READ; retained Timeline/path/run/env switches are documented in diagnostics flags and environment docs. Bounded batching, exit flush, async span parentage and error-message omission have real diagnostic/privacy behavior.
393 src/agents/sessions/session-manager-write-admission.ts READ; active-owner Session writer environment captures exact storage targets; incognito actor and fallback composition is retained for the active staged migration described in task instructions. Queue ordering, admission authority, committed-error reporting and redaction checks are substantive boundaries.
393 src/gateway/session-membership-projection.ts READ; retained Captured env scopes worker-backed membership reads. Initial/all/dirty/disposed state, store birthtime, and revision checks are real projection invalidation/authority facts, not ambient feature flags.
391 extensions/voice-call/src/manager/store.ts READ; retained OPENCLAW_STATE_DIR selects plugin call state. Optional state runtime is the injected SDK owner; chunk limits and lookupMany fallback preserve bounded storage plus published-host compatibility.
391 src/config/source-file.ts READ; retained CHOKIDAR_USEPOLLING/interval semantics are documented in docs/help/environment.md. Explicit overrides deliberately prevent automatic native-to-poll recovery; scoped subscriptions, retirement and readiness preserve hot-reload ownership.
391 src/gateway/github-user-identity.ts READ; retained process.env only supplies optional GitHub API credentials; provider identity still comes from trusted Access/Tailscale facts. Cache and assertCurrent behavior protect identity publication across awaits.
391 src/infra/bun-sqlite-library.ts READ; retained OPENCLAW_SQLITE_LIBRARY/HOMEBREW_PREFIX are documented native selection contracts; explicitPath has production KNN-child use. Documented sqlite.close.conservative diagnostic changes admission policy; inherited worker facts and one-shot selection must remain.
391 src/wizard/setup.plugin-config.ts READ; retained process.env is used solely for manifest-first plugin discovery. showConfigured differs between onboarding and configure entrypoints; schema/UI-hint choices are actual user-facing input behavior.
390 src/cli/hooks-cli.ts READ; retained env feeds the startup plugin plan for local reports. Agent selector, report flags, enable/disable policy, native relay and deprecated install/update commands are explicit CLI surfaces.
390 src/daemon/systemd-exec.ts READ; retained Environment carries user-manager transport routing through XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS. Scope, deadline and current-owner callbacks bind actual systemd commands; retain.
388 src/agents/embedded-agent-runner/prompt-cache-observability.ts READ; retained OPENCLAW_PROMPT_CACHE_ASSERT is documented in docs/reference/prompt-caching.md and used by live cache proof; retention/strategy/history rewrite fields are observability inputs.
388 src/agents/embedded-agent-runner/run/incomplete-turn-resolution.ts READ; retained process.env is passed to provider-auth recovery hint construction. Completion, yielded-turn, silent cron reply and replay-safety branches distinguish real delivery, side effects and pending continuations; no default-only flag proven.
388 src/skills/lifecycle/upload-store.ts READ; retained VITEST/NODE_ENV exposure is a test-only factory seam. Lease heartbeat/lease/TTL/temp-root overrides have focused upload-store tests covering renewal, expiry, reopen and cleanup; state options bind worker admission. Retain meaningful controls.
387 src/cli/update-cli/update-command-migrated.ts READ; retained Fresh candidate process env, UPDATE_IN_PROGRESS and private temp roots are the post-migration handoff. Executor delegation, activation timeout provenance and Windows compensation preserve update authority and recovery.
387 src/config/sessions/startup-migration.ts READ; retained Captured env binds migration/readiness to one state root. Legacy source gates, deferred plugin receipts and database handoff remain upgrade contracts; no age-based migration deletion proposed.
386 src/auto-reply/reply/commands-login.ts READ; retained VITEST/NODE_ENV exposes active-flow cleanup only; runtime flow options retain abort/current-owner validation and direct device-code delivery. Private context checks and profile adoption protect login authority.
385 extensions/linux-node/src/commands.ts READ; retained Linux command environment resolves ffmpeg/notify-send and passes host capability context. Config enablement, media limits and injected filesystem/clock/process dependencies support real node commands and bounded proofs.
385 src/cli/daemon-cli/restart-health-probe.ts READ; retained Merged environment feeds read-only local config/auth resolution. Readiness budgets, configured TLS probe, and listener-owned device-auth allowance distinguish service liveness from authorization; no dead tunable found.
384 src/daemon/service-state.ts READ; retained Profile, systemd-unit and Windows-task environment selectors identify the inspected service. requireEffective/requireLoaded and native read binding preserve authoritative versus diagnostic observations and deadline behavior.
384 src/plugins/provider-self-hosted-discovery.ts READ; retained VITEST/NODE_ENV suppress advisory network discovery while rawResult explicitly exercises the real boundary. Health paths, endpoint ordering, runtime props and budgets accommodate distinct public self-hosted provider contracts.
384 src/security/audit.deep.runtime.ts READ; retained Security audit path retained without mutation proposal. Environment scopes Workshop inventory; bounded scans, forced manifest entries, and summary-cache reuse preserve audit coverage.
384 src/system-agent/overview.ts READ; retained Environment drives explicit credential-presence and endpoint diagnostics. Fast-test reference shortcut and injected probes avoid external discovery during setup tests; selected owner, setup model, and regular model remain distinct product facts.
383 src/agents/embedded-agent-runner/context-engine-maintenance.ts READ; retained Test env exposes the narrow signal/reset seam used to exercise shutdown ownership; production scheduling retains live drain signals, factory disposal, coalescing and foreground/background contracts.
383 src/commands/onboard-custom.ts READ; retained CUSTOM_API_KEY and process environment enter credential helper/manifest discovery. verification immediate/deferred and setAsPrimary are explicit setup-owner choices; model/API probing and secret shapes form user-facing onboarding contracts.
383 src/infra/state-migrations.web-push.ts READ; retained Environment binds legacy VAPID identity and the migration lock. Explicit Doctor gating, source claims, divergent-state rejection, verification, rollback, and fault-injection hooks protect user data; legacy name alone is not removal evidence.
382 src/agents/model-fallback-candidates.ts READ; retained Process env participates in plugin metadata ownership/fingerprints. Explicit fallbacksOverride and allowPluginNormalization preserve caller intent and pure admission; bounded cache distinguishes live registry generations.
382 src/fleet/doctor.runtime.ts READ; retained Fleet Doctor environment locates the fleet registry/state; inspected OPENCLAW_GATEWAY_TOKEN presence and runtime/network/disk ownership findings are product diagnostics, not feature switches.
382 src/infra/update-failure-report-artifact.ts READ; retained Environment chooses state root and support redaction. Detached artifacts, terminal projection preservation, receipt-bound staging, and current-authority callbacks retain update recovery and reviewed-publication semantics.
381 apps/ios/Sources/Push/PushRelayClient.swift READ; retained OPENCLAW_SIMULATOR_PUSH_PROOF_SECRET is simulator-only proof input with an active scripts/ios-run.sh producer. Apple development/strict/simulator branches implement distinct relay attest/receipt contracts.
381 extensions/browser/plugin-registration.ts READ; retained OPENCLAW_EAGER_BROWSER_CONTROL_SERVER is documented in docs/tools/browser-control.md and tested. Lazy registration, profile reload boundaries and tab-store drainage remain required service ownership.
381 src/commands/doctor-config-preflight.ts READ; active-owner Active heartbeat change path and cron migration dependency. Doctor migration/preparation flags choose real admitted phases; env anchors recovery and updater publication policy.
381 src/infra/gateway-boot-lifecycle.ts READ; retained Environment selects lifecycle persistence. Fixed breaker and retention windows govern crash recovery; released media-only startup reason remains retained historical data. No ambient tuning flag or unused option found.
380 src/agents/embedded-agent-runner/direct-compaction-preparation.ts READ; retained Environment feeds provider auth exchange; sandbox, requested-route and prepared-auth options retain real compaction execution and transcript-byte preflight ownership. No environment feature flag is declared.
380 src/skills/loading/plugin-skills.ts READ; retained process.env scopes metadata resolution; pluginSkillsDir has production plumbing and isolated filesystem-test callers. ACP availability, hardlink/containment policy and publication memo retain distinct ownership.
380 ui/vitest.config.ts READ; retained Test configuration owner. OPENCLAW_VITEST include/shard controls preserve selection and partitioning, PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH selects a runnable browser, and runtime branches retain actual Node/Bun environments.
379 src/commands/doctor-config-analysis.ts READ; active-owner Active heartbeat owner path. OPENCLAW_UPDATE_IN_PROGRESS prevents schema cleanup from stripping pending migration state; provider activation options and warning modes are real config/Doctor behavior.
378 src/agents/runtime-plugins.ts READ; retained env distinguishes host-bound registration adoption from isolated scopes. Registry borrow/reuse, purpose, prepared metadata, and artifact preference retain lifecycle-owned runtime selection and lazy plugin boundaries.
378 src/cli/node-cli/daemon.ts READ; retained OPENCLAW_WRAPPER is inherited from the existing service when reinstalling; runtime pin and platform service env preserve the installation owner. OPENCLAW_LOG_PREFIX selects node log hints; all lifecycle paths are public commands.
378 src/plugins/loader-records.ts READ; retained OPENCLAW_PLUGIN_LOAD_DEBUG is documented in docs/cli/plugins/inspect-and-diagnose.md and gates export-shape diagnostics. Lifecycle trace controls stack diagnostics; registry metadata and migration hints remain useful.
376 extensions/synology-chat/src/setup-surface.ts READ; retained SYNOLOGY_CHAT_TOKEN is an explicit channel setup contract with --use-env limited to the default account. Webhook, allowed-user and credential configuration are user-facing inputs.
375 src/gateway/worker-environments/node-worker-repository-preparation.ts READ; retained Child Git programs explicitly remove ambient GIT_*, GH_TOKEN and GITHUB_TOKEN then install task-owned authentication and config. Seed fallback and author/branch binding are live repository preparation paths; deletion would weaken source isolation or recovery.
375 src/infra/github-issue.ts READ; retained VITEST/NODE_ENV=test prevents accidental external issue creation; injected runner supports deterministic transport/ambiguity proof. Submission hooks retain live caller authority and durable claims, with exact reconciliation after uncertain writes.
374 extensions/lmstudio/src/embedding-provider.ts READ; retained Environment resolves provider auth/headers. preload=false is supported configured behavior; initialization identity and service leases preserve cache identity, cancellation and provider-owned credential boundaries.
373 apps/linux/omarchy/bridge.py READ; retained OPENCLAW_DESKTOP_CLI is documented in apps/linux/README.md and docs/platforms/omarchy.md and shared with the native CLI resolver. Desktop bus ownership, legacy-tray yield and CLI fallback are active presentation routes; refresh_cli distinguishes cached heartbeat reads from requested action admission. Route identity is checked before writes and uncertain acceptance is not retried. No removable environment knob identified.
373 src/agents/embedded-agent-runner/run/attempt-history.ts READ; retained Environment is forwarded through transcript-policy fallback. RuntimePlan remains optional in run/types.ts and has dedicated fallback behavior coverage; sender/timestamp projection preserves historical context and inter-session safety text.
373 src/agents/worktrees/git.ts READ; retained Git environment pins hooks/fsmonitor off and preserves Windows revision arguments via MSYS/CYGWIN noglob. Ref mutation serialization and worker routing retain custody; timeout/options have active callers.
373 src/commands/doctor-retired-phone-control.ts READ; retained env selects legacy and canonical lease state. SQLite precedence, exact seeded deny-list cleanup and archive-before-row-removal preserve retired Phone Control policy migration; no age-based deletion proposed.
372 src/cli/update-cli/update-command-handoff.ts READ; retained Service PID, handoff and sentinel env are process/protocol inputs checked against live lease and ancestry evidence. Stop/handoff modes and foreground admission protect the running Gateway and do not duplicate a default-only toggle.
372 src/commands/onboard-browser-handoff.ts READ; retained SSH/remote-container env markers choose browser/tunnel guidance. Dependency and clock seams isolate the real credential handoff, presence observation and GUI/headless timeout paths.
370 src/agents/model-runtime-policy.ts READ; retained Private QA build gating plus OPENCLAW_QA_FORCE_RUNTIME selects the QA harness; normal runtime remains configured model/provider policy. Runtime intent and prepared-agent scope preserve public model/auth selection semantics.
370 src/plugins/provider-auth-ref.ts READ; retained Environment and preferred-variable selectors drive interactive/noninteractive SecretRef setup. Copy overrides are typed setup integration inputs; env/file/exec/store branches all implement supported secret sources.
369 src/config/io.context.ts READ; retained env cloning, shell fallback controls and OPENCLAW_HOME-aware path resolution belong to canonical config IO. Core-only validation, recovery transforms and sync/async observation retain distinct admission and artifact-preservation flows.
369 src/plugins/contracts/registry.ts READ; retained VITEST selects generated bundled contract snapshots; production resolves manifests/public artifacts or scoped runtime registration. Lazy registry and credential fixtures are purposeful contract infrastructure.
368 src/agents/utils/tools-manager.ts READ; applied Applied after caller/contract verification: Candidate: silent=false logging mode is unused by production. All three production callers explicitly pass true; no SDK/barrel/docs/compat export was found. OPENCLAW_OFFLINE is a real download control and remains.
366 src/claws/doctor.ts READ; active-owner Exact match in heartbeat-files.txt. Fully read: experimental Claws gating wraps lifecycle-ledger health checks and live cron corroboration. Retained under active owner exclusion; no mutation candidate proposed.
366 src/cli/update-cli/update-command-service-publication.ts READ; retained Environment identifies native service/profile and physical state database. Output paths and offline/disjoint assertions protect package publication against live serving artifacts, symlinks and changed service identity.
366 src/commands/doctor-skill-workshop-sidecars.ts READ; retained env selects state and detects read-only update rehearsal paths. Legacy proposal/rollback import verifies ownership and content before retirement; historical naming is insufficient evidence for deletion.
366 src/infra/package-update-activation-prepare.ts READ; retained Environment selects the external recovery runtime and sealed SQLite library. Durable activation journal, identity checks, custody transfer, staged helper recovery, and retained mutation authority must remain.
365 src/plugins/bundled-dir.ts READ; retained Disable/override/test-trust environment values select plugin discovery roots; test trust is restricted to Vitest. Source/dist/foreign-root containment and lifecycle-owned cache preserve actual runtime and package layouts.
364 src/agents/embedded-agent-runner/run/attempt-session-runtime-prepare.ts READ; retained Runtime preparation passes environment to diagnostic trace owners and binds transcript/prompt/tool state to current session custody. In-history prompt updates and raw/finalization distinctions remain active contracts.
364 src/config/sessions/session-pending-input-history.ts READ; active-owner Active P7 incognito history migration owner; staged createIncognitoPendingInputHistoryReader is explicitly retained. Environment pins physical transcript storage and authority/custody fences govern worker/native reconciliation.
364 src/infra/push-apns.relay.ts READ; retained APNs relay base URL, timeout and loopback HTTP opt-in are operational endpoint/development controls. Persisted-origin decoding, signature scope, redirect refusal and send-authority rechecks serve security and registration contracts.
363 extensions/codex/src/node-exec-server.runtime.ts READ; retained Inherited env is allowlisted; isolated HOME/CODEX_HOME and RUST_LOG support the pinned exec-server protocol and exclude host credentials. Owner-current checks and process-tree settlement are essential; no Codex behavior change proposed.
363 src/agents/sessions/tools/bash.ts READ; retained VITEST/NODE_ENV publishes a timeout test accessor. Bash operations, command prefix, shell path and spawn hooks are typed tool construction inputs; rendering and execution own real output/cancellation contracts.
362 extensions/codex/src/app-server/event-projector-result.ts READ; active-owner OPENCLAW_BUILD_PRIVATE_QA gates tool-search trajectory evidence only when a recorder is supplied. Other controls are native turn settlement/media/telemetry contracts; active heartbeat owner, no Codex behavior change proposed.
362 src/gateway/session-utils-store-sources.ts READ; retained Environment is captured for physical store discovery and history workers; registry token/candidate/generation checks retain source custody after awaits. Sync/async variants serve native and admitted-worker boundaries.
361 src/daemon/launchd-stop.ts READ; retained OPENCLAW_UPDATE_RUN_HANDOFF joins live handoff-lease checks before service stop; it is not sole authority. Persistent disable, stop-intent recording and legacy process-lock support preserve published-driver recovery and launchd ownership.
361 src/gateway/exec-approval-ios-push.ts READ; retained env is consumed by APNs direct/relay configuration owners. Delivery snapshots and visible paired-device scopes preserve request versus cleanup targeting; no unused knob found.
360 extensions/microsoft-foundry/image-generation-provider.ts READ; retained AZURE_OPENAI_ENDPOINT is a provider endpoint fallback; runtime environment feeds Entra auth preparation. Model metadata, edit/generate differences and request deadlines enforce MAI API contracts.
360 src/state/user-profile-identity.read.ts READ; retained process.env only supplies the default profile-catalog path. Exact SQL and resident display selectors serve distinct identity/authority scopes; legacy email binding handling remains migration-aware.
359 src/cli/connect-cli.ts READ; retained Environment supplies origin-bound Cloudflare Access configuration. service/ephemeral/session-host flags select real provisioning and persistence behavior; one-shot target-file consumption and bootstrap-token preference are not dead controls.
359 src/infra/session-cost-usage-cache.sqlite.ts READ; active-owner Overlaps open PR 165124 (deslop/l370-single-use-core-20261004). Environment captures exact usage-cache storage; native incognito/maintenance and worker paths preserve identity, refresh-lock authority and exact-token cleanup.
359 src/plugins/update-config.ts READ; retained Env-aware user-path normalization supports real install records and load paths. Externalized-plugin migration, enabled-state selection, slot reset and peer-link repair preserve update data and lifecycle behavior.
358 apps/macos/Sources/OpenClaw/CookieSyncManager.swift READ; retained Inherited env is overridden with the selected remote Gateway URL and exactly one credential; stale credentials are removed. DEBUG executable lookup and generation-bound restart/watchdog behavior serve native development and lifecycle contracts.
358 extensions/qa-lab/src/gateway-child-lifecycle.ts READ; retained OPENCLAW_QA_KEEP_TEMP is documented in docs/help/testing/qa-runners.md; keepTemp and preserveToDir implement requested evidence retention. Process-group settlement and retry custody remain required.
358 src/infra/update-candidate-predecessor-stop.ts READ; retained Captured env and run receipt bind candidate Doctor stop to its original update. Published-parent receipt encoding, stop adoption, no-restart recovery and service identity checks are explicit upgrade contracts.
357 src/agents/models-config.ts READ; retained Env snapshots and fingerprints bind model generation to credential/config inputs. Provider selection/discovery options are carried into plan ownership and cache invalidation; no unused option established.
356 extensions/mxc/src/mxc-container-config.ts READ; retained Windows SystemRoot/ProgramFiles/TEMP inputs resolve baseline mounts. Network/workspace access and configured timeout affect the actual container contract; read-write/read-only overlap refusal protects sandbox boundaries.
356 src/agents/worktrees/run-lease.ts READ; retained env captures the state worker and worktree registry owner. Exclusive/missing-checkout choices protect creation/removal; VITEST-only API enables meaningful cleanup failure testing while run/Git leases retain custody.
355 extensions/opencode/session-catalog-plugin.ts READ; retained OPENCODE_DB/XDG_DATA_HOME guard process-home isolation; sessionCatalog.enabled is operator policy. Private PATH probe is used for node-local availability. SDK resolver reuse is not proven equivalent because it adds cached discovery and different Windows extensionless/PATHEXT fallback behavior.
355 src/commands/channels/add-wizard.ts READ; retained Process env is passed to fresh owner-policy reads after prompting. Deferred device linking is true on Gateway wizard, while CLI setup remains interactive; persistence guards and callbacks have distinct flow responsibilities.
355 src/infra/package-update-lifecycle.ts READ; retained env/PATH selects the admitted Node runner; workTimeoutMs distinguishes bounded from intentionally unbounded install work. Stage disposal preserves uncertain lifecycle owners and native package-manager layout.
355 src/llm/utils/oauth/anthropic.ts READ; retained OPENCLAW_OAUTH_CALLBACK_HOST is documented in docs/concepts/oauth.md and restricts callback binding to loopback; retain public override and cancellation/timeouts.
354 extensions/browser/src/browser/chrome-mcp-process.ts READ; retained Environment only fixes locale/timezone for stable process identities. Injectable cleanup dependencies support platform/PID-reuse lifecycle proof; production logic revalidates exact owned processes.
354 src/commands/doctor-maintenance-state.ts READ; retained Environment tracks original versus relocated Doctor state roots. Resource drainage, writer capture, maintenance ownership, database admission, state-root transfer, no-COW repair, reclamation, and retained-runtime cleanup are lifecycle contracts.
354 src/infra/gateway-owner-lease.ts READ; retained Environment chooses canonical state and platform process lookup. current reads separate mutation admission from discovery snapshots; lease ownership, physical custody, heartbeat and release checks remain lifecycle contracts.
354 src/infra/state-migrations.plan.ts READ; retained Migration env clears ambient selectors and binds copied home/config/state. Closed plans, candidate digest requirements, blocked receipts, and source hashes preserve migration admission.
354 src/tts/openai-compatible-speech-provider.ts READ; retained Dynamic envKey is the provider credential fallback, and configurable speech model/voice/format/base URL are public SDK factory options exported from speech.ts and speech-provider.ts, used by OpenRouter and DeepInfra. Do not collapse caller-selectable policy.
353 extensions/qa-lab/src/live-transports/telegram/userbot-driver.runtime.ts READ; retained Environment merges only explicit leased driver credentials with process launch context. Expected user identity, lease health, pending command settlement, rich-message parsing, and shutdown bounds are real live-transport proof contracts.
353 src/cli/channel-auth.ts READ; retained Environment feeds plugin auto-enable only. Channel/account selectors, local versus remote login/logout reconciliation, and exact restart rejection handling are real CLI behavior; no private environment knob found.
353 src/cli/run-main-policy.ts READ; retained OPENCLAW_DISABLE_CLI_STARTUP_HELP_FAST_PATH is used by scripts/write-cli-startup-metadata.ts to generate real help; proxy envs and injected ownership resolvers serve startup/help behavior.
353 src/infra/update-doctor-process-custody.ts READ; retained Update result-path and run-ID environment variables form the existing parent/Doctor IPC and shipped-driver recovery boundary. Nonce, namespace and process settlement controls cannot be removed as private tunables.
352 extensions/qa-lab/src/mantis/crabbox-runtime.ts READ; retained Mantis provider/class/TTL/idle/lease/binary env selectors drive explicit lease acquisition and reuse. Browser discovery uses BROWSER/CHROME_BIN and recording uses DISPLAY; SSH fallback probes occur before artifact transfer.
351 src/agents/github-read-identity.ts READ; retained GH/GITHUB token, host and config environment precedence implements GitHub CLI contracts. requireAbsentProof fails closed for configured/unverified accounts; cache separates full execution context and credential rotation.
351 src/commands/doctor-session-sqlite-failure.ts READ; retained HOME only shortens/redacts support-report paths. Manifest-backed issue claims bind exact approved payloads and avoid duplicate publication; recovery evidence and redaction helpers have direct uses.
351 src/plugin-sdk/provider-auth-claude-compat.ts READ; retained CLAUDE_CONFIG_DIR, CLAUDE_SECURESTORAGE_CONFIG_DIR, and USER preserve Claude store/keychain identity. readClaudeCliCredentialsCached is exported from provider-auth and explicitly retained for shipped SDK callers until after v2026.10.
350 extensions/qa-lab/src/web-runtime.ts READ; retained PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH is shared with Chromium ensure and benchmark tooling and has boundary coverage. Channel/headless/timeout/viewport options affect QA browser acquisition; close retains failed cleanup ownership.
350 src/infra/update-immutable-protection.ts READ; retained env binds protected config/state and authored-reference fingerprints. Additive migration checks, policy hashes and contiguous publication receipts protect immutable update cutover; no tunable removal proved.
349 extensions/deepgram/realtime-transcription-provider-factory.ts READ; retained DEEPGRAM_API_KEY and DEEPGRAM_BASE_URL are provider configuration fallbacks; base URL is documented in docs/providers/deepgram.md. Encoding aliases and transcript/finalize controls represent transport/voice-call contracts.
349 src/infra/sqlite-readonly-location.worker.ts READ; retained Worker process.env is the captured input for registry operations. Command modes distinguish preserving copies, online backup, staging ownership and reclamation; IPC identity/transfer bounds are real safety contracts.
349 src/infra/state-migrations.state-dir.ts READ; retained OPENCLAW_PROFILE/STATE_DIR/HOME/CONFIG_PATH select or suppress legacy relocation. Current configured workspaces, retained state evidence and no-clobber publication prohibit blind migration removal.
348 src/config/sessions/session-accessor.sqlite-history.ts READ; active-owner Environment pins archive read state. Native incognito/process-held archive branches are part of the explicitly retained P7c migration; verifyBinding and includeAllWindows retain disclosure and inventory contracts.
347 extensions/bonjour/src/advertiser.ts READ; retained OPENCLAW_DISABLE_BONJOUR and OPENCLAW_MDNS_HOSTNAME are documented operator contracts; container detection and test suppression prevent unwanted multicast. minimal mode selects advertised discovery fields; cleanup retains one responder lifetime.
347 src/state/openclaw-agent-db.paths.ts READ; retained Environment selects agent SQLite paths with bounded memoization. Physical-path matching, missing-suffix alias probing and incognito sentinel checks preserve storage identity; staged incognito ownership retained.
347 src/state/openclaw-state-db-repair.ts READ; retained Environment binds schema repair to state ownership and permission/quarantine owners. automatic/doctor/readability/indexes modes have distinct repair duties; audit/cron migration closure is excluded from deletion proposals.
346 src/cli/update-cli/update-command-runtime-preflight.ts READ; retained Service environment and process.env select the admitted Node/Bun runtime and recovery context. alreadyCurrent, shouldRestart, sourceRoot and fallback/recovery runners serve distinct service ownership and updater compatibility cases.
345 extensions/matrix/src/matrix/sdk/idb-persistence.ts READ; retained Ambient OPENCLAW_STATE_DIR/HOME fallback was investigated, not proven dead: client-base stores optional idbSnapshotPath and create-client forwards undefined when persistStorage=false. Removing fallback needs lifecycle decisions, not mechanical deletion. Strict persistence, abort, runtime injection and legacy refusal remain meaningful.
345 src/agents/sandbox/remote-shell-transport.ts READ; retained Environment carries explicit provider-owned command state and sanitized tar execution. checkCurrent=false occurs only during exact artifact cleanup after core revocation, while provider claim enforcement remains active.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

l379 environment-owner coverage

Fully READ 1,211 inventoried environment-reading modules over 200 lines (626,062 inventory lines), including root launchers and native Rust/Python/JavaScript owners. This is the cross-cutting environment-owner inventory, not a claim that every unrelated monorepo module was read. Named test/generated/script paths and reserved audit/cron trees were excluded from discovery; remaining test-infrastructure false positives are identified in row reasons. Counts refer to the read snapshot; changed owners/callers were subsequently reviewed and tested. Documented contracts and active-owner candidates were retained.

Part 6/8, descending original size.

READ coverage 6/8
Lines File Read/disposition Finding
345 src/infra/gateway-process-argv.ts READ; retained OPENCLAW_SERVICE_MARKER is process identity evidence with package/cwd validation. requirePackageIdentity and inspectPackage distinguish mutation admission from diagnostic/cleanup classification.
345 src/wizard/setup.model-auth.ts READ; retained State env scopes onboarding auth preparation. Prompt-vs-explicit choice, staged candidates, preserveExistingModelSelection, and provider model-selection policy cover distinct interactive/automation behavior; no redundant flag proven.
344 extensions/github-copilot/embeddings.ts READ; retained process.env drives provider token/domain selection. Custom endpoints require explicit credentials; discovery validates available embedding models. The private always-fetch client field is only a tiny parameter simplification, not a worthwhile env-knob removal.
343 src/cli/update-cli/update-command-candidate-admission.ts READ; retained Candidate admission freezes authored config and passes the managed environment to the candidate. Installed versus candidate admission, schema facts, staged-package reuse and authority checks are upgrade contracts.
343 src/commands/channels/list.ts READ; retained process.env feeds one prepared plugin control-plane snapshot. --all and --json deliberately select different inventory and runtime-status paths; no new environmental policy or unused knob.
343 src/commands/doctor.ts READ; retained Environment identifies explicit SQLite maintenance targets and receipt ownership. Session/state SQLite and post-upgrade modes are public CLI behavior; repair/report issue handling retains target/confirmation/idempotency contracts.
342 src/plugins/installed-plugin-package-ownership.ts READ; retained env resolves user-owned install paths. Prepared ownership resolver distinguishes package, orphan, operator-managed and discovered reload targets; duplicate path/child guards prevent incorrect mutation ownership.
341 extensions/fish-audio-speech/speech-provider.ts READ; retained FISH_API_KEY and FISH_AUDIO_API_KEY are documented credential inputs, including explicit community compatibility. Speech model/voice/latency controls and request overrides drive synthesis/Talk/directives.
341 src/cli/directory-cli.ts READ; retained process.env drives plugin auto-enable; channel/account/query/limit/json controls are directory CLI contracts. Execution consumes prepared runtime configuration and scoped secrets.
340 extensions/mistral/realtime-transcription-provider-factory.ts READ; retained MISTRAL_API_KEY is documented credential fallback. MISTRAL_REALTIME_BASE_URL has only its declaration in scanned trees, but removing an operator endpoint override lacks observed-use evidence and offers negligible reduction; config/audio aliases and transport bounds are retained.
340 src/trajectory/runtime-store-writer.ts READ; retained Environment pins trajectory storage root. Complete prepared target versus legacy marker compatibility, bounded batches, background flushing, writer admission, and unknown-outcome settlement preserve transcript ownership and prevent replay.
339 src/infra/push-web-store.ts READ; retained Captured OPENCLAW_STATE_DIR chooses the Web Push database; worker guards authorize profile binding at transaction admission. Native-compatibility and snapshot/mutation paths have ownership semantics; not classified dead by name.
338 extensions/google/cli-backend-isolated-auth.runtime.ts READ; retained Gemini CLI environment allowlists and forced barriers retain auth selection, system policy, telemetry, trusted transport, and literal prompt isolation. Dependency-specific selectors are security/credential contracts and cannot be dropped as ambient knobs.
338 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-cli.ts READ; retained Runtime env supplies isolated config/state paths and disables auto-update/color. E2EE kind and allowNonZero select real QA behavior; timeout cleanup waits for process settlement.
338 src/config/codex-plugin-diagnostics.ts READ; active-owner Active heartbeat ownership list includes this path. env participates in implicit runtime resolution; source-before-migration refs and per-agent effective policies determine whether missing Codex diagnostics are valid.
337 extensions/anthropic/stream-wrappers.ts READ; retained getEnvApiKey selects OAuth transport identity. Beta/fast/service-tier/compaction params carry provider behavior; resolveAnthropicBetas, including its unused model-id parameter, is exported through api.ts and contract-api.ts and named in SDK docs, so no API deletion proposed.
337 src/agents/model-runtime-aliases.ts READ; retained Environment and includeSetupRegistry choose configured CLI backend metadata; prepared auth dirs and storedCredential distinguish runtime aliases from persisted auth identity. isCliRuntimeAlias has a production model-fallback-attempt caller.
337 src/hooks/bundled/session-memory/handler.ts READ; retained Session memory uses state directory/timezone and disables model slug generation under Vitest. Opt-in LLM slugs, incognito exclusion, provenance writes and manual/automatic reset lifetimes retain distinct behavior.
337 src/projects/project-clone.ts READ; retained Env is captured for state and Git execution; timeout, token, signal and authority inputs are forwarded across clone/refresh lifecycle leases. Required commits and cleanup preserve registered checkout ownership.
336 src/commands/doctor-telegram-general-topic-conversations.ts READ; retained env selects configured existing agent databases. Repair re-reads canonical Telegram identity and merges every durable reference transactionally; this is a retained data migration, not an environment toggle.
336 src/gateway/server-cron-lazy.ts READ; active-owner Full file read. OPENCLAW_SKIP_CRON and config enabled control the real cron owner; lazy loading captures spawn/SQLite scopes and lifecycle generations govern pause/start/drain. Cron closure is explicitly excluded from mutation.
336 src/gateway/worker-environments/ssh.ts READ; retained Process environment is deliberately allowlisted for SSH children. temporaryDirectoryPrefix is used by bootstrap, workspace tunnel and both desktop paths, including an absolute /tmp desktop prefix; host-key, forwarding and fallback-port controls are active transport contracts.
336 src/hooks/gmail-setup-utils.ts READ; retained PATH/XDG_CONFIG_HOME resolve gcloud and gog installation state. CLOUDSDK_PYTHON and CLOUDSDK_PYTHON_ARGS are deliberately overwritten to prevent inherited interpreter/argument selection.
335 src/infra/dotenv.ts READ; retained Workspace env filtering is a security boundary with lazy provider metadata plus static endpoint/auth/runtime denial. Sync and async loaders serve separate callers; quiet/env parameters preserve loading diagnostics and isolation.
335 src/worker/worker.runtime.ts READ; retained OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH isolate each worker and are restored only after command settlement. WORKER_DEPLOY_BUILD selects owned process-tree cleanup; environmentStateDir supports the managed process owner across turns. These are lifecycle controls.
334 src/agents/models-config.providers.secret-helpers.ts READ; retained Environment/profile/SecretRef resolution preserves credential provenance and emits nonsecret markers. Options support real auth source, header and AWS SDK distinctions; no redundant credential knob proven.
334 src/gateway/http-utils.ts READ; retained Environment only participates in current plugin metadata lookup. Agent/model/session headers are supported HTTP contracts; reserved namespace, model visibility, and session mutation authorization are active boundaries.
334 src/gateway/server-methods/sessions-suggestions-access.ts READ; retained Suggestions capture environment with the selected mutation scope. Start versus settlement branches deliberately separate requester authority from accepted-input custody; no optional private env flag.
333 extensions/migrate-claude/source.ts READ; retained CLAUDE_CONFIG_DIR locates the source migration home verbatim; explicit --from controls project scope. Bounded auto-memory discovery and archived source paths preserve user migration inputs.
333 src/config/sessions/session-accessor.reset.ts READ; retained Worker env carries the exact session database scope. Snapshot revision, reset boundary, related rows, callbacks and commit guards protect atomic reply initialization across lifecycle races.
332 src/gateway/server-startup-config-helpers.ts READ; retained Env supplies auto-enable and secret/auth surface resolution. minimalTestGateway is meaningful harness control; prepared-snapshot reuse, read-only config behavior and auth overrides have separate startup contracts.
331 extensions/qa-lab/src/mantis/desktop-browser-smoke.runtime.ts READ; retained Mantis profile-archive/profile-directory envs configure retained authenticated browser witnesses and have documented CLI counterparts. Runner/time/env seams support isolated QA orchestration; remote capture and lease cleanup remain owned.
331 src/commands/doctor-session-transcript-headers.ts READ; retained env selects all exact agent store targets. shouldRepair separates reporting from guarded lossless repair; canonical row validation, snapshot comparison, and legacy version header protect retained transcript data.
330 src/media-understanding/image-model-runtime.ts READ; retained Env forwards into provider runtime/auth preparation. Prepared snapshot acquisition, credential-scoped metadata, vision checks and resource claims are required image execution ownership, with no dead tunable found.
330 src/node-host/plugin-node-host.ts READ; retained env reaches plugin preparation; allowlists and plugin filters gate advertised capabilities. VITEST/NODE_ENV exposes a consumed reset API. Registry replacement, disconnect cleanup and invocation authority remain live.
329 extensions/deepinfra/provider-models.ts READ; retained DEEPINFRA_API_KEY and hasApiKey control pre-auth offline behavior. Strict versus advisory discovery has distinct failure/fallback semantics; static catalog and live cache serve real provider surfaces.
329 src/channels/plugins/contracts/trace/delivery-trace.ts READ; retained This inventory entry is a Vitest conformance harness rather than application runtime. OPENCLAW_TRACE_UPDATE is the explicit golden-recording control; retain ordered delivery semantics and deterministic fake-clock proof.
329 src/logging/console.ts READ; retained VITEST/OPENCLAW_TEST_CONSOLE preserve test silence with explicit live-CI opt-in; live/E2E workflow and Docker scripts still use the override. Logging level/style and subsystem controls have active console routing roles.
328 apps/macos/Sources/OpenClaw/GatewayEnvironment.swift READ; retained OPENCLAW_GATEWAY_PORT participates in documented environment/config/default port precedence with profile reservation; PATH is explicitly passed to version probes. Runtime and prerelease compatibility checks are functional behavior.
328 src/wizard/clack-prompter.ts READ; retained CI/VITEST disable rich custom spinner output while retaining CLI progress; navigation/search/sensitive options implement actual WizardPrompter contracts.
327 apps/macos/Sources/OpenClaw/DebugActions.swift READ; active-owner Active heartbeat overlap including this file and StatusMenuRenderer. OPENCLAW_PROFILE preserves restart identity; debug actions are menu/UI operations. The verbose-main preference has renderer callers but no further recommendation is made in this protected owner.
327 src/config/io.health-state.ts READ; retained Environment/home fallback resolves canonical config-health storage. Observation supersession, owner-held guards, post-commit publication, continuation capture, and read/write failure policy prevent stale health writes.
327 src/gateway/mcp-http.request.ts READ; retained OPENCLAW_MCP_LOOPBACK_BODY_TIMEOUT_MS has real HTTP delayed-body, timer-ceiling, timeout/admission and capture-cleanup regression uses in mcp-http.test.ts. Debug flags share CLI backend diagnostics; auth/grant/origin/header normalization is security-critical.
327 src/infra/update-native-package-stage.ts READ; retained PNPM_CONFIG_GLOBAL_BIN_DIR/pnpm_config_global_bin_dir and BUN_INSTALL_* redirect real package-manager staging. PATH is prepended with private bin directory; fingerprint and rollback options preserve native manager generation safety.
327 src/plugins/provider-auth-availability-core.ts READ; retained Environment-backed credentials, profile types/capabilities, keychain prompting, external CLI discovery, and acceptance predicates enforce real provider-auth selection contracts.
327 src/plugins/status-snapshot.ts READ; retained Explicit environment roots isolate plugin metadata/status resolution. Dependency and consent status derive from the existing install owner and metadata cache; no environment feature/debug toggle found.
326 extensions/google-meet/src/config.ts READ; retained Google Meet env fallbacks provide configured meeting, consent and OAuth values; transport/audio/realtime settings are plugin configuration, with no proven unused option.
326 src/infra/state-migrations.prelude.ts READ; retained State env and prepared source endpoints bind Doctor planning. Mode, invocation purpose, read-only planning and deferred plugin source refusals are migration contracts.
325 extensions/slack/src/client-options.ts READ; retained SLACK_API_URL and proxy env configure API/Socket Mode transports. Read/write/lookup retry policies differ for idempotency and rate limits; authority fences and package-matched Undici dispatchers are required.
325 src/infra/git-worker.ts READ; retained Captured Git environment overrides disable direct metadata reads; options.git carries host policy while broker owns execution authority. Distinct pools avoid maintenance starvation and parent work settles before cleanup.
325 src/shared/pid-alive.ts READ; retained Environment fixes diagnostic locale/timezone for cross-platform process birth identity. Native-versus-ps fallback, sealed runtime and architecture checks preserve platform safety; file is in native source closure and no mutation proposed.
324 extensions/qa-lab/src/docker-harness.ts READ; retained Emitted config/state/profile and subsystem-disable env values isolate the Docker QA scaffold; private QA CLI gate and control-UI token are functional. Prebuilt-image/UI mounts and injected command runner retain real harness variants.
324 src/commands/configure.gateway.ts READ; retained Public Gateway bind/auth/Tailscale prompts validate env-backed token SecretRefs. Trusted proxy loopback consent and mutually incompatible exposure choices are meaningful configuration policy, not dead flags.
323 src/cli/proxy-cli.runtime.ts READ; retained process.env feeds documented proxy validation and proxied child overlays. Debug capture session lifecycle, redaction and finalizers are used by public CLI entrypoints; no unused env branch identified.
323 src/config/io.plugin-metadata.ts READ; retained Environment selects machine state and workspace metadata scope. allowCurrent/installRecords/stateDir control reuse versus independent maintenance discovery; async preparation preserves plugin-cache lifetime and manifest-only ownership.
323 src/security/fix.ts READ; retained env/stateDir/configPath/platform/exec select the operator target and platform permission owner. Include files, plugin security hooks, and legacy retained credential/transcript files are security/data contracts.
322 src/gateway/client-bootstrap.ts READ; active-owner Exact overlap with active PR 165124, deslop/l370-single-use-core-20261004. OPENCLAW_GATEWAY_URL and explicit/configured auth selection enforce target/credential boundaries; leave to existing owner.
322 src/trajectory/metadata.ts READ; retained Environment supplies redaction/state/manifest context for trajectory exports. Runtime/config/plugin/skill metadata and artifact fields are observability data; no runtime knob or unused variant identified.
321 src/secrets/private-plan-file.ts READ; retained Windows SYSTEMROOT/WINDIR/TEMP/TMP resolve trusted PowerShell and compiler locations. Native ACL verification, delete-on-close staging, durable publication, and sanitized failures protect private plan artifacts.
320 src/commands/agents.bindings.ts READ; retained process.env is used once for nonbundled channel discovery. Binding normalization, account wildcard/default selection, conflict reporting and route preservation are active CLI/setup behavior; no internal flag machinery found.
320 src/fleet/cell-profile.ts READ; retained No ambient env read: constructs and validates tenant container environments. Managed env reservation, user-origin keys and Docker/Podman/resource controls preserve isolation and upgrade replay contracts.
316 src/secrets/provider-integrations.ts READ; retained Environment informs hardlink admission; manifest timeout/output/env/passEnv/jsonOnly fields are public plugin secret-provider declarations, not private tuning seams. Trusted origin, activation and entrypoint boundary checks remain.
315 extensions/chutes/oauth.ts READ; retained CHUTES_CLIENT_ID/CHUTES_CLIENT_SECRET support refresh and provider app configuration. Manual callback, timeout, fetch/clock injection, cancellation and refresh-token retention serve OAuth contracts.
315 extensions/qa-lab/src/live-transports/whatsapp/whatsapp-live.config.ts READ; retained OPENCLAW_QA_WHATSAPP_* variables are the live transport credential contract. Overrides configure distinct meaningful approval, broadcast, group-policy, audio, reaction and debounce scenarios.
314 extensions/codex/src/session-catalog-terminal.ts READ; retained PATH/Path select the Codex executable; CODEX_HOME pins exact catalog-source ownership for local/remote terminal resume. No Codex behavior change proposed.
314 src/commands/doctor/shared/missing-configured-plugin-install.health.ts READ; retained Doctor install-health logic consumes captured environment to distinguish update-deferred, operator-managed, missing, stale and repairable plugin installs. These branches feed actionable health/repair projections.
314 src/config/io.read-helpers.ts READ; retained OPENCLAW_UPDATE_IN_PROGRESS/OPENCLAW_UPDATE_POST_CORE suppress expected future-version warnings during shipped update handoffs. Injected env/IO and resolution facts preserve include/CAS/env-reference semantics.
314 src/gateway/server-methods/config-write-flow.ts READ; retained process.env participates in effective shared-auth generation. Runtime-application receipts, optional disconnect and restart scheduling retain separate claimed/unclaimed publication and policy enforcement; not a redundant knob owner.
314 src/infra/state-migrations.plugin-state.ts READ; retained Scoped OPENCLAW_STATE_DIR bridge binds migration store operations and deferred cleanup to each import owner. Capacity, TTL, replacement and cleanup disposition are live plugin migration contracts, including partial/retry preservation.
314 src/wizard/setup.gateway-config.ts READ; retained OPENCLAW_GATEWAY_TOKEN/PASSWORD integrate setup with existing credentials and SecretRefs. Flow/auth/bind/Tailscale options are interactive configuration contracts, including gateway token store provisioning when no credential exists.
313 extensions/discord/src/monitor/gateway-metadata.ts READ; retained Gateway metadata timeout env is documented in Discord troubleshooting. URL/fetch/capture/proxy controls support real metadata requests and isolation; async capture fallback explicitly supports shipped 2026.9.6 hosts.
313 src/config/sessions/session-pending-input-store.ts READ; active-owner Incognito actor cutover-adjacent owner; retain current native/worker split. Captured environment and database identities bind reads/mutations, and synchronous recorder visibility plus unknown-outcome settlement are explicit contracts.
313 src/infra/update-run-codec.ts READ; retained Captured env fields are path-redaction facts rather than worker authority. Byte budgets preserve operational recovery/driver receipts while evicting expendable diagnostics.
313 src/wizard/setup.migration-snapshot.ts READ; retained OPENCLAW_PROFILE labels the current onboarding lock. Source/target hashes, symlink policy and consent preservation bind migration retries to unchanged inputs; fresh-setup refusal reflects the supported import contract.
312 extensions/google/vertex-adc.ts READ; retained GOOGLE_CLOUD_QUOTA_PROJECT is the Google ADC billing override with live CLI-auth writers and transport tests. VITEST reset and fetch injection isolate token cache/refresh tests; dependency fallback, expiry and body limits retain real ADC contracts.
312 src/infra/ocm-update-client.ts READ; retained OCM_SELF, OCM_HOME, OCM_ACTIVE_ENV, and OCM_ACTIVE_ENV_ROOT are manager ownership inputs. Capability negotiation, binding/path checks, exact request reconciliation, redacted diagnostics, and released-manager unsupported-command handling remain real integration contracts.
311 extensions/codex/src/session-catalog-homes.ts READ; retained CODEX_HOME, app-server transport/homeScope, and configured sessionCatalog.homes select explicit native session sources. Generation-scoped path facts and exact agent/node routes remain active contracts; no Codex behavior change proposed.
311 src/state/openclaw-state-db-existing-write.ts READ; retained env/path select the owned existing database; busy timeout, additive schema and orphan recovery correspond to separate admission/maintenance contracts. File generation and post-operation schema checks must remain.
310 extensions/xai/capability-provider-metadata-factory.ts READ; retained XAI_API_KEY is real provider configuration. Metadata advertises model-specific image/video/realtime capabilities, config normalization and provider auth-profile fallback; controls are provider/API contracts.
310 src/commands/configure.gateway-auth.ts READ; retained Environment is forwarded to auth/provider/model owners. Catalog load/scope choices depend on actual provider metadata; legacy Codex model ref repair preserves current selection.
309 extensions/codex/src/app-server/native-skill-isolation.ts READ; retained OPENCLAW_STATE_DIR/CODEX_HOME/HOME/USERPROFILE distinguish isolated state from personal skills. Client-lifetime caching and skills/changed invalidation are active isolation controls; no Codex behavior change proposed.
309 packages/ai/src/providers/google-interactions-request.ts READ; retained OPENCLAW_VERSION supplies provider client telemetry fallback when no host header exists; package-root resolution supports standalone AI packaging. Generation options and explicit unsupported caching/video rejections map real transport constraints.
308 apps/ios/WatchApp/Sources/OpenClawWatchApp.swift READ; retained Watch screenshot and approval fixture controls provide deterministic synthetic rendering without notification authorization. OPENCLAW_WATCH_SCREENSHOT_MODE has an actual Fastlane screenshot launch consumer; live connectivity and approval refresh are separate runtime behavior.
308 extensions/browser/src/browser/extension-windows-host.ts READ; retained Process state/config paths establish the native Windows context. Explicit executable, browser profile, Store install/removal and cancellation inputs retain installer identity and real management actions with no mutation retry after admission.
307 src/cli/update-cli/update-command-service-revalidation.ts READ; retained Service/profile env comparisons bind update publication and reactivation to the original launcher/manager. Incomplete inspection and root-change options handle shipped handoffs and controlled recovery; retain authority checks.
307 src/config/sessions/session-sharing-store.async.ts READ; retained Sharing writes freeze the physical state target before worker admission. Incognito retains native ownership; ordinary writes settle under FIFO with uncertainty invalidation and committed membership publication.
306 src/commands/status.command.ts READ; active-owner Active heartbeat closure. Wrapper env comparison explains service-versus-CLI credential context; JSON, all, deep, usage and timeout options are CLI output/probe contracts.
305 src/cli/tagline.ts READ; active-owner Listed in heartbeat-files.txt. OPENCLAW_TAGLINE_INDEX also exists in install.sh and standalone installer tests; mode is a public banner choice and random/now inputs make holiday behavior deterministic.
305 src/commands/doctor/shared/stale-oauth-profile-shadows.ts READ; retained env and now select the exact state and OAuth freshness comparison. Legacy sidecar references are explicitly protected from deletion, and locked local repair rechecks identity. VITEST/NODE_ENV exposes meaningful repair helpers; old names alone do not retire migration safeguards.
305 src/daemon/service-audit-schtasks.ts READ; retained OPENCLAW_WINDOWS_TASK_HIDDEN_LAUNCHER and service-kind markers identify generated launchers. expected XML/command and preserved released native defaults discriminate operator edits during Windows service repair.
305 src/infra/push-web.ts READ; retained OPENCLAW_VAPID_PUBLIC_KEY/PRIVATE_KEY/SUBJECT are documented stable identity controls. SQLite selects durable keys and current subscriptions; migration admission and conditional expiry cleanup preserve state ownership.
304 extensions/codex/src/app-server/config-parsing.ts READ; retained Codex computer-use, transport, network proxy, plugin approval, and experimental fields are explicit config contracts; environment names are command-validation guidance. No Codex behavior change or env removal proposed.
304 src/infra/host-env-security.ts READ; retained Environment filtering is the exec security owner, including inherited/requested values, portable/Windows names, Git protocol/pager restrictions and scoped omissions. No flag can be removed merely because one route uses its default.
303 src/gateway/credentials.ts READ; retained Public Gateway token/password env inputs and local/remote precedence/fallback policies preserve caller-specific auth boundaries, explicit URL credential isolation, and unresolved SecretRef refusal.
303 src/node-host/auto-update-install.ts READ; retained Child STATE_DIR/CONFIG_PATH intentionally isolate package lifecycle work; Bun prefix env selects private runtime layout. Exact release/integrity validation and immutable generations protect node activation.
302 extensions/memory-core/src/memory-entry-origins.ts READ; retained Environment is captured with canonical state before worker reads/writes. Origin reservation rollback, diary retention and indexed-origin preservation protect memory lineage; lazy imports retain runtime API boundaries.
302 src/commands/doctor/shared/release-configured-plugin-installs.ts READ; retained Release-configured plugin install repair uses environment-derived configuration and shipped version metadata. Pre-July version naming alone does not justify removing current preservation/install backfill writers.
302 src/plugin-sdk/facade-loader.ts READ; retained Env and preferSource influence real source/dist/plugin-root artifact resolution; lifecycle caches preserve lazy public surfaces. Managed facade proxies re-resolve live plugin ownership and preserve reflection invariants; no safe API deletion proved.
301 src/gateway/restart-trace.ts READ; retained OPENCLAW_GATEWAY_RESTART_TRACE is documented in restart/supervision and performance docs and set by benchmark/watch tooling. Handoff timestamps carry validated replacement-process trace continuity; retain.
301 src/state/openclaw-state-lease-heartbeat.worker.ts READ; active-owner Heartbeat owner excluded from mutation. processOwner.env feeds native process identity; deferActivation and explicit renewal preserve startup, contention, expiry and persisted-lease authority.
300 src/agents/workspace-legacy-state.ts READ; retained env/homedir locate upgrade inputs; VITEST/NODE_ENV expose absence-cache reset. Presence gate and attestation-owned cleanup preserve historical workspace state; no age-based removal proposed.
300 src/infra/package-update-activation-immutable-recovery.ts READ; retained process.env is forwarded to the sealed recovery launcher. Runtime identity and timeout CLI options protect immutable generation recovery; no tunable machinery to retire.
299 extensions/clickclack/src/accounts.ts READ; retained CLICKCLACK_BOT_TOKEN is documented default-account auth and official channel metadata. SecretRef/file precedence and current-account checks preserve auth scope; progress/activity/discussion/reconnect settings are account config contracts.
299 src/acp/client.ts READ; retained Process env is filtered before spawning the ACP server. Server command/args/verbosity are CLI choices; exact process termination and auth stripping preserve transport and credential boundaries.
299 src/agents/execution-auth-binding.ts READ; retained AWS environment credentials establish only observable exact owners; AWS_PROFILE deliberately cannot prove principal identity. Fingerprints and skipLocalCredential participate in current execution-auth proof and must retain their security distinctions.
299 src/infra/exec-approvals-sqlite.ts READ; retained VITEST/NODE_ENV exposes reset of migration/warning state for isolation. Journal fencing, raw/normalized policy persistence, timestamps, and MCP grants preserve approval ownership.
299 src/infra/windows-install-roots.ts READ; retained SystemRoot/WINDIR/ProgramFiles/PATHEXT-adjacent platform data and registry probes resolve trusted Windows roots. Explicit env avoids process cache; deadline-sensitive fallbacks intentionally do not become authoritative cached roots.
298 src/gateway/web-push-authority.ts READ; retained Environment only binds optional stateDir. Current subscription/device/profile/role/preferences and session-sharing facts are revalidated before provider start; keep authority and release ordering.
297 src/state/openclaw-state-ownership.ts READ; retained Environment checks external-supervision write authority. schemaReady, recoverOrphanedSidecars, and read admission options distinguish admitted lifecycle vs offline/raw inspection; they preserve corruption and external-owner safety.
295 src/agents/runtime-plan/build.ts READ; retained Environment feeds prepared provider/plugin resolution. Override resolvers intentionally recompute while default accessors memoize; no removed knob proven. Small cast wrappers are not substantial environment-knob candidates.
295 src/daemon/systemd-service-identity.ts READ; retained DBUS_SYSTEM_BUS_ADDRESS selects the native system bus. Captured manager/unit/account identity and live action assertions prevent stopped-service repair from switching owners; callback/timing options are authority seams.
294 src/commands/onboard-non-interactive/local/auth-choice.ts READ; retained Env is passed through provider discovery and CUSTOM_API_KEY supports non-interactive setup. Ref/plaintext and replacement-credential paths protect explicit secret-input and onboarding contracts.
293 extensions/codex/src/app-server/transport-websocket.ts READ; retained Environment selects native Codex user-home socket only. Fixed WebSocket health budgets, pre-open buffering, frame limits, backpressure, and Unix-versus-network transport branches implement protocol/lifecycle behavior; no Codex change proposed.
293 extensions/feishu/src/accounts.ts READ; retained Environment SecretRefs are only inspected through read-only policy. Inspect/strict and requireEventSecrets distinguish discovery from runtime credential requirements.
292 extensions/onnx/src/worker-client.ts READ; retained workerEnv allowlists only Windows/temp essentials to isolate inference children. Bounded queue, initialization and physical close custody are active runtime safeguards.
292 src/cli/update-cli/update-repair-command.ts READ; retained Update run/handoff/post-core env markers select canonical recovery admission. Healthy serving build verification, ledger acknowledgment and maintenance fallback are distinct active recovery paths.
292 src/infra/update-failure-facts.ts READ; retained Update failure facts use environment only as redaction/state context. Public codes, path/host/credential sanitization, candidate facts and bounded diagnostics are active support contracts.
291 src/config/sessions/session-transcript-reconcile-pool.ts READ; retained OPENCLAW_STATE_DIR and external supervisor markers carry worker admission identity. Generation closure, independent lease release and memory/disk modes protect reconciliation custody.
291 src/gateway/server-methods/web-search-status.ts READ; retained Environment detects provider credential source and selects managed metadata. Status uses prepared catalog/auth facts and preserves configured versus available versus native/external routing distinctions.
290 extensions/qa-lab/src/providers/live-frontier/auth.ts READ; retained QA credential aliases, setup-token profile override, CODEX_HOME and forced-runtime values prepare isolated live-proof auth. The module avoids copying host OAuth stores and disables Keychain prompting; meaningful QA controls retained.
290 src/gateway/server-discovery-runtime.ts READ; retained Bonjour disable/SSH-port/advertise-timeout inputs control real network advertisement. Discovery timeout has dedicated timeout and late-cleanup/reload test consumers; claims and generation cleanup retain plugin lifecycle behavior.
289 extensions/lobster/src/lobster-runner.ts READ; retained Copies process env into the embedded dependency tool contract. Runtime-loader injection covers actual inline/file/approval/output-limit behavior without invoking the dependency. Time/output limits and cancellation are meaningful runner controls.
289 src/infra/heartbeat-runner-session.ts READ; active-owner Fully read for coverage; explicit heartbeat exclusion and heartbeat-files.txt active ownership apply. env binds agent stores, with shared/isolated keys and legacy wake suffix repair retained.
289 src/infra/net/proxy/proxy-lifecycle.ts READ; retained Documented OPENCLAW_PROXY_URL and inherited ACTIVE/LOOPBACK_MODE/CA_FILE env carry process routing. Bypass functions return undefined yet still enforce configured block policy; apparent no-op callbacks are retained contracts.
289 src/infra/startup-migration-checkpoint.ts READ; retained Startup/Doctor SQLite lease binds env-selected state and shipped scope/key. Clock/poll/owner injection supports acquisition and live-process ownership tests; TTL and heartbeat preserve serialization.
288 extensions/anthropic/auth.runtime.ts READ; retained Provider env is passed to deferred Claude CLI auth probing. Setup-token options and interactive/noninteractive migration are public provider/CLI login contracts.
288 src/node-host/config.ts READ; retained Env binds canonical node-host SQLite state and retired node.json refusal. commands/allCommands and installed-app sharing are explicit public config behavior; clock/UUID candidates support deterministic atomic configuration proof.
288 src/state/openclaw-state-db-startup-checkpoint.ts READ; retained Env chooses database ownership scope; atomic option binds integrity inspection and lease claim to one snapshot. Native bootstrap allowlist, schema maintenance, and permission guards are admission contracts.
287 src/config/sessions/session-accessor.sqlite-archive-session.ts READ; retained Environment captures the original agent/state database paths. AsyncLocalStorage scope and warm-worker reuse retain FIFO, operation settlement, generation validation and cleanup.
287 src/node-host/invoke-agent-cli-claude.ts READ; retained CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS is deliberately forced for cache-stable Git policy; env/secretInput belong to exact remote invocation. Timeouts, bounded terminal capture and artifact extinction custody protect actual CLI execution.
286 extensions/msteams/src/qa/adapter.runtime.ts READ; retained OPENCLAW_BUILD_PRIVATE_QA and NODE_OPTIONS install nonce-bound private QA transport bootstrap. Adapter policy, timing, and preload hooks exercise the real Teams plugin/Gateway and retain cleanup ownership.
286 extensions/qa-lab/src/live-transports/slack/slack-live.message-observations.ts READ; retained OPENCLAW_QA_TRANSPORT_READY_TIMEOUT_MS is actively set in CI/release/live-transport workflows. Readiness modes, observation windows and no-reply sampling protect distinct Slack proof contracts.
286 src/agents/embedded-agent-runner/compaction-runtime-preparation.ts READ; retained process.env feeds prepared auth only. Locked selection, bound harness, reusable auth, sandbox identity, and convergence choices preserve compaction ownership; no Codex behavior change proposed.
286 src/commands/doctor-migration-backup.ts READ; retained env scopes database inventory and rehearsal exclusions. Verified snapshots, repair keys/validators and deterministic backup identity preserve rollback groups and interrupted-capture recovery.
286 src/infra/update-run-write.ts READ; retained Ledger options carry state environment and busy timeout into the existing-write owner. Phase ordering, retained-step limit and diagnostic-versus-lifecycle error handling preserve update history and recovery; no standalone unused environment knob.
286 src/plugins/public-surface-runtime.ts READ; retained OPENCLAW_BUNDLED_PLUGINS_DIR is resolved through the canonical bundled-dir owner with physical-path validation. Explicit/auto selection and source/build/retained-Doctor paths enforce plugin instance and packaging contracts.
284 extensions/file-transfer/src/node-host/workspace-memory.ts READ; retained Child env intentionally limits HOME/PATH. Memory versus skills operations, byte bounds, publication checkpoints, file policy, and rollback-aware process cleanup protect node transport behavior.
284 src/cli/failure-output.ts READ; retained OPENCLAW_DEBUG and argv flags control diagnostic details; OPENCLAW_UPDATE_IN_PROGRESS retains diagnostics for both updater markers. Structured failure payloads, ambiguity hints, and Doctor recovery policy are observable CLI contracts.
284 src/config/io.load.ts READ; retained Environment loading/substitution is core config behavior. skipSuspiciousRecovery prevents recursive recovery after a replacement read; sync/async effects retain worker support and current write authority.
282 src/cli/dns-cli.ts READ; retained DNS setup exposes --domain/--apply and consumes the wide-area domain owner; environment path mentions describe public config. Local run options vary for bounded Homebrew probe, allowed failures and interactive sudo execution.
282 src/daemon/systemd-lifecycle.ts READ; retained Environment selects and freezes OPENCLAW_SYSTEMD_UNIT and manager route. Explicit systemd identity and confirmed removal target avoid acting on another service; legacy-unit removal remains migration behavior.
281 src/infra/state-migrations.tui-last-session.ts READ; retained Doctor-only import retains legacy last-session data into shared SQLite using explicit state-root env. beforeClaim/beforeVerify/removeSource seams cover source-race and cleanup behavior; legacy naming alone is not deletion evidence.
281 src/infra/system-presence.ts READ; retained Env only feeds runtime service-version identity. Pending visibility, connection publication and continuous-clock expiry protect actual presence lifecycle; no ambient feature flag found.
281 src/logging/diagnostic-profile.ts READ; retained NODE_OPTIONS and NODE_V8_COVERAGE are conflict detection for existing debugger/profiler/coverage ownership. Capture authority, cancellation and cleanup-uncertainty checks protect the ephemeral inspector session.
280 src/agents/embedded-agent-runner/run/attempt-bundle-tools.ts READ; active-owner Active heartbeat ownership list includes this path. process.env feeds schema normalization; raw-model/restart-safe/client-tool/MCP/LSP controls enforce actual tool policy, authority and cleanup boundaries.
280 src/infra/update-candidate-plugin-repair.ts READ; retained OPENCLAW_UPDATE_IN_PROGRESS plus rehearsal-root selection identify published-driver candidate repair. Rechecks preserve private-copy containment and source identity while supplementing missing dependencies; this is a required update compatibility path.
279 apps/macos/Sources/OpenClaw/RemoteGatewayProbe.swift READ; retained No ambient environment reader here: env references are user guidance or the SSH environment passed by CommandResolver. Auth error distinctions, direct/SSH connection modes, and bounded health probe are live UI behavior.
279 src/cli/daemon-cli/start-repair.ts READ; retained Target env keys compare installed and ambient state/config/port before repair, while wrapper/runtime/Bun selection preserves installed ownership. Removing selectors or guards could retarget an existing Gateway.
279 src/infra/update-candidate-rehearsal.ts READ; active-owner Rehearsal deliberately clears service, auth, update-handoff and plugin selectors and retargets state/workspaces. Both migration policies protect candidate isolation; active heartbeat ownership path.
279 src/secrets/target-registry-data.ts READ; retained OPENCLAW_BUNDLED_PLUGINS_DIR is set for source-tree docs generation. sourceTree bypasses cached/persisted metadata and enables strict load errors; plugin manifest secret declarations and config-scoped registry behavior are live contracts.
278 extensions/elevenlabs/realtime-transcription-provider-factory.ts READ; retained XI_API_KEY fallback is documented and listed in the ElevenLabs plugin manifest. VAD/manual commit, sample rate, audio format and language controls are provider configuration contracts.
278 src/gateway/terminal/launch.ts READ; retained SHELL/ComSpec/HOME choose host terminal launch and TERM/COLORTERM/OPENCLAW_TERMINAL describe renderer capability. Deferred-restart policy preserves sandbox and enabled-state revocations across config transactions.
278 src/infra/net/proxy-env.ts READ; retained HTTP_PROXY/HTTPS_PROXY/ALL_PROXY and lowercase/NO_PROXY precedence implement external proxy contracts. Separate HTTP-only trust gate versus explicit ALL_PROXY support preserves SSRF boundaries; matcher extensions remain intentional.
278 src/skills/lifecycle/source-install.ts READ; retained Git acquisition sanitizes environment and fixes GIT_CONFIG_NOSYSTEM/GIT_TERMINAL_PROMPT for unattended source installation. force, timeout, slug, config policy, and remote tracking all participate in live install paths.
277 extensions/openai/speech-provider.ts READ; retained OPENAI_API_KEY and OPENAI_TTS_BASE_URL are documented provider inputs (docs/providers/openai/voice-and-speech.md and TTS field reference); format/voice/model/speed fields are supported speech contracts.
277 extensions/xiaomi/speech-provider.ts READ; retained XIAOMI_BASE_URL/API_KEY and XIAOMI_TTS_MODEL/VOICE/FORMAT configure real speech requests; TTS field-reference.md explicitly documents model/voice/format environment defaults.
277 src/agents/auth-profiles/external-auth.ts READ; retained Environment supplies external auth selection; test-only resolver registration is gated by VITEST/NODE_ENV. Explicit profile scope, provider pins and persistence modes protect runtime overlays; no seam deletion proposed.
277 src/agents/tools/media-generate-background-completion.ts READ; retained Current process storage environment is compared with captured requester binding before effects. Lifecycle checks, pending/ambiguous completion outcomes and retained blocked references prevent cross-session writes and duplicate sends.
277 src/commands/doctor-session-transcript-labels.ts READ; retained env selects canonical databases; shouldRepair distinguishes health inspection from frozen historical label rewrite with per-session CAS. Legacy transcript bytes remain a data migration contract, independent of old emitter age.
277 src/status/status-plugin-health.runtime.ts READ; retained Environment passes into the canonical startup activation owner for detailed health. Compact and installed inspection intentionally differ in lazy loading and available facts; no standalone env tuning branch.
276 extensions/crabbox/src/crabbox-sandbox-backend.ts READ; retained Crabbox sandbox backend passes local provider-owner environment to the CLI while remote environment staging stays shared-backend owned. Fixed leases, exec capability admission, cleanup and current runtime checks remain active.
276 extensions/memory-core/src/memory/manager-cpu-worker-runtime.ts READ; retained State/supervisor env is explicitly propagated to transcript-stat workers. Foreground retrieval and background indexing use separate pools; includeIndexState has real keyword-retrieval callers.
276 src/gateway/server-startup-trace.ts READ; retained OPENCLAW_GATEWAY_STARTUP_TRACE is documented and used by performance tooling; OPENCLAW_DIAGNOSTICS_EVENT_LOOP gates timeline sampling. updateCanary feeds supported progress milestones; omitErrorMessage retains privacy-sensitive error reporting.
275 src/agents/models-config.providers.catalog-context.ts READ; retained Env and selected account catalog scope carry provider auth ownership; bounded timeout and live authority protect catalog publication, and provider outcomes retain unavailable inventory.
275 src/commands/doctor-platform-notes.ts READ; retained Environment reads diagnose service labels, auth overrides, compile cache and respawn settings; notes preserve repair/activation ownership and supported low-power-host guidance. No removable default-only knob.
274 extensions/minimax/speech-provider-factory.ts READ; retained MiniMax credential, host, model and voice envs implement provider selection. Portal auth, direct key and config overrides remain distinct; no default-only branch proved.
274 extensions/workboard/src/cli.ts READ; retained OPENCLAW_GATEWAY_URL forbids silent local fallback when a remote target was requested. CLI max-starts/admin/board options select public dispatch behavior; offline data-only fallback reports its outcome.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

l379 environment-owner coverage

Fully READ 1,211 inventoried environment-reading modules over 200 lines (626,062 inventory lines), including root launchers and native Rust/Python/JavaScript owners. This is the cross-cutting environment-owner inventory, not a claim that every unrelated monorepo module was read. Named test/generated/script paths and reserved audit/cron trees were excluded from discovery; remaining test-infrastructure false positives are identified in row reasons. Counts refer to the read snapshot; changed owners/callers were subsequently reviewed and tested. Documented contracts and active-owner candidates were retained.

Part 7/8, descending original size.

READ coverage 7/8
Lines File Read/disposition Finding
274 src/agents/memory-search.ts READ; retained Environment binds agent SQLite location; remaining configurable provider/source/model/vector choices are user contracts. ResolvedMemorySearchConfig and resolveMemorySearchConfig are exported through memory-core-host-engine-foundation; default-only internal settings cannot be deleted merely because the built-in producer fixes them.
274 src/cli/progress.ts READ; retained Environment detects terminal OSC support. Fallback, stream, total and delay options implement distinct terminal modes; withProgress/withProgressTotals are exported by memory-core-host-runtime-cli SDK, so absence from a single caller is insufficient for removal.
274 src/infra/heartbeat-outcome-store.ts READ; active-owner Full read completed. Explicitly excluded heartbeat owner and present in heartbeat-files.txt; environment pins database execution and admitted-run guards protect silent outcome claims. No mutation proposed.
274 src/skills/runtime/remote-skills.ts READ; retained VITEST/NODE_ENV reset clears node/reconciler state for isolation. canExec/node selection and connection generations enforce remote-skill availability; local env probes intentionally do not apply.
273 src/infra/runtime-guard.ts READ; retained PATH is diagnostic runtime evidence. Node/Bun version and SQLite capability checks, supported diagnostic command exceptions, one-time warnings, and pre-dotenv runtime recovery are supported startup behavior.
273 src/infra/windows-process-start.ts READ; retained SystemRoot/WINDIR select trusted native diagnostic executables. SEALED_RUNTIME_BUILD avoids a replaced installation native dependency; timeout parameters and native/PowerShell/WMIC fallback provide PID-reuse-safe process identity.
272 src/projects/project-registry.ts READ; retained Project registry captures environment and shared-state admission before async reads and finite checkout operations. Current/rollback paths deliberately retain custody across cancellation.
271 extensions/codex/src/session-catalog-listing.ts READ; retained OPENCLAW_NODE_EXEC_HOST=app prevents an embedded worker replacing the native Mac catalog reader. Legacy turns fallback is explicitly a shipped native-node continuation contract; no Codex behavior change proposed.
270 extensions/qa-lab/src/mantis/cli.ts READ; retained Public Commander options and env-name credential selectors expose QA workflows; no direct process environment reader. CLI options retain artifact, lease, browser, model, scenario and timeout contracts.
269 extensions/zalo/src/api.ts READ; retained ZALO_API_URL supports alternate endpoints and meaningful provider-boundary QA (actions, target-prefix, pre-aborted and probe integration tests plus qa-lab crabline transport); fetch/timeout/handoff controls protect actual dispatch.
269 src/config/sessions/targets-read-availability.ts READ; retained Explicit env/read candidates/cache/callbacks preserve read availability and physical store ownership; missing versus unreadable states must remain distinct.
269 src/daemon/launchd-install.ts READ; retained OPENCLAW_LAUNCHD_LABEL identifies the current supervisor so installation cannot mutate itself. preserveAutoStart and definitionTransaction encode transactional ownership and rollback behavior; loaded/enabled states are material.
268 extensions/onepassword/src/op-client.ts READ; retained PATH resolves configured CLI; HOME and pure service-account environment prevent desktop prompts. Runner/path/home seams permit secretless testing; timeout and warning options remain credential-client contracts.
268 src/gateway/session-transcript-readers.ts READ; active-owner Captured environment binds history reads to the selected store. Process-held incognito adapters are explicitly retained for active P7c migration; worker and local routes are not dead duplicated implementations.
267 src/gateway/github-public-api.ts READ; retained GH_TOKEN/GITHUB_TOKEN are host-scoped credential sources. Configured token degradation, host matching, selected-identity revalidation and anonymous public fallback preserve credential and lazy plugin API contracts.
266 src/agents/transcript-policy.ts READ; retained Transcript policy keys include environment-sensitive Anthropic base URL; provider hooks own policy with a generic custom-provider fallback. Direct API and supported-model conditions bound in-history updates.
265 src/gateway/session-group-catalog.ts READ; retained Environment is a database identity selector for a lifecycle-owned catalog. Worker admission, exact identity aliasing, revision invalidation, and serialized writes prevent stale publications; no tuning flags.
265 src/infra/device-pairing-worker.ts READ; retained baseDir env selects pairing state; context/admit/current/token-replacement callbacks enforce broker admission and publication. Join-code/runtime-fact cases preserve distinct authority semantics.
265 src/plugin-sdk/facade-resolution-shared.ts READ; retained Environment separates alternate discovery from active runtime ownership. preferSource=false has a production caller through public-surface-loader/facade-loader; bundled disable/source selection and boundary roots retain lazy public-artifact behavior.
264 src/agents/runtime-plan/credential-scoped-model.ts READ; retained env forwards provider metadata scope. Credential/direct selection, native model ownership and dynamic refresh flags control real materialization; run-local and generation memo lifetimes intentionally differ.
264 src/commands/onboard-remote.ts READ; retained OPENCLAW_ALLOW_INSECURE_PRIVATE_WS is documented process-only break-glass behavior. Secret mode/origin options preserve endpoint-bound auth and discovery choices; not safe to remove as an unused default.
264 src/infra/update-triage.ts READ; retained Captures operator env before package replacement and combines it with owned installation selectors. Removing update markers permits fresh diagnostic invocation; interactive and machine modes have distinct recovery flows.
263 extensions/acpx/src/pi-session-catalog-runtime.ts READ; retained PATH discovers the real Pi CLI for continuation/resume; process-home fallback policy guards isolated-state discovery and reads. Shared catalog family consumes all supplied node/capability/continuation settings.
263 extensions/telegram/src/account-inspect.ts READ; retained TELEGRAM_BOT_TOKEN is a default-account fallback; environment SecretRefs honor the read-only resolver policy. envToken injection preserves inspection/duplicate-token behavior without executing secret providers.
263 src/commands/runtime-plugin-install.ts READ; retained Environment selects install records and paths. Silent/interactive output, capability consent and version-bound official runtime descriptors support current onboarding, supervision and repair routes.
263 src/infra/dotenv-global-core.ts READ; retained OPENCLAW_STATE_DIR suppresses unrelated default gateway.env for isolated state. Additional paths, filters, override keys and quiet warnings serve deterministic precedence and managed-service refresh; sync/async readers share parsing/application.
262 extensions/qa-lab/src/live-transports/slack/slack-live.config.ts READ; retained OPENCLAW_QA_SLACK_* values are explicit live QA credential/target inputs. Overrides exercise approvals, streaming, message tools and allowlist boundaries; instrumentation records actual transport attempts.
262 src/agents/sandbox/docker-mount-source.ts READ; retained DOCKER_HOST/DOCKER_CONTEXT participate in namespace cache identity. Container boot/mount-namespace proof, supported bind checks, and shadowed/read-only mount handling establish source authority.
262 src/agents/worktrees/checkout-git-config.ts READ; retained Env constructs a scoped trusted Git config boundary for source-only operations while preserving authoritative refs and approved identity/index inputs. Native versus sanitized policies and cleanup tracking are substantive safety behavior.
262 src/config/sessions/session-history-read-operation.worker.ts READ; retained Env travels with admitted read targets; retained database optionality distinguishes ephemeral/admitted and durable reads. Request-kind dispatch and identity/fence checks preserve bounded history operations; no flag deletion proven.
262 src/gateway/worker-environments/project-setup-script.ts READ; retained Generated setup explicitly allowlists Git/setup environments and isolates HOME. inspectOnly, runSetupScript and verifiedRetained have real callers; manifest/Git/current-generation checks preserve prepared-workspace safety. No actionable deletion claimed from serialized identity fields.
262 src/infra/state-migrations.meeting-transcripts-detection.ts READ; retained OPENCLAW_STATE_DIR anchors Doctor-only transcript inspection. doctorOnlyStateMigrations and artifactPreservingReadOnly distinguish runtime avoidance from offline artifact-preserving reads; export identity and pending-import checks protect migration custody.
261 extensions/minimax/src/minimax-web-search-provider.runtime.ts READ; retained MINIMAX_API_HOST region reuse is documented in docs/tools/minimax-search.md and plugin manifest. Token-plan/API credential envs and explicit region/config precedence are public provider contracts.
261 src/agents/auth-profiles/source-check.ts READ; retained Environment pins auth-source readers and shared-store admission. Legacy/unreadable canonical sources intentionally fail through the loader rather than permit env-auth fallback.
261 src/commands/status-overview-rows.ts READ; active-owner Active heartbeat overlap. OPENCLAW_NO_AUTO_UPDATE, Nix mode and DO_NOT_TRACK render documented update/telemetry policy; presentation consumes actual degradation, backup and session facts.
261 src/commands/uninstall.ts READ; retained Environment is passed to the native service owner. Scope, --yes, noninteractive, dry-run, workspace preservation, and teardown-success gates are user-facing uninstall/data-safety contracts.
261 src/daemon/hosted-stop.ts READ; retained Environment is captured for native stop executor. Process ownership, cgroup, invocation, manager scope, and current-authority checks bind exact Gateway shutdown; options are lifecycle state, not unused knobs.
261 src/infra/clawhub-artifacts.ts READ; retained CLAWHUB_GITHUB_CODELOAD_BASE_URL is exercised by the real spawned CLI GitHub-skill installation E2E, routing a synthetic codeload server. Retain this meaningful boundary-test control and artifact integrity/auth separation.
261 src/state/agent-deletion-journal.read.ts READ; retained Environment captures exact state source. Maintenance versus other read purposes preserve deletion tombstones/recovery holds; current admission and topology retry prevent stale ownership reads.
260 src/cli/daemon-cli/restart-health-inspect.ts READ; retained Env selects service, health probe, and owner-lease state. Exact version/build, plugin-health, probe host, timeout/deadline, and startup-phase controls distinguish healthy/current from merely listening; retained old-release ownership path is explicit.
259 extensions/azure-speech/speech-provider.ts READ; retained Azure key/region aliases and AZURE_SPEECH_ENDPOINT are documented in docs/providers/azure-speech.md and plugin manifest. Speech/Talk config, directives and telephony format paths remain distinct supported inputs.
259 src/plugins/plugin-lifecycle-lease.ts READ; retained VITEST worker/pool selectors retain isolated state resolution for narrow test env bags. leaseMs/waitMs, processBound, schemaPolicy and caller assertions govern cross-process mutation admission, nested ownership, invalidation and cleanup.
258 extensions/voice-call/src/tunnel.ts READ; retained NGROK_AUTHTOKEN is passed through child env; provider/domain/port/stream-path options are real exposure contracts. Bounded startup output and process settlement are necessary lifecycle behavior.
258 src/commands/doctor-claude-cli.ts READ; retained Env scopes executable lookup and removes backend clearEnv keys before Claude auth status. Dependency injection avoids actual processes in health tests; workspace checks cover each selected Claude agent.
257 src/skills/library/selection.ts READ; retained env selects immutable library revision roots and cache keys; async preparation captures it before reads. The synchronous loader explicitly preserves v2026.9.8 SDK discovery/tool-construction compatibility, so local caller scarcity is insufficient for deletion.
256 src/daemon/systemd-user-transport.ts READ; retained USER/LOGNAME/SUDO_USER, XDG_RUNTIME_DIR, and DBUS_SESSION_BUS_ADDRESS choose the actual user-manager route. Admission retries timed-out discovery under independent authority/deadline; routing facts never grant mutation custody.
256 src/infra/provider-usage.fetch.claude.ts READ; retained CLAUDE_AI_SESSION_KEY, CLAUDE_WEB_SESSION_KEY and CLAUDE_WEB_COOKIE are documented usage-tracking fallback credentials for tokens lacking user:profile scope. Extra-usage switch avoids duplicate billing display.
256 ui/src/i18n/lib/translate.ts READ; retained VITEST/NODE_ENV exposes consumed loader injection for locale failure/retry scenarios. Locale generation, system-versus-explicit preference and stale-chunk recovery are substantive UI lifecycle controls.
255 src/channels/plugins/account-config-mutation.ts READ; retained Plugin manifest useEnv metadata controls required/any credential checks for --use-env. Prepared account config and lifecycle hooks retain plugin-owned mutation and authority boundaries.
255 src/cli/update-cli/update-command-service-env.ts READ; retained Managed service selectors, relative path normalization and compile-cache disablement preserve update target identity. Whole-phase and key-scoped env restoration have intentionally different ownership semantics.
255 src/infra/state-migrations.audit-backup.ts READ; active-owner Full read completed. Audit migration closure is explicitly excluded; captured environment targets shared-state witness. Sanitized backup/checkpoint rebasing and filesystem/database witnesses protect archive integrity.
255 src/infra/update-package-manager.ts READ; retained env preserves candidate virtual-store isolation and temporary pnpm bootstrap PATH. Preferred manager/version and work timeout handling implement actual update/rollback behavior; fallback selects alternate installed managers only for non-pnpm ownership.
255 src/infra/update-repair-agent.ts READ; retained Environment is redaction input for bounded repair prompts. Budget, current-owner and cleanup controls select real repair behavior; single-turn validation and uncertain cleanup retain update ownership.
255 src/secrets/runtime-fast-path.ts READ; retained Path-env merging resolves config/agent/auth locators; fast-path admission distinguishes real refs, web tools and store evidence. Revision watermarks and explicit includeAuthStoreRefs/loadAuthStore controls preserve secret snapshot ownership.
254 extensions/lmstudio/src/runtime.ts READ; retained Env and allowUnresolved handle configured SecretRefs/env markers while explicit Authorization headers retain ownership. Header auth, local placeholders, BYOK profiles, and configured API-key precedence remain active provider contracts.
254 src/commands/doctor-completion.ts READ; retained Completion generation explicitly sets or clears the skip-plugin-command marker for core-only versus full caches. Shell/noninteractive controls and profile-write handling serve Doctor/setup user behavior; ambient repair state cannot override full generation.
254 src/gateway/local-request-context.ts READ; retained process.env selects config revision owner. Embedded context intentionally disables unsupported services while retaining local session/model capabilities and resource-host cleanup; cron-related closure retained.
254 src/plugins/config-state.ts READ; retained VITEST controls intentional minimal plugin/memory defaults unless explicitly configured. Runtime normalized policy is lifecycle-prepared and immutable; alias/retirement and activation APIs are real config contracts.
253 src/agents/subagents/registry/subagent-control-session.ts READ; retained Copies platform-aware process env to bind cancellation to its original store. Generation claims, exact expected session revisions, FIFO publication and commit guards are functional authority controls.
253 src/state/openclaw-state-lease-worker.ts READ; retained Worker context environment binds lease storage and process identity. observeExpiry/processBound/purpose/stage govern live admission and post-commit expiry publication; no cleanup proposed in the lease/heartbeat authority closure.
252 apps/macos/Sources/OpenClaw/ChromeExtensionSetup.swift READ; retained PATH, OPENCLAW_STATE_DIR/CONFIG_PATH and NO_RESPAWN bind browser setup to this Mac and its node profile. Injected action and launch-plan controls preserve local testing, default-profile ownership and retired-document cancellation.
252 extensions/slack/src/accounts.ts READ; retained SLACK_BOT_TOKEN/APP_TOKEN/USER_TOKEN are real default-account credential inputs; identity, mode and read-only policy select supported authorization behavior.
252 src/agents/embedded-agent-runner/run/attempt-tool-catalog.ts READ; retained Environment is forwarded to runtime diagnostics. Code-mode/tool-search controls derive from prepared policy; execution gating, schema quarantine, abort wrapping, and refresh preserve live tool authority.
252 src/commands/channels/status.runtime.ts READ; retained process.env participates in configured-channel fallback discovery. Gateway/auth unavailable modes, channel filtering and JSON/text output preserve CLI diagnostic behavior.
252 src/config/sessions/conversation-registry.ts READ; retained Environment pins logical and physical conversation store ownership across worker reads/writes. Incognito native-owner fallback is explicitly staged migration behavior; do not remove it. Scope/invalidation checks preserve current identity.
252 src/gateway/live-agent-probes.ts READ; retained Live proof helper strips VITEST child variables and has meaningful image-probe override and real cron CLI verification. Cron proof behavior is outside removal scope and retained.
251 extensions/googlechat/src/accounts.ts READ; retained GOOGLE_CHAT_SERVICE_ACCOUNT and GOOGLE_CHAT_SERVICE_ACCOUNT_FILE are documented default-account fallbacks and package/setup metadata. Named accounts deliberately do not inherit ambient credentials; strict versus inspect modes preserve configured-unavailable reporting.
251 src/gateway/auth-surface-resolution.ts READ; retained OPENCLAW_GATEWAY_TOKEN/PASSWORD implement canonical auth precedence. suppressEnvAuthFallback has a production resume CLI caller preventing ambient credentials from overriding an exact target; probe/interactive differences preserve selected SecretRef ownership.
251 src/gateway/node-pairing-ssh-verify.ts READ; retained USER/USERNAME only provide a fallback SSH user. sshVerify config, CIDRs, timeouts, cooldowns and probe injection protect bounded first-pairing identity verification; no default-only removal proved.
251 src/infra/executable-path.ts READ; retained PATH/PATHEXT/home/cwd are executable-resolution inputs. Cache bypass, extensionless probing, Windows native suffixes, relative PATH semantics, symlink-parent preservation, and invalidation are real resolution contracts; nearby system.which is already lead-owned.
251 src/plugins/loader-provenance.ts READ; retained Environment resolves authored install and load paths. emitWarning separates recorded diagnostics from output, while allowlist and provenance warnings preserve plugin trust distinctions; no proven default-only option.
250 src/flows/doctor-health-contribution-runners.state.ts READ; retained Doctor runners pass environment and repair intent to existing owners. Legacy parent version handling preserves update compatibility. A single-use lazy import wrapper is trivial and not counted as a substantive candidate; cron/audit closures excluded.
249 src/infra/outbound/channel-bootstrap.runtime.ts READ; retained Environment fingerprints cache scope and pins OPENCLAW_STATE_DIR across async metadata preparation. Sync/async bootstrap preserve selected plugin generation, ambient-owner policy and current authority; lazy boundaries are intentional.
249 src/plugins/installed-plugin-index.ts READ; retained Environment anchors discovery, install index path, compatibility host and enablement policy. Prepared predicate caches only one operation and retains provider compatibility and workspace scope behavior.
248 extensions/acpx/register.runtime.ts READ; retained OPENCLAW_SKIP_ACPX_RUNTIME is actively set by Docker E2E and diagnostic scripts. Startup/probe purpose and lifecycle revisions support lazy registry promotion, inspection and shutdown without reviving old authority.
248 extensions/browser/src/doctor-browser.ts READ; retained Environment is used for DISPLAY/WAYLAND readiness diagnostics. Profile discovery/Keychain avoidance and skipped native-host repair are intentional unattended Doctor contracts, not dead no-op machinery.
248 extensions/openai/openai-chatgpt-oauth.runtime.ts READ; retained HOMEBREW_PREFIX only helps TLS remediation; proxy environment is delegated to runtime owner. Remote/local and manual input paths preserve OAuth callback fallback and prompt cancellation. No Codex behavior change proposed.
248 src/plugins/install-paths.ts READ; retained Environment/homedir feed the canonical active install-root owner. Scoped ids, legacy npm record identity, hashed generations, and allowMissing path handling support safe install/update-in-place contracts.
247 extensions/zalouser/src/session-state.ts READ; retained Zalouser captures state/supervisor environment for durable credentials. Revocation markers fence refresh; older-host atomic update fallbacks cite released plugin-state contracts and cannot be removed as unused.
247 src/agents/harness/context-engine-turn-outbox-store.ts READ; retained Captured OPENCLAW_STATE_DIR and agent path select the durable worker. Incognito actor/authority/session binding is explicit migration/runtime custody and must be retained; command adapters preserve exact outbox operations.
247 src/cli/container-target.ts READ; retained OPENCLAW_CONTAINER and bypass/hint markers drive actual container CLI routing. OPENCLAW_CONTAINER_ALLOW_LOOPBACK_PROXY_URL is documented intentional override; host auth/profile env is stripped before container execution.
247 src/config/config-journal-snapshot.ts READ; active-owner Config audit snapshot closure is outside mutation scope. Env/homedir select fingerprint-key ownership; readOnly avoids privileged inspection side effects; expectedSnapshot implements guarded restoration.
246 extensions/google-meet/src/setup.ts READ; retained Explicit env feeds Twilio setup credential checks. Mode/transport/dial plan/fullConfig options drive real Google Meet setup diagnostics.
245 src/agents/embedded-agent-runner/run/auth-plan.ts READ; retained Environment is auth planning/provider evidence. Native-session auth, external CLI overlay scope, prepared attempts and harness convergence are live provider execution contracts; no private env knob or Codex behavior change proposed.
245 src/agents/prepared-model-runtime.inbound-registry.ts READ; retained env fingerprints distinguish registry identities and explicit env prevents lending ambient Gateway ownership. Runtime selection, readOnly and artifact/registry injection control actual plugin acquisition and retained generation reuse.
245 src/llm/providers/stream-wrappers/proxy.ts READ; retained KILOCODE_FEATURE is documented provider attribution; OpenRouter response cache aliases, retention and reasoning options implement provider contracts. Deprecated public wrappers need SDK compatibility review before removal and are not proven unused here.
244 extensions/crabbox/src/crabbox-worker-node-process.ts READ; retained Generated launcher uses nodeEnv and exact OPENCLAW_STATE_DIR identity to verify existing Linux nodes. Windows/macOS receipts independently check executable/start/desktop identity; watchdog budgets and cleanup preserve enrollment authority.
244 extensions/discord/src/endpoint-runtime.ts READ; retained DISCORD_API_URL is documented in docs/channels/discord.md and used by live QA routing. REST, media, attachment and Gateway origin guards share this endpoint owner; retained null versus undefined runtime input has intentional bypass/default semantics.
244 src/cli/qr-cli.ts READ; retained Gateway token/password environment precedence and public CLI overrides select pairing auth. remote/limited/voice-node/JSON/ASCII modes all have explicit registered command behavior.
244 src/commands/dashboard.ts READ; retained Environment feeds configured authenticated Control UI handoff. JSON/noOpen/yes are CLI contracts; allowRecovery=false has read-only JSON and post-recovery validation callers and must remain.
244 src/node-host/auto-update.ts READ; retained OPENCLAW_NO_AUTO_UPDATE and OPENCLAW_NO_RESPAWN disable activation; configuration opt-outs and channel policy are reread across awaited work. Node-host docs explicitly document auto-update opt-out.
242 extensions/migrate-hermes/source.ts READ; retained HERMES_HOME, supervised-child, HOME/USERPROFILE, LOCALAPPDATA and XDG_DATA_HOME mirror source-product profile/auth discovery. Explicit-source credential containment is meaningful; duplicate private fallback booleans are too small to justify a separate candidate.
241 packages/ai/src/env-api-keys.ts READ; retained Provider API keys and AWS/Google ambient authentication are public auth contracts. Browser-safe Node builtin loading and Bun /proc/self/environ fallback are named dependency/platform compatibility paths; no unsupported removal inferred.
241 src/agents/auth-profiles/mutation-lineage.ts READ; retained Environment selects canonical auth store; bounded lineage and includeMain semantics preserve rollback fences after eviction. VITEST/NODE_ENV only publishes focused mutation-count/reset test access.
241 src/agents/sandbox/ssh.ts READ; retained process.env is sanitized for SSH transport. Settings control explicit SSH security/materialization contracts; shared remote-shell delegation and cleanup are active owners.
241 src/daemon/launchd-restart-handoff.ts READ; retained Env supplies service label/home/log target but preserves caller PATH for control commands. kickstart/reload/start-after-exit/park represent distinct launchd lifecycle actions; bounded reload retries protect deregistration races.
241 src/state/openclaw-state-db-current-reader.ts READ; retained Env is used to revalidate access to the exact current state DB. Retained maintenance scope, physical identity, schema admission and synchronous read enforcement are authority/lifecycle contracts.
240 extensions/codex/src/app-server/transport-process-registration.ts READ; retained Environment binds the process registration store to canonical state. Process identity/fingerprint, bounded orphan inspection, non-evicting registrations and cleanup joins are lifecycle controls; no Codex behavior change proposed.
240 extensions/onepassword/onepassword-secret-ref-resolver.js READ; retained Fully read all 240 lines. CLAW_1PASSWORD_OP is documented, trust-checked and forwarded by the plugin manifest; HOME/USERPROFILE/OPENCLAW_HOME/OPENCLAW_STATE_DIR/OPENCLAW_PROFILE preserve platform and profile path contracts. OP_SERVICE_ACCOUNT_TOKEN plus forced desktop/biometric disable values make reads noninteractive. Fixed concurrency, request/value caps and timeout are explicitly documented. Static asset/runtime separation explains local path resolution; no safe deletion candidate.
240 extensions/team-reports/src/config.ts READ; retained Environment is passed to canonical SecretRef resolution. Strict reporting, schedule, retention, source, and people schemas are plugin configuration contracts.
240 src/config/sessions/session-placement-evidence.ts READ; retained Captured environment pins placement evidence to state roots. Incognito generation, canonical reader continuation, physical-path identity, and absent-to-unknown downgrade after concurrent changes are live authority/evidence contracts.
240 src/plugins/web-provider-runtime-shared.ts READ; applied Applied after caller/contract verification: Candidate: private resolver activate/cache options have only default production callers. Nondefault activate:true/cache:false calls are confined to focused unit tests; no SDK, manifest, docs or compatibility-registry exposure found. Preserve setup/runtime distinction, cache=true, activate=false, lazy public artifacts and registry-scope guards.
240 src/state/agent-deletion-discovery.ts READ; retained OPENCLAW_AGENT_DIR/PI_CODING_AGENT_DIR identify retained adjacent artifacts and deletion namespaces. Maintenance/runtime purpose and configured/registered target matching preserve surviving owners and unknown-history safety.
239 extensions/zai/detect.ts READ; retained VITEST disables accidental network probes unless fetchFn is injected. endpoint and timeoutMs select real onboarding behavior; bounded error bodies and unsupported-model-only fallback distinguish unavailable models from authentication failures.
239 src/commands/models/list.auth-overview.ts READ; retained Process env auth resolution is user-visible model status. Precomputed candidate/evidence maps avoid setup fallback, synthetic projections prevent credential leakage, and alias/profile/SecretRef paths reflect real authentication contracts.
239 src/infra/path-env.ts READ; retained OPENCLAW_ALLOW_PROJECT_LOCAL_BIN is an explicit opt-in security boundary; PATH_BOOTSTRAPPED prevents repeated bootstrap. PNPM/NPM/mise/XDG/platform inputs select real executable locations with trust filtering.
238 extensions/codex/src/app-server/run-attempt-start.ts READ; retained process.env feeds active-thread reviewer policy; native hook relay, loop detection and workspace restrictions preserve admitted tool policy. No Codex behavior change proposed.
238 src/commands/doctor-agent-memory-schema.ts READ; retained Environment selects registered agent databases under offline Doctor maintenance. shouldRepair gates requested schema recovery; legacy columns/triggers need preservation-aware migration.
238 src/skills/runtime/env-overrides.ts READ; retained Skill env overrides are a security/lifecycle owner: only permitted skill credentials are injected, reference-counted across users, exposed as active keys for child-env stripping, then reverted.
237 extensions/matrix/src/matrix/accounts.ts READ; retained Global/scoped Matrix envs participate in account auth precedence. Sync and async readers serve separate callers; config/env snapshots and stored-credential identity prevent resolving one account from another login.
237 extensions/qa-lab/src/qa-credentials-bootstrap.ts READ; retained Broker env pair is validated together; OPENCLAW_QA_ALLOW_INSECURE_HTTP is documented and confined to loopback. CLI env allowlist, launcher fallback and cleanup-uncertain stop protect credential bootstrap.
237 src/commands/status.scan.gateway.ts READ; retained Environment selects only gateway dispatch config/auth and local installation status. all controls requested update detail; gateway projections and fallback missing-data reasons preserve online/offline ownership and redaction.
236 src/infra/state-migrations.audit-checkpoints.ts READ; active-owner Environment selects audit checkpoint storage; doctorOnlyStateMigrations gates retired imports and generation checkpoints preserve interrupted scrub recovery. Audit closure excluded from mutation proposals.
236 src/infra/update-runner-git-commands.ts READ; retained OPENCLAW_UPDATE_PREFLIGHT_LINT is documented in docs/cli/update/how-updates-run.md. NODE_OPTIONS/build cache and pnpm env precedence preserve operator policy, candidate-root isolation and disposable-workspace restoration.
236 src/infra/widearea-dns.ts READ; retained OPENCLAW_WIDE_AREA_DOMAIN is documented CLI DNS/discovery fallback in docs/gateway/bonjour.md. Zone metadata options encode DNS-SD contracts; durable replacement and serial progression remain functional.
236 src/process/terminal-pty-node.ts READ; retained process.env initializes the Node PTY helper for Bun hosts. Startup/cleanup bounds and optional spawn-admission callbacks preserve process authority, pipe drainage and complete settlement.
235 src/agents/session-suspension.ts READ; retained VITEST/NODE_ENV only exposes lifecycle test helpers. TTL, deferred suspension and generation fencing protect quota failover/shutdown state; no removable environment control.
235 src/cli/daemon-cli/shared.ts READ; retained Nix, Gateway port/profile and safe env projection are documented service/operator interfaces. Definition-path exposure differs for shipped node versus Gateway JSON output.
235 src/commands/channel-setup/trusted-catalog.ts READ; retained Trusted channel catalog consumes env-based activation policy and explicit owner trust. Bounded fallback avoids untrusted workspace shadows while setup may intentionally display install candidates.
235 src/gateway/session-groups.ts READ; retained Environment selects catalog state; worktree/default/group mutation inputs are protocol behavior. assertCurrent/target checks and prepare-retire sequencing preserve concurrent membership and authorization.
235 src/plugins/plugin-native-module-loader.ts READ; retained JITI_JSX aligns native Bun JSX transformation with the instance module loader and has source-generation tests. Native resolver/capture branches preserve selected package conditions, SDK identity and plugin generation disposal.
235 src/process/supervisor/service-child-relay.ts READ; retained Environment is inherited by the retained process-group anchor; build/runtime branches select deployed entrypoint and Bun stream cleanup. Generation and retirement state enforce process ownership.
234 extensions/acpx/src/pi-session-catalog.ts READ; retained process.env is forwarded to the Pi session-store owner for both list and read. Cursor/search/page limits and versioned active-branch parsing implement the session-catalog contract.
234 src/daemon/systemd-peer.ts READ; retained Captured ambient selectors/SUDO_USER retain the originally chosen systemd transport. Private peer credential, process and unit checks fence read ownership; optional admission fallback differs from post-admission failure.
233 src/agents/watched-sessions-prompt.ts READ; retained Captured env binds worker title reads to the canonical agent store. Synchronous helper is explicitly protected by src/plugins/compat/watched-sessions.ts; enabled/tool/sandbox gates avoid disclosing unavailable reads.
233 src/cli/local-state-owner.ts READ; retained Captures and pins state/config env and physical root identity. Foreign-owner refusal, expected-owner routing, offline lock custody, and unknown-outcome handling prevent duplicate or retargeted mutations.
233 src/cli/update-cli/update-command-failure-recovery.ts READ; retained Environment resolves original service/update namespace. Startup-wait and service-stopped facts distinguish real recovery observation from authority to restart; unsafe prior recovery verdict remains authoritative.
232 apps/macos/Sources/OpenClaw/GatewayChildSupervisor.swift READ; retained Supervisor markers are intentionally stripped and OPENCLAW_GATEWAY_HOST_LIFELINE is set for app custody. Injected clock/launcher support lifecycle proof; restart/backoff and shutdown budgets are real behavior.
232 extensions/irc/src/accounts.ts READ; retained IRC_* variables are documented default-account configuration (docs/channels/irc.md). Config/secret refs, password files and unavailable diagnostics preserve credential precedence and per-account isolation.
232 extensions/qa-lab/src/live-transports/telegram/cli.runtime.ts READ; retained OPENCLAW_QA_TELEGRAM_SUT_* defines an actively CI-written Linux process boundary: launcher, uid/gid, runtime/preload, forwarded names and cleanup evidence. These are release isolation controls, not dead developer flags.
232 extensions/qa-lab/src/suite-evidence.ts READ; retained OPENCLAW_QA_REF carries captured launch identity into evidence rows; diagnostic, imported entries, child evidence, and selected ids preserve immutable observation custody and retry attribution.
232 src/gateway/credentials-secret-inputs.ts READ; retained Environment participates in canonical Gateway credential precedence. SecretRef probes avoid resolving inactive secrets, while lazy backstop handles fallback precedence; no removable env/internal switch.
232 src/gateway/server-startup-session-migration.ts READ; retained Captured database environment plus live Gateway state/lease identity fence orphan reconciliation. Migration injection and assertCurrent retain read repair, receipt settlement and known owner checks; startup age alone never authorizes mutation.
231 apps/macos/Sources/OpenClaw/PrimaryGatewayConnectionEditor.swift READ; retained OPENCLAW_GATEWAY_TOKEN/PASSWORD are only detected to warn about the app launch-auth override. Draft route changes clear credentials; original URL/fingerprint and unsupported secret-reference tracking preserve exact connection ownership.
231 src/commands/doctor-gateway-installation.ts READ; retained Environment selects supervised service inspection and lock custody. Repair kind and maintenance authority distinguish config/definition/install repair; running-systemd rewrite protections and Windows restart handling are active lifecycle contracts.
231 src/config/sessions/session-canonical-validation-readiness.ts READ; retained Environment carries canonical shared root and external supervision into validation worker. Worker injection and owner assertion govern shared-drain eligibility; batch limits, contention backoff, FIFO admission, and retained claims preserve certification behavior.
230 src/agents/tools/manifest-capability-availability.ts READ; retained Process env supplies manifest-declared auth/config signals. Capability-specific auth checks, explicit profile bindings, installed enablement, and metadata snapshots serve static availability without loading plugin runtime.
230 src/gateway/progress-card-store.ts READ; retained Environment captures session transcript storage ownership. Incognito and durable worker paths serve distinct physical storage lifetimes; exact target/identity assertions and FIFO admission protect progress-card writes.
230 src/infra/net/undici-runtime.ts READ; retained HTTP(S)_PROXY and dynamic NO_PROXY route requests through lazy undici dispatchers. SOCKS substitution preserves ProxyAgent credential boundaries and lifecycle settlement; timeout/TLS inputs are meaningful transport controls.
230 src/tui/tui-submit.ts READ; retained TERM_PROGRAM/MSYSTEM/SHELL select real terminal paste fallback. Burst timing/clock hooks, admission snapshots and blocked-draft restoration protect meaningful paste and submit behavior.
229 extensions/memory-wiki/src/config.ts READ; retained Environment and HOME select the default vault root. Schema exposes vault, bridge, ingest/search/render options as plugin config contracts; agent-scoped constraints enforce correct vault ownership.
229 src/infra/net/node-proxy-agent.ts READ; retained HTTP(S)/NO_PROXY environment is a real transport contract. Fixed target, per-request routing and explicit proxy modes serve different clients; TLS ownership and route errors prevent insecure direct fallback.
229 src/plugins/bundled-discovery-state.ts READ; retained env plus active install roots key machine-owned bundled-discovery compatibility state. Snapshot and live memos have distinct invalidation, and the prepared-reader callback has a production installed-index caller.
227 extensions/browser/src/browser/doctor.ts READ; retained DISPLAY/WAYLAND_DISPLAY, platform and uid control genuine Linux headed/root diagnostics; extensionVersion checks report bundle drift. Diagnostic injection does not bypass browser launch policy.
227 src/commands/doctor-sqlite-maintenance-lock.ts READ; retained Environment identifies the active state directory for destructive SQLite maintenance. Injectable lock deps support ownership proof; protected paths, symlink/hardlink checks and current authority protect the mutation boundary.
227 src/commands/doctor/cron/quarantine-archive.ts READ; active-owner Process environment gates rehearsal read-only preservation. Archive numbering, hashes, cross-device copy and restoration retain durable migration semantics; cron closure excluded from mutation proposals.
227 src/commands/doctor/shared/legacy-config-migrations.qqbot-account.ts READ; retained QQBOT_APP_ID/CLIENT_SECRET support environment-only migration. Default-account flattening, ordering checks and file-secret conversion preserve credential selection during Tencent QQBot 2.0 cutover.
227 src/gateway/github-repository-publication-snapshot.ts READ; retained Remote child env clears global/system Git config and replacements to make publication deterministic. Private-index staging, filter refusal, byte bounds and digest validation protect checkpoint publication.
227 src/gateway/startup-auth.ts READ; retained OPENCLAW_GATEWAY_TOKEN/PASSWORD and runtime overrides feed supported startup auth. persist/baseHash and persistedGeneratedToken are retained external SDK shape; ensureGatewayStartupAuth is exported by gateway-runtime.
227 src/plugins/provider-model-routes.ts READ; retained Env forwards to the provider-owned public resolveModelRoutes hook. Authored override facts, explicit runtime intent, scoped metadata and catalog ID normalization preserve real plugin route selection.
226 extensions/diagnostics-otel/src/service-genai-attributes.ts READ; retained OTEL_SEMCONV_STABILITY_OPT_IN selects old versus latest experimental semantic conventions. Observation unit distinguishes agent turns from model requests; identity/usage attributes remain consumed telemetry contracts.
226 extensions/minimax/image-generation-provider.ts READ; retained MINIMAX_API_HOST CN routing is documented in docs/providers/minimax.md and shared with provider catalog/search/speech behavior. Two exported builders supply minimax and minimax-portal identities; response limits and base64 validation protect actual media results.
226 src/gateway/connection-details.ts READ; retained OPENCLAW_GATEWAY_URL and documented OPENCLAW_ALLOW_INSECURE_PRIVATE_WS select/validate real routes; explicit/service overrides and SSH/TLS origin scopes preserve credential ownership.
226 src/state/openclaw-state-db-open.ts READ; retained Env is passed into database admission and permissions. existingSchema, busy timeout and initialization callbacks distinguish worker-existing/open/bootstrap lifecycle and preserve integrity/cleanup fencing.
225 apps/macos/Sources/OpenClaw/NodeMode/BundledRuntime+CLI.swift READ; retained Managed shim exports OPENCLAW_PROFILE/SQLITE_LIBRARY; SHELL selects persistent PATH files. Marked symlink ownership and exact legacy shim recognition protect operator files during app upgrades.
225 extensions/anthropic-vertex/stream-runtime.ts READ; retained env resolves GCP ADC/project/region through provider owners; proxy dispatcher is process-stable. Injected stream/client dependencies support transport tests; thinking/token options follow provider contracts.
225 extensions/qa-lab/src/gateway-child-env.ts READ; retained Environment builder owns QA child isolation, provider auth routing, forced-runtime/mock catalog and source/compatibility selection. Scrubbing follows caller patches; flags are meaningful QA runtime controls, not dead production switches.
225 src/cli/claw-banner.ts READ; retained CI/VITEST, TTY, richness and columns select static versus animated terminal presentation. Injected sleep/write and settleWhen allow animation completion and terminal restoration proof.
225 src/state/agent-creation-claim.ts READ; retained Environment selects creation claim state identity. Active-scope checks and retained resource/alias custody prevent recycled or expired claims from gaining database access.
224 extensions/apple-fm/native.ts READ; retained HOME/TMPDIR/DEVELOPER_DIR are narrowly forwarded to Apple native compilation/inference; fixed PATH prevents ambient tool selection. Probe/setup/runtime separation protects optional installation.
224 extensions/signal/src/config-schema.ts READ; retained OPENCLAW_UPDATE_IN_PROGRESS permits canonical-shape projection of legacy transport keys while Doctor repairs untouched source. Normal runtime remains strict; retain published-driver update/migration contract and public channel schema.
224 src/auto-reply/reply/get-reply-fast-path.ts READ; retained OPENCLAW_ALLOW_SLOW_REPLY_TESTS has live qa-lab, gateway harness, and focused regression callers; strict config marker is owned by test/test-env.ts. Full versus fast config/session semantics remain meaningful test controls.
224 src/cli/program/preaction.ts READ; retained OPENCLAW_LOG_LEVEL and NODE_NO_WARNINGS implement CLI presentation policy. Native update admission, guided config, config guards, and Gateway bootstrap distinctions are active command contracts.
224 src/commands/doctor/shared/model-billing-route-migration.ts READ; active-owner Active heartbeat-owned path in supplied exclusion list. Environment and prepared metadata are inputs to before/after billing-route evaluation; explicit externalCli=none avoids credential side effects during Doctor warnings.
224 src/infra/update-candidate-admission.ts READ; retained Candidate env strips continuation authority and source/cache overrides, then pins candidate identity. auto/installed admission and protocol fallback are real installed-updater compatibility contracts; output redaction and cleanup are meaningful.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

l379 environment-owner coverage

Fully READ 1,211 inventoried environment-reading modules over 200 lines (626,062 inventory lines), including root launchers and native Rust/Python/JavaScript owners. This is the cross-cutting environment-owner inventory, not a claim that every unrelated monorepo module was read. Named test/generated/script paths and reserved audit/cron trees were excluded from discovery; remaining test-infrastructure false positives are identified in row reasons. Counts refer to the read snapshot; changed owners/callers were subsequently reviewed and tested. Documented contracts and active-owner candidates were retained.

Part 8/8, descending original size.

READ coverage 8/8
Lines File Read/disposition Finding
223 src/node-host/auto-update-compatibility.ts READ; retained OPENCLAW_STATE_DIR scopes copied database compatibility checks. Runtime/schema checks, candidate CLI manifest proof and cleanup refusal protect automatic updates from shared-state migration and preserve operator guidance.
222 src/plugin-state/plugin-state-worker-client.ts READ; retained Env binds worker database selection; assertActive/assertCurrent/session admission checks enforce custody. Missing/existing-only/observation options distinguish read absence, write settlement, and conditional outcomes; no disposable knob proven.
222 src/process/terminal-pty.ts READ; retained TERM/COMSPEC/PATH and inherited environment translation implement PTY and Windows npm-wrapper contracts. Bun flow-control capability detection and host multiplexer stripping preserve backend compatibility, not private tuning.
222 src/process/windows-command.ts READ; retained PATH/PATHEXT resolution and trusted cmd.exe handling are Windows execution/security contracts; platform and verbatim-argument controls distinguish direct versus batch invocation.
222 src/secrets/channel-contract-api.ts READ; retained Environment selects manifest/hardlink policy. bundledOnly and loadablePluginOrigins bound plugin loading; throwOnLoadError has a strict target-registry caller. Source/built artifact ordering and legacy contract-api basename are external plugin contracts.
221 src/commands/status-all/report-data.ts READ; active-owner Active heartbeat PR exact-path overlap. Env feeds service logs/control-plane workspace; module composes best-effort health, delivery, telemetry, skills and status diagnostics. Retain under current owner.
221 src/gateway/server-methods/sessions-groups.ts READ; retained process.env is forwarded to the session-group defaults owner. Public validated RPCs enforce workspace containment, role scopes and current mutation authority; no internal-only feature switch.
221 src/plugins/manifest-metadata-scan.ts READ; retained env feeds persisted/global/bundled metadata roots without executing plugins. Snapshot fast path, manifest size bound and ranked physical-path/manifest-ID deduplication support active metadata discovery.
220 src/agents/worktrees/capacity.ts READ; retained GIT_REPLACE_REF_BASE is forwarded to Git size measurements. Env binds capacity releases and leases to their exact state owner; reservation, snapshot and cleanup controls preserve storage admission.
220 src/cli/update-cli/update-command-database-context.ts READ; retained Update database context consumes invoking and admitted managed-service environments separately. Foreground/redirect and candidate checks retain exact target schema and service ownership.
219 extensions/discord/src/setup-core.ts READ; retained DISCORD_BOT_TOKEN is offered only for the default account, matching credential isolation. Public setup descriptors and injected lookup handlers drive real account/guild/DM configuration, with unresolved allowlists retained conservatively.
219 src/plugin-sdk/facade-runtime.ts READ; retained Custom env selects a different plugin profile and intentionally bypasses process cache. Sync/async activation loading preserves lazy boundaries; test hooks support loader/activation isolation.
219 src/skills/loading/config.ts READ; retained Skills evaluate dynamic required environment names, configured secrets, binary availability and allowlists. Install preferences are public configuration; remote/prepared probes preserve eligibility and invalidation.
218 extensions/zalo/src/setup-surface.ts READ; retained ZALO_BOT_TOKEN is a supported default-account credential source; allowEnv is account-dependent. Polling/webhook and secret-input options implement real setup configuration with named-account isolation.
218 src/commands/doctor/shared/plugin-update-config-migration.ts READ; retained process.env inspects selected plugin migration availability. Deferred migration selection, inactive-owner preservation and assertCurrent calls preserve package publication/compensation responsibility.
218 src/gateway/session-incognito-lifetime.ts READ; active-owner Captured env pins the transient database owner for generation-fenced expiry and retry. Native incognito acquisition is explicitly staged for the active P7c migration and must be retained.
218 src/gateway/worker-environments/node-worker-workspace-fallback.ts READ; retained Process env supplies sanitized Git inspection. Eligible published-origin fast path and canonical transfer fallback have live authorization and workspace-shape constraints.
217 extensions/matrix/src/setup-config.ts READ; retained useEnv invokes canonical per-account Matrix readiness and clears authored overrides. Single-to-named account promotion preserves current writable config fields; input aliases are public setup compatibility, not proven dead knobs.
217 src/acp/client-helpers.ts READ; retained Environment stripping prevents provider credentials and active skill env leakage into the default ACP server while preserving custom server behavior. Runtime injection supports Windows spawn behavior; permission prompt/log seams are meaningful tests.
217 src/agents/embedded-agent-runner/model.manifest-alias.ts READ; retained Env identity determines whether lifecycle-held metadata is reusable. Alias transport, suppression and explicit-owner trust are manifest/config contracts; no provider selection change proposed.
217 src/commands/triage-failure.ts READ; retained OPENCLAW_SHELL and CODEX_THREAD_ID prevent recursive automatic repair, while supervisor markers route admitted service handoffs. Bounded diagnostics and cancellation preserve original update/startup failure ownership.
217 src/shared/config-eval.ts READ; retained PATH/PATHEXT and current cwd bind executable availability. OS, remote platforms/binaries, env and config requirements are skill/runtime eligibility contracts; bounded pending I/O avoids duplicate probes.
216 extensions/googlechat/src/setup-surface.ts READ; retained Documented default-account GOOGLE_CHAT_SERVICE_ACCOUNT and FILE env inputs are shared with account resolution and manifest. Private wizard flags record actual env/file/inline selection, not unused runtime controls.
216 src/cli/capability-cli/shared.ts READ; retained Provider environment variables are canonical credential-config evidence. Transport, agent/model options, timeout parsing and local secret-config snapshots serve public capability CLI paths rather than internal default-only tuning.
216 src/cli/claws-migrate-cli.runtime.ts READ; retained Environment scopes experimental Claw migration and config-source locks. dry-run/yes/planIntegrity and repeated current-config checks bind consent to the exact migration; no unused gate identified.
216 src/cli/program/message/helpers.ts READ; retained Process env scopes channel plugin discovery. CLI flags are public; preload decisions distinguish Gateway actions from local previews/broadcasts, and command-local stop hooks preserve cleanup.
216 src/cli/update-cli/update-command-plugins-internals.ts READ; retained Environment only formats and normalizes updater guidance/failure facts. Plugin result classification and warning de-duplication preserve produced evidence and existing recovery contracts.
216 src/daemon/service-reconciliation.ts READ; retained UPDATE_RUN_ID_ENV links warnings to published updater ledgers; owner checks prevent duplicate recording under current updates. Backups, policy preservation, exact command checks and uncertain recovery are required service mutation safeguards.
216 src/gateway/server-runtime-config.ts READ; retained Environment supplies canonical Gateway auth. Bind/auth/Tailscale/UI-origin controls enforce configured startup and reload security; legacy-env warning does not revive aliases.
216 src/process/linux-oom-score.ts READ; retained OPENCLAW_CHILD_OOM_SCORE_ADJ is a documented Linux opt-out with per-child overrides. Shell-init stripping/restoration and inherited-score spawning preserve execution env and process identity security contracts.
215 packages/memory-host-sdk/src/host/config-utils.ts READ; retained Environment selects public memory-host workspace/state paths. Explicit ownership and legacy data-owner workspace inheritance are documented SDK/data shapes; cross-conversation recall defaults retain DM isolation protections.
215 src/config/sessions/session-accessor.sqlite-entry-admission.ts READ; retained Captured environment and OPENCLAW_STATE_DIR pin the original database before async admission. Incognito native versus durable worker claims preserve their physical identity and lifecycle; retain active migration paths and release fencing.
214 src/infra/outbound/message-account-selection.ts READ; retained Environment only reaches channel configured-state inspection. checkResolvedAccount=false is actively used before broadcast secret redemption; explicit account validation, enablement, SecretRef availability, and candidate/secret channel distinctions are required.
213 extensions/migrate-hermes/plan.ts READ; retained Captured process environment informs explicit Hermes migration planning. overwrite/includeSecrets and provider-conflict/manual steps protect import contracts; no independent environment flag or unused control found.
213 extensions/qa-lab/src/live-transports/matrix/substrate/harness.runtime-internals.ts READ; retained OPENCLAW_QA_MATRIX_TUWUNEL_IMAGE is documented in QA operator flow. Image/server/token/port options create isolated harnesses; poll and timeout injection support bounded host/container reachability proof.
213 src/auto-reply/usage-bar/template.ts READ; retained The only environment gate exposes a test cache disposer. Template overrides are public config data; bounded file/watch cache and invalid-override warning dedupe own real runtime refresh and cleanup.
213 src/commands/doctor/shared/automatic-config-repair.ts READ; active-owner Exact path appears in heartbeat-files.txt. Full read confirms environment-reference preservation, plugin-contract selection and pre-write cron owner repair; retain under the existing active owner.
213 src/plugin-sdk/facade-activation-check.runtime.ts READ; retained Process environment resolves config and plugin auto-enable facts. Loaded runtime registry takes precedence over cold metadata; explicit activation checks enforce the SDK facade boundary rather than exposing an unused switch.
212 extensions/diagnostics-otel/src/service-exporter.ts READ; retained Signal-specific and shared OTLP endpoint/certificate/client-key environment settings implement exporter TLS/mTLS contracts. Validation prevents unsupported proxy or malformed credential configuration from downgrading export.
212 extensions/qa-lab/src/providers/env.ts READ; retained Live credential aliases, preservation/auth-mode controls, and provider-config paths support QA live routes; blocked mock env prevents ambient channel/provider activity. CODEX_HOME and host HOME forwarding are explicit backend-auth inputs.
212 src/commands/doctor-update-refusal.ts READ; retained OPENCLAW_UPDATE_IN_PROGRESS and parent-support markers identify shipped update-driver capabilities. Reflog/process evidence only creates recovery guidance and does not mutate checkout or service.
212 src/daemon/service-audit-preservation.ts READ; retained Compares current versus installer environment and arguments without rewriting. Managed-key provenance, PATH/NODE_OPTIONS preservation, and redacted operator-value diagnostics are active update-preservation policy.
212 src/node-host/pty-command.ts READ; retained OPENCLAW_TERMINAL is the spawned terminal marker; env/pathEnv pass selected command environment. requiredCwd distinguishes fresh-start validation from resume fallback and assertCurrent fences the native spawn.
211 extensions/codex/src/app-server/config-requirements.ts READ; retained ProgramData locates Windows managed requirements. Requirements/file/platform injection and sandbox/approval/reviewer selection implement external Codex policy contracts; no Codex behavior change proposed.
211 packages/ai/src/providers/azure-openai-responses.ts READ; retained AZURE_OPENAI deployment mapping, API version, base URL, resource name and credentials are provider configuration inputs. Client compatibility and request replay/cache choices are public transport behavior.
211 src/cli/daemon-cli/response.ts READ; retained Environment is passed to service-manager loaded verification. JSON/text responses, backup receipts, post-verification callbacks and platform hints report real install outcomes; no private runtime knob.
211 src/daemon/systemd-command-query.ts READ; retained Systemd query selects user/system/private transport with manager identity and one shared deadline. Legacy busctl parsing is dependency compatibility, and env preserves systemd/service ownership context.
211 src/plugins/provider-auth-input.ts READ; retained Provider env and secret mode feed real setup credential resolution. formatApiKeyPreview options are public through plugin-sdk/provider-auth; lazy SecretRef wrapper preserves import boundary.
211 src/tui/theme/theme.ts READ; retained OPENCLAW_THEME and COLORFGBG are documented in docs/help/environment.md and docs/web/tui.md. Explicit light/dark and xterm contrast selection are user-facing terminal behavior; exported themes serve distinct widget contracts.
210 extensions/copilot/src/auth-bridge.ts READ; applied Applied after caller/contract verification: Token/home env inputs and injected home/env seams are meaningful. The private ResolveCopilotAuthInput.workspaceDir field is never read; createCopilotByokAuth only forwards it, and two callers populate an otherwise unused authContext field.
210 extensions/discord/src/security-audit.ts READ; retained Process env locates Discord pairing allowlists. dangerous name matching and native command settings are explicit security/config contracts; audit behavior is not a removable debug variant.
210 src/commands/startup-config-preflight.ts READ; retained Environment is captured after config admission. gateway/observe options select real startup versus inspection paths; writer lease, plugin-index recovery and historical webhook migration gates remain owner-controlled.
210 src/daemon/launchd-update-jobs.ts READ; retained OPENCLAW_PROFILE, service markers, launchd labels and OPENCLAW_UPDATE_RUN_HANDOFF identify updater jobs while excluding active Gateway labels. Current-process identity/metadata verification prevents ambient env from authorizing arbitrary disablement.
209 extensions/memory-lancedb/config.ts READ; retained Plugin config resolves user-authored ${ENV} strings for embedding secrets/endpoints/storageOptions. Embedding dimensions, capture/recall and dreaming fields are actual plugin configuration contracts.
209 src/cli/update-cli/update-command-mutable-signals.ts READ; retained OPENCLAW_UPDATE_RUN_HANDOFF/POST_CORE deliberately exclude successor-owned updates from local interruption settlement. WeakMap admission, inode identity, executor fence and compensation joins retain exact mutable authority.
209 src/config/io.runtime-write-finalization.ts READ; retained process.env and staged config env participate in canonical reread generation checks, dotenv publication and conditional rollback. Defer activation and retained candidate flags represent real write lifecycle states.
209 src/gateway/call-device-auth.ts READ; retained Environment selects the paired device token store. read-only and local auth-none/shared-secret controls preserve loopback trust and prevent unwanted device storage mutations.
209 src/infra/message-tool-run-outcome-store.ts READ; retained env is cloned and bound to canonical OPENCLAW_STATE_DIR. Persistent worker and incognito in-memory branches have distinct owners; captured database/registry authority and settlement cleanup are required.
209 src/infra/update-control-plane-sentinel.ts READ; retained Internal handoff/meta/run-ID environment fields correlate detached update execution and restart delivery. Unsafe exit code 79, pending reasons and notice ownership preserve recovery signaling.
207 src/config/sessions/provider-review-store.ts READ; retained Environment snapshot pins the state root and physical provider-review owner. Caller authority, lifecycle revision, compare-and-swap, native commit receipts and publication settlement are correctness/security boundaries.
207 src/gateway/server/health-state.ts READ; retained Environment resolves admin-only auth mode. Public/admin and passive/probe modes prevent sensitive-cache leakage and preserve live-probe semantics; generations fence out-of-order publication.
207 src/infra/windows-port-pids.ts READ; retained Environment selects trusted Windows tools and diagnostic subprocess env. Timeouts and shared deadline bound PowerShell/WMIC fallback; result-vs-convenience APIs preserve permanent/unavailable/empty distinctions.
206 extensions/xai/realtime-voice-config.ts READ; retained XAI_BASE_URL is an environment override in the realtime endpoint resolver. Voice, VAD timing, reasoning, resumption, API-key, and interruption inputs are provider config; reconnect/payload/queue limits are runtime bounds, not unused switches.
206 src/channels/plugins/account-helpers.ts READ; retained Dynamic environment keys are plugin-declared implicit account credentials. Normalization, fallback and default-account options belong to shared account/SDK contracts; no unreferenced removal proven.
206 src/commands/onboard-inference.ts READ; retained Environment controls passive home/credential and ambient backend discovery; explicit deps support isolated inference detection. Platform-specific signed-app probe budget, login uncertainty, and random tie ordering are real onboarding behavior.
206 src/config/env-substitution.ts READ; retained Public ${VAR}/${VAR:-fallback}/$${VAR} grammar and callbacks serve substitution, SecretRef provenance and authored write-back. Iterative traversal preserves depth-first callback order and deep-input safety; no removable environment knob.
206 src/config/sessions/session-sharing-store.worker.ts READ; retained Environment is forwarded for category destination resolution and checked again at commit. Worker binds original physical database and prepared category plan; membership/owner publication and transaction settlement are active invariants.
205 src/state/agent-deletion-cleanup.ts READ; retained Env resolves exact state identity for cleanup access. Async-local owner closures, currentness checks, retained failed-close tags, and alias detection implement deletion lifecycle authority; no feature/debug knob present.
204 extensions/onepassword/src/secret-ref-cli.ts READ; retained CLAW_1PASSWORD_OP is documented in docs/gateway/1password.md and shared with resolver ownership. Readiness reports trusted CLI/token-file status; injected dependencies provide meaningful unsafe/missing-path proof.
204 src/agents/minimax-vlm.ts READ; retained MINIMAX_API_HOST selects provider region/endpoint; timeout, private-network and transport overrides implement request policy. A private unused env parameter would yield only trivial cleanup, not a substantive candidate.
204 src/daemon/systemd-runtime.ts READ; retained Env and loaded/read target options select the actual systemd owner and transport. Unknown, stopped and running remain distinct offline-maintenance and inspection contracts.
203 extensions/crabbox/src/doctor.ts READ; retained Doctor env PATH and managed-binary state choose executable probes/repair; warm-image profile settings and retained capture/retirement facts drive concrete diagnostics. Registration checks prevent duplicate host owners.
203 extensions/diagnostics-otel/src/service-content-normalization.ts READ; retained OPENCLAW_OTEL_PRELOADED is documented in OpenTelemetry configuration and Docker env docs; it preserves external SDK ownership. Content limits/redaction and valid JSON truncation protect telemetry boundaries.
203 extensions/xai/speech-provider-metadata-factory.ts READ; retained XAI_BASE_URL and XAI_API_KEY are provider endpoint/auth inputs; voice/language/speed/format controls are speech/Talk contracts. Voice-note format normalization and directive allowVoice enforce real transport/policy constraints.
203 src/agents/embedded-agent-runner/run/attempt-history-prepare.ts READ; active-owner Active heartbeat PR exact-path overlap. Env enters replay policy; raw runs, settled finalization and compaction replay each have real transcript semantics. Heartbeat filtering and quota-resume/session mutation stay with the current owner.
203 src/cli/update-cli/update-command-artifact.ts READ; retained Environment tombstones remove service/config/update selectors before candidate hooks run in a private HOME/state/tmp. Directory custody and child cleanup preserve staging isolation; no unused selector machinery proven.
203 src/config/sessions/session-incognito-lifecycle-operations.ts READ; active-owner Active incognito lifecycle/actor migration owner. Captured OPENCLAW_STATE_DIR must match actor identity; deletion/reclaim hooks retain authority and publish only committed removals. No cleanup proposal for staged migration surfaces.
202 src/agents/auth-profiles/path-resolve.ts READ; retained Env selects process-stable shared credential owner; legacy-main/state-db distinction retains durable migration data and cross-agent refresh lock ownership.
202 src/agents/worktrees/allocation.ts READ; retained env captures worktree coordination identity. Allocation/mutation lease distinction, inherited lease sets, commit versus rollback guards and retained capacity on uncertain outcomes are live fencing/settlement contracts; fixed lease durations are not dead knobs.
202 src/cli/attach-cli.ts READ; retained Spawn environment combines the parent with scoped grant.env. TTL/bin/print-config/session/Gateway overrides are public CLI options; revocation, expiry and temporary config lifecycle are substantive behavior.
202 src/cli/daemon-cli/register-service-commands.ts READ; retained Gateway service env selects safe Windows self-restart semantics. Hidden update-executor/runtime-pin/restore options are installed-updater contracts; public force/safe/wait/deferral options and lazy handlers remain active.
202 src/skills/library/store-access.ts READ; retained Environment and database context pin physical Skill Library ownership. Captured roles/scopes, read generations and writer admission/settlement fences are authority contracts, not tunables.
201 extensions/chutes/index.ts READ; retained CHUTES OAuth client ID/secret/scopes/redirect URI are external OAuth application inputs; API key/token envs are declared provider credentials. Remote/manual callback handling and live/static catalogs are real provider flows.
201 src/process/supervisor/adapters/pty.ts READ; retained PTY adapter forwards TERM with Windows case semantics and removes native PTY from portable worker builds. Spawn/abort/cleanup and force-kill uncertainty belong to process lifecycle, not unused toggles.

@steipete
steipete enabled auto-merge (squash) October 5, 2026 04:17
@clawsweeper

clawsweeper Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed October 5, 2026, 1:22 AM ET / 05:22 UTC (Revision 2).

ClawSweeper review

What this changes

The branch removes private runtime options, debug switches, and forwarding helpers across channel plugins, agent execution, plugin loading, CLI commands, and the Control UI.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 7 items remain

The useful cleanup remains distinct from the related merged work, but the prior Slack authorization finding is still unresolved. The lint corrections do not address it.

Priority: P2
Reviewed head: e7ab6e08ba9b19200e995304d7bfc00a6b7cb468

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Substantial supplemental validation supports the cleanup, but the unchanged authorization regression and required surface-specific proof prevent merge readiness.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: Authority-chain proof required: while the Slack cache change remains, demonstrate an allowed bot turn and rejection after the last explicit owner leaves, before agent/provider/tool I/O. Reported tests and static checks do not exercise that final-effect scenario. The Telegram transport change also needs the scoped guide’s live transport evidence. Redact private details from logs or transcripts; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review. The catalog-helper specialization changes no stored-data contract. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Authority-chain proof required: while the Slack cache change remains, demonstrate an allowed bot turn and rejection after the last explicit owner leaves, before agent/provider/tool I/O. Reported tests and static checks do not exercise that final-effect scenario. The Telegram transport change also needs the scoped guide’s live transport evidence. Redact private details from logs or transcripts; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review. The catalog-helper specialization changes no stored-data contract. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 9 items Introduced authorization change: The pinned merge-base-to-head diff removes OPENCLAW_SLACK_CHANNEL_MEMBERS_CACHE_TTL_MS and makes membership reuse unconditional within a fixed 60-second expiry.
Released compatibility contract: The latest supplied release retains the TTL environment variable. Zero disables completed-result caching, allowing sequential authorization calls to observe updated membership.
Current main still retains the override: GitHub source at fetched main still contains the TTL parser, environment lookup, and ttlMs > 0 guards; this removal has not already been implemented there.
Findings 1 actionable finding [P1] Preserve Slack's membership-cache opt-out
Security Needs attention Stale owner presence can authorize bot turns: For installations previously using a zero TTL, the introduced mandatory cache retains owner-presence authority after departure and allows eligible bot messages to continue into turn preparation.

How this fits together

OpenClaw’s runtime helpers translate configuration and incoming events into agent execution, transport requests, and UI presentation. Slack’s membership helper also decides whether another bot may trigger a turn based on an explicit owner’s presence.

flowchart TD
  A[Configuration and incoming events] --> B[Private runtime helpers]
  B --> C[Channel access decisions]
  C --> D[Agent execution]
  B --> E[Transport requests]
  D --> F[Replies and UI presentation]
  E --> F
Loading

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: Authority-chain proof required: while the Slack cache change remains, demonstrate an allowed bot turn and rejection after the last explicit owner leaves, before agent/provider/tool I/O. Reported tests and static checks do not exercise that final-effect scenario. The Telegram transport change also needs the scoped guide’s live transport evidence. Redact private details from logs or transcripts; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review. The catalog-helper specialization changes no stored-data contract. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Preserve Slack's membership-cache opt-out (P1) - The released OPENCLAW_SLACK_CHANNEL_MEMBERS_CACHE_TTL_MS=0 setting disables completed membership caching. Removing its lookup makes an otherwise eligible bot reuse an owner's presence for 60 seconds: after the last explicit owner leaves, authorizeSlackBotRoomMessage still returns true, and the leave-event handler does not invalidate this cache. Installations choosing immediate membership refresh therefore silently lose that authorization behavior. Restore the override or exclude this cut. This is the unresolved finding from the prior review.
  • Resolve security concern: Stale owner presence can authorize bot turns - For installations previously using a zero TTL, the introduced mandatory cache retains owner-presence authority after departure and allows eligible bot messages to continue into turn preparation.
  • Resolve merge risk (P1) - Existing installations that disable Slack membership caching would silently acquire a 60-second stale-owner authorization window.
  • Resolve merge risk (P1) - If the Slack cache change remains, allowed and owner-departure behavior is unproven at the final agent/provider/tool boundary.
  • Resolve merge risk (P1) - The Telegram transport specialization lacks the live transport proof required by its scoped repository guide.
  • Complete next step (P2) - Restore or exclude the Slack TTL removal; if retained, provide allowed and owner-departure final-effect proof, and add the required live Telegram transport evidence.

Findings

  • [P1] Preserve Slack's membership-cache opt-out — extensions/slack/src/monitor/auth.ts:129-130
  • [medium] Stale owner presence can authorize bot turns — extensions/slack/src/monitor/auth.ts:129
Agent review details

Security

Needs attention: The Slack cut changes authorization freshness for existing installations; no dependency or supply-chain change was found.

PR surface

Source -354, Tests -186, Other 0. Total -540 across 74 files.

View PR surface stats
Area Files Added Removed Net
Source 48 171 525 -354
Tests 25 124 310 -186
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 74 296 836 -540

Review metrics

Metric Value Why it matters
Authorization cache control 1 released override removed; 60-second caching becomes mandatory This changes authorization freshness for installations that currently disable or shorten membership caching.

Merge-risk options

Maintainer options:

  1. Preserve Slack cache controls (recommended)
    Restore the released TTL override or exclude the Slack cut, then supply the scoped Telegram transport evidence.
  2. Separate the authorization change
    Move mandatory Slack caching into a separate proposal with explicit upgrade semantics and allowed/owner-departure final-effect evidence.

Technical review

Best possible solution:

Keep the released Slack TTL override while simplifying genuinely fixed private paths, with transport and authorization proof scoped to any retained behavior changes.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: set the released Slack TTL override to zero, authorize an eligible unlisted bot while an owner is present, remove that owner, and authorize again within 60 seconds using the same context. The proposed code reuses the first membership result; no runtime reproduction was executed.

Is this the best way to solve the issue?

No for the Slack cut: an environment-selected authorization freshness control is not a fixed private option. Preserve it or separate its intentional removal from the behavior-preserving cleanup.

Full review comments:

  • [P1] Preserve Slack's membership-cache opt-out — extensions/slack/src/monitor/auth.ts:129-130
    The released OPENCLAW_SLACK_CHANNEL_MEMBERS_CACHE_TTL_MS=0 setting disables completed membership caching. Removing its lookup makes an otherwise eligible bot reuse an owner's presence for 60 seconds: after the last explicit owner leaves, authorizeSlackBotRoomMessage still returns true, and the leave-event handler does not invalidate this cache. Installations choosing immediate membership refresh therefore silently lose that authorization behavior. Restore the override or exclude this cut. This is the unresolved finding from the prior review.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e693ea0a11bc.

Labels

Label changes:

  • add P2: This internal cleanup has a bounded compatibility and authorization regression affecting installations using the Slack TTL override.
  • add merge-risk: 🚨 compatibility: Existing Slack TTL settings would stop taking effect after upgrade.
  • add merge-risk: 🚨 security-boundary: Mandatory cached owner presence can admit bot turns after the last explicit owner leaves.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: while the Slack cache change remains, demonstrate an allowed bot turn and rejection after the last explicit owner leaves, before agent/provider/tool I/O. Reported tests and static checks do not exercise that final-effect scenario. The Telegram transport change also needs the scoped guide’s live transport evidence. Redact private details from logs or transcripts; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review. The catalog-helper specialization changes no stored-data contract. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This internal cleanup has a bounded compatibility and authorization regression affecting installations using the Slack TTL override.
  • merge-risk: 🚨 compatibility: Existing Slack TTL settings would stop taking effect after upgrade.
  • merge-risk: 🚨 security-boundary: Mandatory cached owner presence can admit bot turns after the last explicit owner leaves.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: while the Slack cache change remains, demonstrate an allowed bot turn and rejection after the last explicit owner leaves, before agent/provider/tool I/O. Reported tests and static checks do not exercise that final-effect scenario. The Telegram transport change also needs the scoped guide’s live transport evidence. Redact private details from logs or transcripts; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review. The catalog-helper specialization changes no stored-data contract. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [medium] Stale owner presence can authorize bot turns — extensions/slack/src/monitor/auth.ts:129
    For installations previously using a zero TTL, the introduced mandatory cache retains owner-presence authority after departure and allows eligible bot messages to continue into turn preparation.
    Confidence: 0.99

What I checked:

  • Introduced authorization change: The pinned merge-base-to-head diff removes OPENCLAW_SLACK_CHANNEL_MEMBERS_CACHE_TTL_MS and makes membership reuse unconditional within a fixed 60-second expiry. (extensions/slack/src/monitor/auth.ts:129, e7ab6e08ba9b)
  • Released compatibility contract: The latest supplied release retains the TTL environment variable. Zero disables completed-result caching, allowing sequential authorization calls to observe updated membership. (extensions/slack/src/monitor/auth.ts:134, fc23bc864e45)
  • Current main still retains the override: GitHub source at fetched main still contains the TTL parser, environment lookup, and ttlMs > 0 guards; this removal has not already been implemented there. (extensions/slack/src/monitor/auth.ts:134, e693ea0a11bc)
  • Authorization reaches turn preparation: An otherwise eligible bot room message passes through authorizeSlackBotRoomMessage before continuing preparation. That function accepts cached owner membership; the member-left handler does not invalidate this private cache. (extensions/slack/src/monitor/message-handler/prepare.ts:875, e7ab6e08ba9b)
  • Re-review continuity: The previous review requested preservation of the Slack override and owner-removal final-effect proof. GitHub’s exact-head commit patch contains only the ACP fixture rename and removal of the Telegram lint suppression, so that finding remains applicable. (e7ab6e08ba9b)
  • Validation and proof scope: The captured PR body reports 4,374 passing tests, production typechecks, zero import cycles, and validated lint corrections. The inventory comments were additionally inspected through GitHub reads; their relevant coverage does not establish allowed and owner-departure Slack behavior through final agent/provider/tool I/O. These reported checks remain supplemental evidence. (e7ab6e08ba9b)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • sjf-oa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore the Slack TTL override or exclude that cut.
  • If mandatory caching remains, prove allowed execution and owner-departure rejection before final agent/provider/tool I/O.
  • Add redacted live Telegram transport evidence for the network specialization.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-05T04:17:43.520Z sha 79501c1 :: needs real behavior proof before merge. :: [P1] Preserve Slack's membership-cache opt-out

@steipete
steipete disabled auto-merge October 5, 2026 04:36
@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

The six-hour lane timebox has elapsed. This PR is not ready to merge yet: exact-head hosted CI found two attributable lint errors:

  • check-lint-core-2: eslint(no-shadow) in the newly added ACP cap test (src/auto-reply/reply/acp-projector.test.ts), where the fixture variable shadows destructured delivery text.
  • check-lint-extensions-1: an obsolete, now-unused oxlint-disable max-lines directive in extensions/telegram/src/fetch.ts after the file shrank.

The two mechanical corrections are prepared locally (rename the fixture variable and remove the stale directive), but are not validated, committed, or pushed. Auto-merge is being disabled pending that follow-through. The 4,374 passing runtime tests, production typechecks, zero-cycle results, and independent review remain evidence for the published candidate; they do not override these lint failures. No inherited-main exception is claimed.

@steipete
steipete enabled auto-merge (squash) October 5, 2026 05:16
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 5, 2026
@steipete
steipete merged commit f27df1d into main Oct 5, 2026
187 checks passed
@steipete
steipete deleted the deslop/l379-env-knobs2-20261004 branch October 5, 2026 05:34
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
* refactor(runtime): deslop remaining private knobs

Specialize private runtime helpers to their actual callers and remove unused
debug branches, timing options, and forwarding fields. Preserve documented
configuration, public SDK contracts, migration writers, and lifecycle guards.

The batch removes 352 net production lines after excluding other active lanes.
Full environment-owner coverage and focused Linux/core/plugin/UI proof recorded
for the below-threshold campaign closeout.

* fix: resolve private knob cleanup lint errors
NEXTAltair added a commit to NEXTAltair/openclaw that referenced this pull request Nov 10, 2026
rebase 時のコンフリクト解決 (onto 92635da, 元コミット 119f95fdaa6):
- 上流 openclaw#143905/openclaw#147242 で safe RPC restart 分岐に
  assertGatewayServiceFallbackAllowed("safe RPC restart") が追加された。
  本コミットは safe 分岐を external-supervisor 判定より前へ移し暗黙 safe 判定を
  足しているため、移動先の分岐に上流のガードを取り込み、旧位置の重複分岐は削除

rebase 時のコンフリクト解決 (onto 57fd13e, 元コミット 21f40bf994c):
- 上流 8b680f3 (openclaw#178163) が createSafeGatewayRestartPreflight の
  inspectors 引数と SafeRestartInspectors 型を削除。引数なしの形に合わせ、
  session admission / mutation を 0 に固定するスタブだけを外して実数で数える
- 上流 c268b9d (openclaw#181608) が SafeRestartTarget 型を引数へインライン化。
  インライン型のまま transport 引数を追加
- 上流がテストを describe なしのトップレベル it と、実モジュールの spy による
  カウンタ差し替えに書き直したため、両テストファイルは上流版を基に
  本コミットのケースを追加。restart-coordinator.test.ts は
  session-controller.lifecycle.js を spy して admitted turn を 1 件にする

rebase 時の調整 (onto 258d034, 元コミット 76c4af4b6cc):
- restart-suspension.test.ts: 上流 36e277d (openclaw#175837) が
  session-lifecycle-admission.js を session controller へ統合して削除し、
  上流 f27df1d (openclaw#165330) が scheduleGatewayRestart の skipCooldown を
  削除していた。どちらも前回のベース (57fd13e) より前の変更で、
  このファイルは読み込みに失敗し上流分を含む全テストが動いていなかった。
  後継の beginSessionEffect / getSessionControllerWorkCount
  (session-controller.lifecycle.js) へ置き換え、skipCooldown を外した。
  クールダウンは直前に再起動を発信した場合だけ掛かるため、外しても挙動は同じ

rebase 時のコンフリクト解決 (onto 638a185, 元コミット a06162363f5):
- 上流が lifecycle-safe-restart.ts に restartFlagConflictError / assertNativeRestartFlags
  を追加し、runDaemonRestart の冒頭で呼ぶ形にした (--preserve-definition と --safe、
  --skip-deferral の組み合わせ検査)。上流の2関数と呼び出しを残したまま
  shouldUseImplicitSafeRestart と requestSafeGatewayRestartIfNeeded の呼び出しを
  その直後に並べた (フラグ検査 → 暗黙 safe 判定 → external-supervisor の順)。
  旧位置の `if (opts.safe)` 分岐は本コミットが既に削除済みで、重複は残っていない。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: feishu Channel integration: feishu channel: matrix Channel integration: matrix channel: nextcloud-talk Channel integration: nextcloud-talk channel: slack Channel integration: slack channel: telegram Channel integration: telegram cli CLI command changes extensions: copilot extensions: qa-lab gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. security-sensitive-changed size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant