Skip to content

feat: correlate native search outcomes in audit history#98704

Merged
steipete merged 3 commits into
mainfrom
codex/auditable-agent-activity
Jul 6, 2026
Merged

feat: correlate native search outcomes in audit history#98704
steipete merged 3 commits into
mainfrom
codex/auditable-agent-activity

Conversation

@steipete

@steipete steipete commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Closes #98521

What Problem This Solves

Operators currently have to correlate runtime output, session transcripts, task records, and logs to answer who ran an agent or tool, what action occurred, when it happened, and how it ended. There is no single durable, bounded, redaction-safe query surface for those operational questions.

Why This Change Was Made

This adds a typed, metadata-only audit contract over the existing agent-run and tool lifecycle signals. Events use stable identities and database order, carry agent/session/actor provenance and closed action/result/error codes, and persist through one Kysely-backed table in the shared state database. Existing transcript ownership remains unchanged; this is not a second conversation store.

The canonical read surfaces are the read-authorized audit.list Gateway method and openclaw audit, with bounded filters, cursor pagination, and bounded JSON output. Prompts, message bodies, tool arguments, tool results, raw error text, and provider-controlled identifiers are excluded or one-way hashed by contract.

Native search correlation follows the dependency contract conservatively. Explicit terminal completed status is success; explicit failed terminal state is failure; missing, unavailable, or non-terminal status is tool_outcome_unknown and never inferred as success. Lifecycle timestamps remain authoritative, with local observation time only as a documented fallback.

User Impact

Authorized operators can inspect recent agent runs and tool actions by agent, session, actor, action, status, and time range. Records survive process restarts, retain deterministic ordering, and are capped by a 30-day retention window, a 100,000-row limit, and 500-row query pages.

Evidence

Final candidate:

  • Base: 0ad58848b399ca47ab9e0c644d14e9efd1cbd222
  • Head: d3f2be300b19ffda04789020ff282a276c6c9982
  • Tree: cdfb3876495826eb9c4aa676ad5fd37db0e7846e
  • Scope: 135 files, +11,427/−757; the size reflects the typed contract, lifecycle integrations, generated protocol surfaces, docs, and regression coverage.

Focused local proof on the final base:

  • node scripts/run-vitest.mjs src/audit/audit-events.test.ts src/audit/audit-event-writer.test.ts src/commands/audit.test.ts src/gateway/server-methods/audit.test.ts packages/gateway-protocol/src/schema/audit.test.ts — 53/53 passed; ordering, filters, pagination, redaction, persistence/reopen, and terminal/failure states.
  • node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/followup-runner.test.ts src/auto-reply/reply/dispatch-from-config.test.ts — 7/7 passed across the latest session-binding overlap.
  • node --import tsx scripts/protocol-gen.ts, node --import tsx scripts/protocol-gen-swift.ts, node scripts/generate-kysely-types.mjs, and node scripts/generate-docs-map.mjs --check — generated surfaces clean.
  • node scripts/format-docs.mjs --check and node scripts/check-docs-mdx.mjs docs README.md — 673 documents and 689 MDX inputs passed.
  • Plugin SDK export/baseline/surface checks passed: 341 entrypoints, 10,988 exports, 5,703 callable exports, 0 forbidden exports.

Exact-tree remote proof:

  • Blacksmith Testbox tbx_01kwmfd7hgjjx9js0xpae9gmma (Actions run), exit 0 in 13m59.947s.
  • The remote script asserted the exact base, expected head, and candidate tree above before testing.
  • build:strict-smoke passed, including CLI bootstrap and canonical plugin SDK declarations.
  • Provider-qualified native-search correlation regression passed 1/1.
  • A built-distribution Gateway was started against temporary state; gateway health and bounded audit --json --limit 1 passed.
  • check:changed passed full typecheck, lint, database-first guardrails, and import-cycle checks.
  • test:changed passed 3,553 tests in 78 files across 15 shards.
  • Full pnpm build passed. The Testbox lease stopped cleanly. No alternate cloud slot was used.

Supporting real-path proof from the earlier reviewed tree remains useful for behavior continuity: Testbox tbx_01kwf7yk3968m7vh2634qabet9 ran a real Gateway turn with one tool action, returned four ordered metadata-only records, opened a pre-feature shared database without losing its existing row, added the audit table, proved cursor pagination, and found no prompt/reply/tool-result sentinels.

