fix(openclaw): restore 2026.9 transcripts and instruction delivery - #794
Conversation
|
Thanks @chhhee10 for your contribution to Failproof AI! 🙌 We'd love to discuss your PR and welcome you to our community. Discord: https://discord.befailproof.ai/ |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Hermes
No summary yet. What this changesNo component map for this revision. RoundsNo review has finished on this pull request yet. FindingsNothing raised yet.
|
Hermes
One correctness issue found: ambiguous OpenClaw project slugs can make a valid agent/channel project inaccessible. Focused TypeScript tests and type checking pass in clean containers. What this changesflowchart LR
n0OpenClawSQLitecollector["+ OpenClaw SQLite collector"]
n1Collectortaskregistration["~ Collector task registration"]
n2OpenClawpolicybridge["~ OpenClaw policy bridge"]
n3DashboardSQLitereader["+ Dashboard SQLite reader"]
n4OpenClawsessionbrowser["~ OpenClaw session browser"]
n0OpenClawSQLitecollector -- "cursor state and batches" --> n1Collectortaskregistration
n1Collectortaskregistration -- "roots and collection settings" --> n0OpenClawSQLitecollector
n2OpenClawpolicybridge -- "instruct verdict and retry scope" --> n2OpenClawpolicybridge
n3DashboardSQLitereader -- "sessions and event JSON" --> n4OpenClawsessionbrowser
Rounds
FindingsOpen
|
hermes-exosphere
left a comment
There was a problem hiding this comment.
Hermes found no blocking issues in this revision.
hermes-exosphere
left a comment
There was a problem hiding this comment.
Hermes found no blocking issues in this revision.
hermes-exosphere
left a comment
There was a problem hiding this comment.
Hermes found no blocking issues in this revision.
hermes-exosphere
left a comment
There was a problem hiding this comment.
Hermes found no blocking issues in this revision.
1 advisory finding
- Medium/High Project slugs collide for valid agent/channel pairs —
openClawProjectNamebuildsopenclaw-${agentId}-${channel}. The code explicitly permits hyphens in both values. Thusmain-bot/telegramandmain/bot-telegramboth produceopenclaw-main-bot-telegram.getOpenClawProjectsemits both folders, but the [name] route resolves by that name andgetOpenClawSessionsByEncodedNameselects the first matching split, so one project's sessions cannot be opened. (lib/openclaw-projects.ts:141)
What changed
OpenClaw 2026.9.2 moved live transcripts from per-session JSONL files to a per-agent SQLite database. That caused both cloud ingestion and the local FailproofAI dashboard to stop seeing current OpenClaw sessions. This PR also restores model-visible
instruct()behavior for OpenClawPreToolUsepolicies.Cloud collection / failproofaid
agents/<agentId>/agent/openclaw-agent.sqlitefor every OpenClaw profiletranscript_eventsFailproofAI local dashboard
(agentId, channel)localwhen OpenClaw has no channel metadataevent_jsonrecords as downloadable JSONLOPENCLAW_STATE_DIRbeforeOPENCLAW_HOMEOpenClaw
instruct()enforcementPreToolUsematchers unchangedexec→Bashcanonicalizationpermission: "instruct"verdict from the policy evaluatorblockReasondeny()verdicts permanently blockingThe temporary rejection is only the transport used to put the instruction in the model's context. Guardrail activity remains classified as
instruct, and transcript/session ingestion is unchanged.Backward compatibility
Both transcript formats are supported at the same time:
agents/<agentId>/sessions/<sessionId>.jsonlagents/<agentId>/agent/openclaw-agent.sqlite(agentId, sessionId), SQLite wins because it is the live copyExisting cloud policies do not need source changes. After release, machines only need to upgrade FailproofAI, run
failproofai update, and restart each relevant OpenClaw gateway/profile so the packaged plugin is reloaded.Release
Prepared as stable
1.0.4, including package/Cargo versions and CHANGELOG entries.Validation
cargo fmt --all -- --checkcargo test --workspaceinstruct; unrelated Slack sends remain allowedbunx tsc --noEmitbun run lint— 0 errors; 4 existing<img>warningsbun run test:e2e— 333 passedoven/bun:latest; packaged CLI returnedpermission: "instruct"and packaged retry bridge interrupted once then allowed retry.codex/hooks.jsonis absentStack note
This PR currently targets #789 because the SQLite-reader hardening it uses lives on that branch. It can be retargeted to
mainafter #789 merges.Hermes review
f190591028c3ea866f5dd4d12d1c2a1c28205b441d8f31d926828f3bae215c58f5b35baa44acbff0gpt-5.6-terraSummary
One correctness issue found: ambiguous OpenClaw project slugs can make a valid agent/channel project inaccessible. Focused TypeScript tests and type checking pass in clean containers.
Changes
Validation
Passeddocker run --rm -v /review/input/workspace:/src:ro -w /tmp oven/bun:latest sh -c 'cp -a /src workspace && cd workspace && bun install --frozen-lockfile >/dev/null && bunx vitest run __tests__/hooks/openclaw-instruct-retry-gate.test.ts __tests__/hooks/openclaw-invoice-instruct.test.ts __tests__/lib/openclaw-projects.test.ts __tests__/lib/openclaw-sessions.test.ts __tests__/lib/download-session.test.ts'— Focused OpenClaw policy, project, session, and download tests passed in an isolated clean install. (23s)Passeddocker run --rm -v /review/input/workspace:/src:ro -w /tmp oven/bun:latest sh -c 'cp -a /src workspace && cd workspace && bun install --frozen-lockfile >/dev/null && bunx tsc --noEmit'— TypeScript type check passed in an isolated clean install. (22s)Skippeddocker run --rm --network=none -v /review/input/workspace:/src:ro -w /tmp rust:1.97-bookworm sh -c 'cp -a /src workspace && cd workspace && RUSTUP_TOOLCHAIN=1.97.1-x86_64-unknown-linux-gnu cargo test --offline -p fpai-collect --test openclaw_source'— The isolated Rust container has no cached crates.io dependencies; fetching is unavailable under no-network validation isolation. (1s)Findings
No blocking findings.
1 advisory finding
openClawProjectNamebuildsopenclaw-${agentId}-${channel}. The code explicitly permits hyphens in both values. Thusmain-bot/telegramandmain/bot-telegramboth produceopenclaw-main-bot-telegram.getOpenClawProjectsemits both folders, but the [name] route resolves by that name andgetOpenClawSessionsByEncodedNameselects the first matching split, so one project's sessions cannot be opened. (lib/openclaw-projects.ts:141)Open questions
None.
Policy overrides
None.