Skip to content

docs(heartbeat): align retired config options with fixed runtime policies - #113455

Merged
steipete merged 1 commit into
mainfrom
claude/heartbeat-config-retirement
Jul 25, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/heartbeat-config-retirement

Conversation

@steipete

@steipete steipete commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The heartbeat config retirement shipped in the #110950 series left stale surfaces behind: seven docs pages still advertised skipWhenBusy, ackMaxChars, includeReasoning, includeSystemPromptSection, and suppressToolErrorWarnings as live options, while the runtime has fixed policies (automatic busy deferral, internal-only reasoning payloads, fixed 300-char HEARTBEAT_OK budget, cadence-driven prompt section, always-on tool-error warnings). Tests and code comments still referenced the retired includeReasoning/ackMaxChars semantics.

This is rescued work from the original retirement effort (never committed by its session), re-derived against current main — #112773 had already removed skipWhenBusy from the claw profile schema, so this PR locks that rejection in with a dedicated diagnostic test rather than re-deleting it. Rebased onto current main; the heartbeat-runner comment hunk was dropped because the classifyHeartbeatAgentOutcome refactor already deleted that comment's code region.

Why This Change Was Made

Docs promising config fields that do nothing mislead operators; strict config surfaces need matching strict documentation. Executable source changes are comment-only. Operator decision: land now.

User Impact

Documentation states the strict heartbeat field list and fixed policies. Claw profiles using retired heartbeat.skipWhenBusy get a clear diagnostic naming the field (behavior already present via strict parsing; now pinned by test).

Evidence

Real behavior proof (live run, source CLI via node --import tsx src/entry.ts on this branch head; paths redacted): a claw package whose OpenClaw profile (profiles/demo.openclaw.yml) still declares the retired field —

schemaVersion: 1
agent:
  heartbeat:
    every: "30m"
    skipWhenBusy: true
$ OPENCLAW_EXPERIMENTAL_CLAWS=1 openclaw claws inspect <pkg>/demo.claw.json
ERROR invalid_manifest $.metadata.openclaw.config.agent.heartbeat: Unrecognized key: "skipWhenBusy"
(exit 1)

This is the operator-visible diagnostic the new openclaw-profile.test.ts assertion pins ($.agent.heartbeat, message naming skipWhenBusy; the CLI prefixes the profile path).

Additional proof:

  • Focused suites green on the rebased head with a fresh dependency install: claw openclaw-profile + schema (new rejection diagnostic + realpath-canonicalized add-plan assertions), dead-config-keys, get-reply fast-path, heartbeat-runner returns-default-unset, prompt snapshots — 5 Vitest shards.
  • Docs checks green: check-docs-mdx (751 files), generate-docs-map --check (map unchanged).
  • Codex gpt-5.6-sol autoreview on the rebased branch: clean, "patch is correct".
  • Final sweep: skipWhenBusy outside changelog/history remains only in the rejection test, dead-config-keys test, and doctor legacy-migration entry.

@steipete
steipete marked this pull request as ready for review July 25, 2026 00:41
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: S maintainer Maintainer-authored PR labels Jul 25, 2026
@steipete steipete closed this Jul 25, 2026
@steipete steipete reopened this Jul 25, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 24, 2026, 8:46 PM ET / July 25, 2026, 00:46 UTC.

ClawSweeper review

What this changes

Updates seven heartbeat documentation surfaces plus related comments and tests so retired configuration fields are no longer advertised and fixed delivery, cadence, and busy-deferral policies are described consistently.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 4 items remain

The branch is a focused documentation and regression-test alignment for heartbeat policies that the PR describes as already fixed in runtime. It has no discrete patch defect in the supplied diff, but the protected maintainer label keeps it out of automatic cleanup and the PR body provides test/check results rather than after-fix real-behavior evidence.