Fresh explicit koffing-updated xhigh review against the final base/head returned no findings (confidence 0.96). The reviewer specifically checked terminal precedence, incomplete-client outcome handling, redaction/hashing, stable Kysely pagination, and the direct dependency contract below.

Direct dependency contract source audit

Pinned dependency checkout: db887d03e1f907467e33271572dffb73bceecd6b.

  • codex-rs/app-server-protocol/src/protocol/v2/thread.rs:143-147, 310-398, 1275-1287, 1303-1334
  • codex-rs/app-server-protocol/src/protocol/common.rs:632-643
  • codex-rs/app-server/src/message_processor.rs:1223-1230
  • codex-rs/app-server/src/request_processors/thread_processor.rs:899-1001, 2181-2304, 2368-2420, 2577-2612, 2615-2805, 2953-3000, 3073-3132
  • codex-rs/protocol/src/items.rs:145-152, 188-194, 229-235, 268-273, 291-301, 363-370
  • codex-rs/protocol/src/models.rs:1094-1114, 3171-3245
  • codex-rs/core/src/event_mapping.rs:194-203
  • codex-rs/app-server-protocol/src/protocol/v2/item.rs:350-362, 921-925, 992-1025, 1070-1141, 1155-1161, 1240-1250, 1314-1333
  • codex-rs/core/src/tools/handlers/extension_tools.rs:269-279
  • codex-rs/app-server/src/bespoke_event_handling.rs:1010-1028, 1070-1103, 1384-1411, 1452-1476
  • codex-rs/app-server/src/thread_state.rs:78-84, 130-132, 492-518
  • codex-rs/app-server/src/request_processors/thread_lifecycle.rs:311-340, 530-675
  • codex-rs/core/tests/common/responses.rs:803-824
  • codex-rs/app-server-protocol/src/protocol/event_mapping.rs:401-415, 425-460
  • codex-rs/ext/image-generation/src/tool.rs:117-125, 139-151, 179-185
  • codex-rs/core/src/stream_events_utils.rs:445-475

The source establishes that normalized live and persisted search items carry identity/query/action but no terminal status; optional raw status is live-only and opt-in. Cold resume does not provide raw state, while warm loaded state may retain it. The action value open is not terminal completed. Image generation emits in_progress before explicit completed or failed. This PR therefore preserves unknown/non-success whenever authoritative terminal status is absent.

Risks and Non-Goals

  • No Control UI is included; this PR provides the contract, persistence, and operator-read foundation only.
  • No prompt/content/body capture, broad configuration, second transcript store, release change, or compatibility fallback is added.
  • The broadest risk is lifecycle coverage across embedded, CLI, ACP, task, and Gateway paths. Closed outcome codes, one terminal normalizer, focused regression tests, exact-tree changed checks, and a full build bound that risk.
  • Draft PR feat: add session thread management #98510 overlaps only the generated Swift protocol output. There is no UI or audit-lifecycle dependency; whichever branch rebases second must regenerate that shared additive artifact.
  • The live dependency checkout currently has five generated JSON description drifts also present on origin/main. This branch does not touch those files and does not import that unrelated drift.

AI Disclosure

AI-assisted implementation and review. Maintainer review remains required.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: codex size: XL maintainer Maintainer-authored PR labels Jul 1, 2026
@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed July 6, 2026, 6:56 AM ET / 10:56 UTC.

Summary
The PR adds a metadata-only audit ledger for agent runs and tool actions, with shared SQLite persistence, lifecycle/tool outcome projection, audit.list, openclaw audit, protocol/SDK exports, docs, and tests.

Reproducibility: not applicable. this is a feature PR adding a new audit ledger and query surface, not a bug report. Current-main source search confirms the requested audit surface does not already exist.

Review metrics: 2 noteworthy metrics.

  • Config/default surface: 1 added default-on key. audit.enabled defaults to true, so existing users would start writing metadata-only audit rows after upgrade unless they opt out.
  • Operator contract surface: 1 SQLite table, 1 Gateway RPC, 1 CLI command. The PR creates a new persistent audit data model and two user-facing read surfaces that maintainers should treat as public operator contracts.

