Repository navigation
fix: regression where commitment safety handling can disable tools for unrelated due heartbea... - #75344
Conversation
…r unrelated due heartbea...
|
Codex review: passed for ClawSweeper automerge. What this changes: The PR changes heartbeat preflight and prompt resolution so due HEARTBEAT.md tasks remain tool-capable when due commitments also exist, defers commitment delivery for that turn, and adds regression coverage. Automerge follow-up: No repair job is needed; this PR is already the narrow repair and has no actionable review findings. The ClawSweeper automerge lane can gate the exact head on checks and mergeability. Security review: Security review cleared: The diff only changes heartbeat runner routing logic and tests, adds no dependencies or execution surfaces, and preserves no-tools handling for commitment-only delivery turns. Review detailsBest possible solution: Land this narrow PR through the existing ClawSweeper automerge path if the exact head remains green and mergeable, preserving no-tools commitment-only turns while keeping unrelated due heartbeat tasks tool-capable. Do we have a high-confidence way to reproduce the issue? Yes. A high-confidence reproduction is a session with commitments enabled, heartbeat target set to last, one due commitment, and a due tasks block in HEARTBEAT.md; current main couples the commitment path to the heartbeat run, and the PR adds a focused test for that setup. Is this the best way to solve the issue? Yes. The PR is the narrowest maintainable fix for the regression because it separates due task prompts from untrusted commitment metadata and keeps the existing no-tools commitment safety rule intact; a second no-tools follow-up turn would be broader product policy work. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against bd20f8e07e92. |
|
@clawsweeper automerge |
|
🦞🦞 I added Draft PRs stay fix-only until GitHub marks them ready for review. A maintainer can pause this with |
|
🦞🦞 Source: I left the PR open for the remaining gate instead of bypassing it. |
|
@clawsweeper automerge |
Summary
Found one regression where commitment safety handling can disable tools for unrelated due heartbeat tasks in the same heartbeat turn.
What ClawSweeper Is Fixing
src/infra/heartbeat-runner.ts:1324resolveHeartbeatRunPromptappends the commitment prompt to a due periodic-task prompt whenpreflight.taskshas due tasks (src/infra/heartbeat-runner.ts:856andsrc/infra/heartbeat-runner.ts:870). Later, any prompt with due commitments sets{ disableTools: true, skillFilter: [] }for the whole run (src/infra/heartbeat-runner.ts:1324). That means the model receives “Run the following periodic tasks…” but the run is forced into no-tools mode.Expected Repair Surface
src/infra/heartbeat-runner.tsSource And Review Context
ClawSweeper report: https://github.com/openclaw/clawsweeper/blob/main/records/openclaw-openclaw/commits/b277ae3f4c402596402cb8be5be4dca2106483f4.md
Commit under review: b277ae3
Latest main at intake: 3c48510
Original commit author: Vignesh
GitHub author: @vignesh07
Highest severity: medium
Review confidence: high
Diff:
a102f4dede6af52523473ac29575c7e442493d15..b277ae3f4c402596402cb8be5be4dca2106483f4Changed files: all 32 files from the prompt.
Code read:
src/commitments/store.ts,src/commitments/runtime.ts,src/commitments/extraction.ts,src/infra/heartbeat-runner.ts,src/infra/outbound/targets.ts,src/agents/cli-runner/prepare.ts,src/agents/cli-backends.ts, plugin CLI backend definitions, relevant tests, docs, and Docker E2E harness.Dependencies/web: no external web lookup needed; no dependency version changes.
PR metadata:
gh pr view 75302showed the merge commit and green relevant checks.Expected validation
pnpm check:changedClawSweeper already ran:
pnpm docs:listpnpm installpnpm test src/infra/heartbeat-runner.commitments.test.ts src/commitments/store.test.ts src/commitments/commitments-full-chain.integration.test.ts src/agents/cli-runner/prepare.test.tspassed.git diff --check a102f4dede6af52523473ac29575c7e442493d15..b277ae3f4c402596402cb8be5be4dca2106483f4passed.Known review limits:
ClawSweeper Guardrails
mainbefore changing code.ClawSweeper 🐠 replacement reef notes:
fish notes: model gpt-5.5, reasoning medium; reviewed against f85787a.