Priority: P3
Reviewed head: e55f06e48ba37ec7e441efcb50385e470f7233ce
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and appears internally consistent, but its posted evidence is mock/check-only rather than a real after-fix operator validation.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR body reports focused tests and documentation checks, but it does not show a redacted after-fix real profile-validation run or other live evidence of the operator-visible diagnostic. Add a terminal transcript, screenshot, log, or linked artifact and redact private paths, identifiers, and credentials; updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. 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 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports focused tests and documentation checks, but it does not show a redacted after-fix real profile-validation run or other live evidence of the operator-visible diagnostic. Add a terminal transcript, screenshot, log, or linked artifact and redact private paths, identifiers, and credentials; updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. 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 4 items Focused branch scope: The supplied PR diff removes documentation references to five retired heartbeat fields, updates runtime comments to describe the now-fixed reasoning-delivery behavior, and adds a targeted rejection diagnostic assertion for skipWhenBusy.
Existing profile boundary: The linked merged profile work established strict OpenClaw-specific profile validation; this PR adds coverage that the retired heartbeat field is rejected with a heartbeat-scoped diagnostic rather than restoring a compatibility path.
Maintainer handling signal: This PR has the protected maintainer label in the supplied GitHub context, so conservative cleanup must leave it open for explicit human handling.
Findings None None.
Security None None.

How this fits together

Heartbeat is OpenClaw’s periodic agent turn: configuration determines cadence and targeting, the scheduler decides whether a run may proceed, and the runner selects an outbound-capable reply or suppresses an acknowledgement. The configuration schema, runtime comments, tests, and gateway documentation all need to describe the same supported heartbeat contract.

flowchart LR
  A[Heartbeat configuration] --> B[Strict profile and config parsing]
  B --> C[Heartbeat scheduler]
  C --> D[Agent heartbeat turn]
  D --> E[Reply payload selection]
  E --> F[Outbound alert or silent acknowledgement]
  G[Gateway documentation] --> A
Loading

Decision needed

Question Recommendation
Should the protected maintainer review confirm that the fixed heartbeat-policy wording and the strict retired-field diagnostic are the intended operator contract before this documentation alignment lands? Confirm and merge after proof: Confirm the fixed-policy wording against the intended runtime contract after a concise redacted real validation transcript is attached.

Why: The patch intentionally codifies policy that affects documented configuration expectations, and the protected label requires explicit human handling rather than automated cleanup.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports focused tests and documentation checks, but it does not show a redacted after-fix real profile-validation run or other live evidence of the operator-visible diagnostic. Add a terminal transcript, screenshot, log, or linked artifact and redact private paths, identifiers, and credentials; updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. 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.
  • Resolve merge risk (P1) - The branch changes user-facing configuration guidance while relying on test and check summaries only; no posted after-fix real run shows the rejected retired field and the resulting operator diagnostic.
  • Complete next step (P2) - The protected maintainer label and missing live proof require a human contract check rather than an automated repair or cleanup action.
Agent review details

Security

None.

PR surface

Source -2, Tests +22, Docs +3. Total +23 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 2 6 8 -2
Tests 4 31 9 +22
Docs 7 26 23 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 63 40 +23

Review metrics

Metric Value Why it matters
Retired heartbeat documentation 5 retired options removed from operator-facing guidance This reduces the chance that users configure fields which strict parsing or fixed runtime policy no longer supports.

Stored data model

Persistent data-model change detected: database schema: src/claws/openclaw-profile.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the fixed-policy documentation and targeted rejection coverage, then attach a short redacted real validation transcript showing that a profile containing heartbeat.skipWhenBusy is rejected with the documented diagnostic before maintainer approval.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the fixed-policy documentation and targeted rejection coverage, then attach a short redacted real validation transcript showing that a profile containing heartbeat.skipWhenBusy is rejected with the documented diagnostic before maintainer approval.

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

Not applicable as a bug reproduction: the PR aligns existing documentation and coverage with an already-established fixed runtime policy. The relevant validation is a real profile parse showing that the retired field is rejected with the stated diagnostic.

Is this the best way to solve the issue?