Stored data model
Persistent data-model change detected: database schema: packages/gateway-protocol/src/schema/audit.test.ts, database schema: src/state/openclaw-state-schema.generated.ts, database schema: src/state/openclaw-state-schema.sql, serialized state: extensions/codex/src/app-server/run-attempt.dynamic-tools.test.ts, serialized state: extensions/codex/src/app-server/run-attempt.test.ts, serialized state: src/gateway/session-lifecycle-state.test.ts, and 8 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #98521
Summary: This PR is the implementation candidate for the open audit-ledger feature issue; the session-management PR only overlaps in generated protocol artifacts.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Fix the lint suppression allowlist or remove the suppressions.
  • Reconcile the Plugin SDK surface budget with the exact current export count.
  • Let the remaining QA Smoke CI finish and re-check the exact head.

Risk before merge

  • [P1] The current head fails the tooling shard because the lint suppression allowlist and Plugin SDK public export budget are not reconciled with the diff.
  • [P1] The new audit.enabled default, shared SQLite audit_events table, audit.list RPC, openclaw audit CLI, and SDK/protocol exports are compatibility-sensitive operator contracts that need maintainer acceptance before merge.
  • [P1] QA Smoke CI was still in progress when reviewed, so the exact head is not fully green yet.

Maintainer options:

  1. Fix exact-head tooling blockers (recommended)
    Reconcile the lint suppression inventory and Plugin SDK surface budget, then rerun the failing tooling shard before any merge.
  2. Maintainer accepts the audit contract
    After CI is green, a maintainer can own the default-on audit ledger, persistent schema, RPC, CLI, and SDK/protocol compatibility surface.
  3. Pause if the default-on contract changes
    If maintainers no longer want a default-on local audit ledger, pause this branch and revise the product contract rather than merging a different policy accidentally.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Resolve the two exact-head tooling failures: update or remove the new audit-event-writer lint suppressions so test/scripts/lint-suppressions.test.ts passes, and reconcile scripts/plugin-sdk-surface-report.mjs with the current public surface counts; do not change the accepted audit schema, RPC, CLI, or redaction semantics.

Next step before merge

  • [P2] The remaining blockers are narrow, exact-head tooling failures that an automated repair lane can attempt without reopening the accepted audit product contract.

Security
Cleared: The diff is security-sensitive but I found no concrete security defect: the new schema and projection keep prompts, arguments, tool results, command output, raw errors, and provider call IDs out of the durable audit records.

Review findings

  • [P2] Reconcile the lint suppression inventory — src/audit/audit-event-writer.ts:149-151
  • [P2] Reconcile the Plugin SDK surface budget — scripts/plugin-sdk-surface-report.mjs:193-200
Review details

Best possible solution:

Fix the exact-head tooling blockers, let the remaining CI finish, and merge only after maintainers accept the already-discussed audit contract and default-on config behavior.

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

Not applicable; this is a feature PR adding a new audit ledger and query surface, not a bug report. Current-main source search confirms the requested audit surface does not already exist.

Is this the best way to solve the issue?

Yes for the overall architecture, but not yet merge-ready. Shared SQLite plus metadata-only Gateway/CLI reads fit repository policy and the linked issue, while the current head still needs the two tooling repairs before it is the best mergeable form.

Full review comments:

  • [P2] Reconcile the lint suppression inventory — src/audit/audit-event-writer.ts:149-151
    The exact-head tooling shard fails because this new worker adds two unicorn/require-post-message-target-origin suppressions, but test/scripts/lint-suppressions.test.ts still pins the production suppression list without src/audit/audit-event-writer.ts. Either remove the need for the suppressions or update the intentional allowlist with the new entry so the guard passes.
    Confidence: 0.93
  • [P2] Reconcile the Plugin SDK surface budget — scripts/plugin-sdk-surface-report.mjs:193-200
    The current head still fails test/scripts/plugin-sdk-surface-report.test.ts: the current public export count is one higher than the pinned budget in readPluginSdkSurfaceBudgets(). This is the same budget gate the previous review called out, so the budget or export surface needs to be brought back into agreement before merge.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against cbf9acff374c.

Label changes

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This is a broad but bounded operator-audit feature with concrete CI blockers and compatibility review needs, not an emergency production regression.
  • merge-risk: 🚨 compatibility: Merging adds default-on config behavior, persistent shared-state schema, Gateway RPC, CLI, and SDK/protocol exports that affect upgrades and operator expectations.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (live_output): The PR body and comments include Testbox live Gateway/CLI proof, bounded audit JSON output, shared-database upgrade proof, and exact-tree validation evidence; current blockers are tooling correctness, not missing real behavior proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body and comments include Testbox live Gateway/CLI proof, bounded audit JSON output, shared-database upgrade proof, and exact-tree validation evidence; current blockers are tooling correctness, not missing real behavior proof.
