Skip to content

docs(plugins): document safe external cron projection#104227

Merged
steipete merged 4 commits into
mainfrom
codex/host-adapter-cron-projection
Jul 11, 2026
Merged

docs(plugins): document safe external cron projection#104227
steipete merged 4 commits into
mainfrom
codex/host-adapter-cron-projection

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #104083

What Problem This Solves

Fixes an issue where plugin authors could mistake a hook timeoutMs for cancellation and allow external scheduler writes to outlive the lifecycle they thought they were bounded by. The cron lifecycle docs also lacked a complete safe pattern for projecting wakes to a hosting platform.

Why This Change Was Made

The docs now state the actual await-only timeout contract and provide one vendor-neutral, full-snapshot cron projection pattern. The example keeps scheduler ownership at cron_reconciled, treats cron_changed as a coalescible hint, serializes replacement, waits for durable host acceptance, retries with bounded backoff, and aborts/drains/closes on gateway_stop without adding a core outbox.

User Impact

Plugin and hosting-integration authors can implement wake scheduling without relying on lossy event ordering, adopting a stale scheduler after reload, or assuming OpenClaw cancels timed-out plugin work. The SDK and external-app guides now route readers to the same canonical contract.

Evidence

  • pnpm docs:list
  • pnpm format:docs:check — clean across 689 files
  • pnpm docs:check-mdx — 705 files passed
  • pnpm docs:check-links — 5,812 internal links checked, 0 broken
  • pnpm docs:check-i18n-glossary — passed against the fetched main merge base
  • pnpm docs:map:check — generated map current; adds the new section and refreshes one existing current-main heading
  • Extracted TypeScript example checked with tsgo against the repository config
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --engine codex --model gpt-5.5 --thinking high — clean, no accepted/actionable findings

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: XS maintainer Maintainer-authored PR labels Jul 11, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready verification completed at exact head adb8726906a9065a58b67bd35e81cac6902064fa.

  • Prerequisite typed lifecycle contract: feat(plugins): add cron reconciliation lifecycle hook #104191, landed as 49b58288d3eb63536b2e11aa5616c902b85089b0 and verified as an ancestor of this branch.
  • Native review artifacts: READY FOR /prepare-pr, 0 findings.
  • pnpm docs:list — passed.
  • pnpm format:docs:check — 689 files clean.
  • pnpm docs:check-mdx — 705 files passed.
  • pnpm docs:check-links — 5,812 internal links checked, 0 broken.
  • pnpm docs:check-i18n-glossary — passed.
  • pnpm docs:map:check — passed.
  • pnpm exec tsgo -p .tmp-cron-projection-tsconfig.json — extracted TypeScript example passed against the repository config; the ephemeral fixture was removed afterward.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --engine codex --model gpt-5.5 --thinking high — clean after addressing the stale-projection race; final confidence 0.87.
  • git diff --check origin/main...HEAD — passed.
  • OPENCLAW_TESTBOX=1 scripts/pr prepare-run 104227 — hosted exact-head gates passed in hosted_exact_or_recent_rebase mode; remote and prepared heads match.
  • Exact-head check-docs, security-fast, dependency-guard, and actionlint checks are green.

Known proof boundary: this is a vendor-neutral documentation contract, not a concrete host integration. The example explicitly requires the host adapter to provide atomic/idempotent full replacement, durable acceptance, and abort-before-accept semantics; OpenClaw does not claim to provide an outbox for those external effects.

@steipete
steipete merged commit dfa31af into main Jul 11, 2026
69 of 75 checks passed
@steipete
steipete deleted the codex/host-adapter-cron-projection branch July 11, 2026 06:26
@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 12, 2026
* docs(plugins): document safe cron projection

* docs(plugins): serialize cron projection revisions

* docs: refresh generated map

* docs(plugins): cancel stale cron projections
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 size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs Bug]: Correct hook timeout semantics and document a safe cron host adapter

1 participant