Yes, conditionally: removing stale configuration guidance and pinning strict rejection is narrower and more maintainable than restoring retired runtime switches. A maintainer should still confirm the documented fixed-policy wording and real operator-facing diagnostic before merge.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a focused documentation, comment, and regression-test cleanup around already-retired configuration behavior.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports focused tests and documentation checks, but it does not show a redacted after-fix real profile-validation run or other live evidence of the operator-visible diagnostic. Add a terminal transcript, screenshot, log, or linked artifact and redact private paths, identifiers, and credentials; updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. 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:

  • P3: This is a focused documentation, comment, and regression-test cleanup around already-retired configuration behavior.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports focused tests and documentation checks, but it does not show a redacted after-fix real profile-validation run or other live evidence of the operator-visible diagnostic. Add a terminal transcript, screenshot, log, or linked artifact and redact private paths, identifiers, and credentials; updating the PR body should trigger a fresh review, or a maintainer can request @clawsweeper re-review. 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

What I checked:

  • Focused branch scope: The supplied PR diff removes documentation references to five retired heartbeat fields, updates runtime comments to describe the now-fixed reasoning-delivery behavior, and adds a targeted rejection diagnostic assertion for skipWhenBusy. Public docs: docs/gateway/config-agents.md. (docs/gateway/config-agents.md, e55f06e48ba3)
  • Existing profile boundary: The linked merged profile work established strict OpenClaw-specific profile validation; this PR adds coverage that the retired heartbeat field is rejected with a heartbeat-scoped diagnostic rather than restoring a compatibility path. (src/claws/openclaw-profile.test.ts, e9b3252ae8e5)
  • Maintainer handling signal: This PR has the protected maintainer label in the supplied GitHub context, so conservative cleanup must leave it open for explicit human handling.
  • Provided validation evidence: The PR body reports focused schema, heartbeat-runner, prompt-snapshot, and documentation checks, but it does not include a redacted live command transcript, log, screenshot, recording, or linked artifact demonstrating the changed operator-visible behavior after the update. (e55f06e48ba3)

Likely related people:

  • steipete: Authored the linked heartbeat-and-cron retirement proposal that defines the policy direction this documentation cleanup follows. (role: related design author; confidence: medium; files: docs/gateway/heartbeat.md, src/infra/heartbeat-runner.ts)
  • giodl73-repo: Authored the merged strict OpenClaw profile work whose validation boundary this PR exercises with the retired-field diagnostic. (role: recent adjacent contributor; confidence: medium; commits: e9b3252ae8e5; files: src/claws/openclaw-profile.test.ts, src/claws/schema.test.ts)

Rank-up moves

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

  • Attach a redacted terminal transcript or screenshot that validates a profile containing heartbeat.skipWhenBusy and shows the heartbeat-scoped rejection diagnostic.
  • Have the protected maintainer review confirm the fixed-policy documentation is the intended public configuration contract.

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.

…cies

The runtime retirement already shipped: busy deferral is automatic,
reasoning payloads stay internal, the HEARTBEAT_OK ack budget is fixed at
300 chars, the Heartbeats prompt section follows cadence, and tool-error
warnings are always on. Docs still advertised skipWhenBusy, ackMaxChars,
includeReasoning, includeSystemPromptSection, and suppressToolErrorWarnings
as live options; this aligns seven pages with the fixed policies and the
strict heartbeat field list, locks the claw-profile skipWhenBusy rejection
diagnostic with a dedicated test, renames includeReasoning-era test/comments,
and canonicalizes claw add-plan workspace path assertions (macOS realpath).
@steipete
steipete force-pushed the claude/heartbeat-config-retirement branch from e55f06e to 1dc5d90 Compare July 25, 2026 13:36
@steipete
steipete merged commit d1b534d into main Jul 25, 2026
131 of 133 checks passed
@steipete
steipete deleted the claude/heartbeat-config-retirement branch July 25, 2026 13:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 26, 2026
…cies (openclaw#113455)

The runtime retirement already shipped: busy deferral is automatic,
reasoning payloads stay internal, the HEARTBEAT_OK ack budget is fixed at
300 chars, the Heartbeats prompt section follows cadence, and tool-error
warnings are always on. Docs still advertised skipWhenBusy, ackMaxChars,
includeReasoning, includeSystemPromptSection, and suppressToolErrorWarnings
as live options; this aligns seven pages with the fixed policies and the
strict heartbeat field list, locks the claw-profile skipWhenBusy rejection
diagnostic with a dedicated test, renames includeReasoning-era test/comments,
and canonicalizes claw add-plan workspace path assertions (macOS realpath).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS 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