Evidence reviewed

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs run --config test/vitest/vitest.tooling.config.ts --reporter=verbose.
  • [P1] gh pr view 98704 --repo openclaw/openclaw --json statusCheckRollup,headRefOid,mergeStateStatus.

What I checked:

  • Repository policy applied: Root AGENTS.md and scoped guides for Gateway, server methods, agents, plugin SDK, extensions, docs, scripts, tests, and ACPX were read; root policy treats config/defaults, protocol, storage, provider/runtime, and plugin SDK changes as compatibility-sensitive review surfaces. (AGENTS.md:28, cbf9acff374c)
  • Current main lacks the requested audit surface: The current main checkout has no audit.list, openclaw audit, audit_events, AuditEvent, or audit.enabled matches, so the PR is not obsolete on main. (cbf9acff374c)
  • Audit ledger source shape: The PR stores metadata-only audit rows in a shared SQLite audit_events table, prunes by 30-day retention and 100,000-row cap, and lists newest-first records with stable sequence cursors. (src/audit/audit-event-store.ts:28, 0c159d670a08)
  • Default-on config and subscription seam: The Gateway creates the audit recorder when audit.enabled resolves true and skips new writes when disabled, while unsubscribe now awaits audit recorder shutdown. (src/gateway/server-runtime-subscriptions.ts:60, 0c159d670a08)
  • PR proof and live state: Live PR metadata shows head 0c159d6, proof: sufficient, maintainer label, mergeable but unstable, and a closing reference to the audit-ledger issue. (0c159d670a08)
  • Exact-head CI blocker: The failing CI job reports two tooling failures: a new lint suppression entry for src/audit/audit-event-writer.ts is missing from the explicit allowlist, and the Plugin SDK public export budget is one below the current source count. (src/audit/audit-event-writer.ts:149, 0c159d670a08)

Likely related people:

  • steipete: steipete authored the linked audit issue and this PR, is assigned on the PR, and recently merged adjacent Gateway/protocol work in PRs 100788, 100793, and 100804. (role: listed maintainer, feature sponsor, and recent adjacent contributor; confidence: high; commits: b4b1984fe7a9, fda01a64a704, 704c58468667; files: src/audit/agent-event-audit.ts, src/gateway/server-runtime-subscriptions.ts, packages/gateway-protocol/src/index.ts)
  • masatohoshino: PR 99267 authored by masatohoshino produced the current server-runtime-subscriptions baseline this PR extends with audit recorder wiring. (role: recent Gateway runtime contributor; confidence: medium; commits: e7158a581da1, 4c16a2c6f903, 4504da0abacb; files: src/gateway/server-runtime-subscriptions.ts, src/gateway/server-runtime-handles.ts)
  • vincentkoc: vincentkoc co-authored PR 99267 and authored the current-main duplicate protocol export cleanup commit adjacent to this PR's protocol export and Plugin SDK surface changes. (role: recent protocol/Gateway adjacent contributor; confidence: medium; commits: 8ce620f3e675, f21de47483e6, e7158a581da1; files: packages/gateway-protocol/src/index.ts, src/gateway/server-runtime-subscriptions.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (3 earlier review cycles)
  • reviewed 2026-07-03T17:45:31.341Z sha d3f2be3 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-04T11:52:03.948Z sha 2c10921 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-06T10:04:08.234Z sha 08e437d :: needs changes before merge. :: [P2] Break the dynamic tool import cycle | [P2] Make the audit worker reachable to guards | [P2] Await the async audit unsubscribe | [P2] Remove stale generated protocol imports | [P2] Preserve cancellation completion announcements | [P2] Reconcile the Plugin SDK surface budget

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 1, 2026
@steipete

steipete commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 1, 2026
@steipete steipete self-assigned this Jul 1, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 2, 2026
@steipete
steipete requested a review from a team as a code owner July 6, 2026 09:07
@steipete
steipete force-pushed the codex/auditable-agent-activity branch from 5f1291c to 08e437d Compare July 6, 2026 09:39
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 6, 2026
@steipete
steipete force-pushed the codex/auditable-agent-activity branch 3 times, most recently from a04ced6 to 0c159d6 Compare July 6, 2026 10:30
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jul 6, 2026
@steipete
steipete force-pushed the codex/auditable-agent-activity branch from 0c159d6 to 8147c8a Compare July 6, 2026 11:00
steipete added 3 commits July 6, 2026 04:12
Metadata-only audit ledger for agent runs and tool actions in the shared
state DB: stable event identity, closed action/status/error vocabularies,
one-way-hashed tool-call ids, never-inferred terminal outcomes for native
web-search (explicit completed/failed only; otherwise unknown), bounded
retention, audit.list gateway RPC and openclaw audit CLI. Squashed from
the 82-commit audit stack for replay onto current main.
The metadata-only audit ledger records by default: an audit trail enabled
only after an incident cannot explain the incident, and the rows are
strictly less sensitive than the transcripts every install already
stores. audit.enabled=false stops new writes at the gateway subscription
seam; audit.list and openclaw audit keep serving existing records until
they expire. Documented in the configuration reference, protocol page,
and CLI reference.
- break the dynamic-tools/dynamic-tool-execution import cycle by
  extracting resolveCodexToolAbortTerminalReason into a leaf module
- restore main's session-worktree protocol exports lost in the
  index.ts auto-merge
- register the audit event writer worker as a knip entry point
- docs table formatting; subagent wait-cancellation test scoped to its
  audit intent (outcome + timing) and advanced past main's new
  lifecycle-timeout retry grace
@steipete
steipete force-pushed the codex/auditable-agent-activity branch from 8147c8a to e8e4440 Compare July 6, 2026 11:23
@steipete
steipete merged commit f533469 into main Jul 6, 2026
96 of 97 checks passed
@steipete
steipete deleted the codex/auditable-agent-activity branch July 6, 2026 11:30
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 7, 2026
* feat: correlate native search outcomes in audit history

Metadata-only audit ledger for agent runs and tool actions in the shared
state DB: stable event identity, closed action/status/error vocabularies,
one-way-hashed tool-call ids, never-inferred terminal outcomes for native
web-search (explicit completed/failed only; otherwise unknown), bounded
retention, audit.list gateway RPC and openclaw audit CLI. Squashed from
the 82-commit audit stack for replay onto current main.

* feat(audit): add audit.enabled config gate (default on)

The metadata-only audit ledger records by default: an audit trail enabled
only after an incident cannot explain the incident, and the rows are
strictly less sensitive than the transcripts every install already
stores. audit.enabled=false stops new writes at the gateway subscription
seam; audit.list and openclaw audit keep serving existing records until
they expire. Documented in the configuration reference, protocol page,
and CLI reference.

* fix: repair full-matrix CI findings after rebase

- break the dynamic-tools/dynamic-tool-execution import cycle by
  extracting resolveCodexToolAbortTerminalReason into a leaf module
- restore main's session-worktree protocol exports lost in the
  index.ts auto-merge
- register the audit event writer worker as a knip entry point
- docs table formatting; subagent wait-cancellation test scoped to its
  audit intent (outcome + timing) and advanced past main's new
  lifecycle-timeout retry grace
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
* feat: correlate native search outcomes in audit history

Metadata-only audit ledger for agent runs and tool actions in the shared
state DB: stable event identity, closed action/status/error vocabularies,
one-way-hashed tool-call ids, never-inferred terminal outcomes for native
web-search (explicit completed/failed only; otherwise unknown), bounded
retention, audit.list gateway RPC and openclaw audit CLI. Squashed from
the 82-commit audit stack for replay onto current main.

* feat(audit): add audit.enabled config gate (default on)

The metadata-only audit ledger records by default: an audit trail enabled
only after an incident cannot explain the incident, and the rows are
strictly less sensitive than the transcripts every install already
stores. audit.enabled=false stops new writes at the gateway subscription
seam; audit.list and openclaw audit keep serving existing records until
they expire. Documented in the configuration reference, protocol page,
and CLI reference.

* fix: repair full-matrix CI findings after rebase

- break the dynamic-tools/dynamic-tool-execution import cycle by
  extracting resolveCodexToolAbortTerminalReason into a leaf module
- restore main's session-worktree protocol exports lost in the
  index.ts auto-merge
- register the audit event writer worker as a knip entry point
- docs table formatting; subagent wait-cancellation test scoped to its
  audit intent (outcome + timing) and advanced past main's new
  lifecycle-timeout retry grace
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 cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: acpx extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add metadata-only audit records for agent runs and tool actions

1 participant