Skip to content

docs(durable): propose durable core runtime boundary and validation plan - #101828

Closed
mjnkao wants to merge 4 commits into
openclaw:mainfrom
mjnkao:codex/durable-core-pr1-rfc
Closed

mjnkao wants to merge 4 commits into
openclaw:mainfrom
mjnkao:codex/durable-core-pr1-rfc

Conversation

@mjnkao

@mjnkao mjnkao commented Jul 7, 2026 •

Copy link
Copy Markdown

Context capsule

This is PR1/5 for the durable runtime stack. It is intentionally docs-only: RFC, root-cause summary, durable-core boundary, validation plan, and stack sequencing before any runtime implementation is reviewed.

Durable core stack overview

Durable core means the shared, opt-in runtime substrate that records run identity, step/event ordering, parent/child links, bounded refs, recovery states, signals/timers, and read-only inspection for long-running OpenClaw agent/session/task/subagent work. It is needed because local incidents and related public PRs show repeated coordinator-silence, stale-running-session, non-durable parent handoff, restart recovery, and bespoke durable-delivery fixes that cannot be solved cleanly by one product surface alone.

The core is intentionally below Task Flow, Workboard, plugins, sessions, and channel UI: those can project from it, but they should not own the persistence boundary. It is not a general-purpose workflow engine and does not persist raw prompts or large private payloads.

The full stack is: PR1 #101828 docs-only RFC/root-cause/canonical boundary; PR2 #102495 durable runtime core with SQLite state, lifecycle primitives, gateway/operator surfaces, QR repair, and tests; PR3 agent/session/subagent restart and upgrade-safety proof; PR4 schema lifecycle/recovery hardening; PR5 opt-in workflow worker loop. Promotion remains sequential: PR3 waits for PR1+PR2 threshold, PR4 waits for PR3, and PR5 waits for PR4.

This PR is PR1/5: it defines the boundary and root-cause plan only. ClawSweeper has already rated it 🦐 gold shrimp; the remaining question is maintainer product-direction/canonical RFC choice.

What Problem This Solves

OpenClaw has several durable-ish records, but no shared runtime identity/lifecycle ledger for agent coordination across process, session, channel, and subagent boundaries. That gap shows up as coordinator silence, stale running session rows after live work disappears, non-durable parent handoffs, missed fan-in after restart, and bespoke channel/plugin durable-delivery repairs.

Related public work illustrates the same class of issue: #96853 reconciles stale running sessions; #97715 caps native subagent completion retries after permanently non-durable parent handoff; #90300 routes recovered agent-command replies through durable outbound hooks; and the older #97507/#97508 plus superseded #98717/#98718 durable stack explored overlapping boundaries. This PR makes #101828 the narrower canonical RFC/status source before implementation PRs land.

Scope

  • Adds/updates docs/specs/durable-session-task-runtime-rfc.md.
  • Adds/updates generated docs/docs_map.md metadata for the spec route.
  • Explains root cause, observed issues, durable core components, non-goals, first review slice, and the 5-PR stack.
  • No implementation code, migrations, CLI, gateway methods, worker loop, or tests are included.

Non-scope

  • No runtime behavior changes.
  • No Task Flow, Workboard, channel plugin, or product-specific UI ownership decision beyond keeping them as future projections/consumers.
  • No default-on retry/resume/cancel/signal policy.

Base / diff hygiene

  • Base comparison: origin/main...HEAD.
  • Diff is docs-only: docs/specs/durable-session-task-runtime-rfc.md and docs/docs_map.md.
  • git diff --check origin/main...HEAD passed.

Proof matrix

Gate Command / artifact Result
Docs-only diff git diff --name-only origin/main...HEAD passed; docs/spec plus generated docs map only
Docs map node scripts/generate-docs-map.mjs --check passed after regeneration
Whitespace/diff check git diff --check origin/main...HEAD passed
Private reference scan `rg -n '/Users/ worktrees
Test marker scan `rg -n 'test.only test.skip
Runtime/live proof not applicable docs-only PR

ClawSweeper requirements

  • Includes authored What Problem This Solves: yes.
  • Includes authored Evidence: yes.
  • Stored data model / migration impact: not applicable for this docs-only PR; proposed components are named for follow-up implementation review.
  • Risk labels ClawSweeper should evaluate: architecture/product direction only.
  • Current ClawSweeper result: 🦐 gold shrimp; ready for maintainer review, with maintainer canonical-RFC choice remaining.

Risk / upgrade notes

No runtime or upgrade risk is introduced by this docs-only diff. Merge risk is architectural: accepting this publishes #101828 as the canonical durable-core RFC while older overlapping durable-runtime discussions/PRs should stay superseded or reconciled.

Evidence

  • Docs-only scope verified with git diff --name-only origin/main...HEAD.
  • node scripts/generate-docs-map.mjs --check passed after docs map regeneration.
  • git diff --check origin/main...HEAD passed locally.
  • Scanned the RFC for private local paths/session references; none were present.
  • Scanned for focused-test skip/only markers; none were present.
  • Live runtime proof, migrations, CLI/gateway behavior, and integration checks are intentionally deferred because this PR contains no implementation code.

Next gate

Maintainer chooses whether #101828 is canonical. Stack promotion continues only after PR2 also reaches the gold_shrimp_schrimp threshold; PR3 remains gated on PR1+PR2.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 7, 2026
@clawsweeper

clawsweeper Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 9, 2026, 6:42 AM ET / 10:42 UTC.

Summary
The PR adds two durable-runtime spec pages plus generated docs-map entries describing a proposed durable core runtime boundary and staged validation plan.

PR surface: Docs +188. Total +188 across 3 files.

Reproducibility: not applicable. this is a docs-only RFC PR, not a runtime bug report. The prior generated-docs issue is source-checkable in the diff and now has a green check-docs run at the current head.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

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

Rank-up moves:

  • Update the PR body to name the actual docs/specs/durable-runtime-* files instead of the removed durable-session-task-runtime path.
  • Get maintainer confirmation that this is the canonical durable-runtime RFC before dependent implementation PRs proceed.

Risk before merge

Maintainer options:

  1. Canonicalize Before Merge (recommended)
    A maintainer approves this as the durable-runtime RFC and reconciles the older overlapping durable RFC/implementation branches before dependent implementation PRs proceed.
  2. Fold The Text Elsewhere
    If another durable-runtime RFC is preferred, carry this PR's useful text there and pause or close this branch as non-canonical.
  3. Merge As A Temporary Proposal
    Maintainers may intentionally accept the short-term architecture risk of multiple live durable-runtime proposal threads and clean them up after merge.

Next step before merge

  • [P2] The generated-docs blocker is fixed; the remaining action is a maintainer canonical-RFC decision, not an automated repair.

Maintainer decision needed

  • Question: Should this PR become the canonical durable core runtime RFC for the dependent durable-runtime stack?
  • Rationale: The patch is mechanically sound docs work now, but accepting it defines a core runtime architecture boundary and supersession path that automation should not choose for maintainers.
  • Likely owner: steipete — This is a repository-level architecture and docs canonicalization choice, and steipete is both the listed BDFL and strongest current docs/product-direction route owner in the evidence.
  • Options:
    • Accept This RFC As Canonical (recommended): Merge this docs proposal after any PR-body cleanup, then reconcile older overlapping durable-runtime RFC and implementation branches against it.
    • Fold Into Another Durable RFC: Preserve the useful boundary and validation-plan text in another sponsored RFC and pause or close this branch afterward.
    • Pause Durable Core Direction: Leave this PR and dependent implementation work open but unmerged until maintainers decide whether a shared core durable runtime belongs in OpenClaw now.

Security
Cleared: Docs-only changes introduce no concrete security or supply-chain concern.

Review details

Best possible solution:

The durable stack should have one maintainer-accepted canonical RFC, with older overlapping durable-kernel branches reconciled or closed and implementation work gated behind that accepted boundary.

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

Not applicable: this is a docs-only RFC PR, not a runtime bug report. The prior generated-docs issue is source-checkable in the diff and now has a green check-docs run at the current head.

Is this the best way to solve the issue?

Unclear until maintainer direction is set: mechanically this is now a narrow docs/RFC patch, but choosing it as the canonical durable-core boundary is a product architecture decision.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is a low-risk docs/RFC proposal with no runtime behavior change, but it still needs maintainer canonicalization.
  • merge-risk: 🚨 other: Merging would publish a canonical durable-runtime architecture source while older overlapping durable-runtime branches and a dependent implementation PR still need maintainer reconciliation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed

PR surface:

Docs +188. Total +188 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 3 188 0 +188
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 188 0 +188

What I checked:

  • Current PR diff: The current PR head adds docs/specs/durable-runtime-rfc.md, docs/specs/durable-runtime-root-cause-and-test-plan.md, and matching docs/docs_map.md entries; the earlier stale durable-session-task-runtime docs-map entry is removed by the latest commit. Public docs: docs/docs_map.md. (docs/docs_map.md:8634, d94b1410f4f2)
  • Docs CI: Live PR status shows check-docs, Real behavior proof, dependency-guard, and security-sensitive-guard all succeeded at the current head. (d94b1410f4f2)
  • Scoped docs policy: docs/AGENTS.md says docs/docs_map.md is generated from pnpm docs:map:gen, so the matching generated map and green check-docs result are the relevant mechanical docs proof. Public docs: docs/AGENTS.md. (docs/AGENTS.md:18, ff031149f3b1)
  • Existing Task Flow boundary: Current docs already define Task Flow as a durable multi-step orchestration layer above background tasks, which is why accepting this RFC is an architecture-boundary decision rather than a purely mechanical docs edit. Public docs: docs/automation/taskflow.md. (docs/automation/taskflow.md:10, ff031149f3b1)
  • Existing durable message surface: Current docs show durable send/receive behavior has already shipped in the channel message stack, so this RFC overlaps adjacent durability surfaces without directly changing runtime behavior. Public docs: docs/concepts/message-lifecycle-refactor.md. (docs/concepts/message-lifecycle-refactor.md:10, ff031149f3b1)
  • Related durable-runtime PR search: GitHub search found the current RFC, the open dependent durable runtime core PR, closed replacement-stack PRs, and older overlapping durable RFC/implementation PRs, so the remaining question is canonicalization rather than a missing narrow repair.

Likely related people:

  • steipete: CONTRIBUTING lists Peter Steinberger as the repository BDFL at @steipete, and recent current-main docs-map/generator history also points to him on the docs infrastructure this PR updates. (role: official maintainer and likely product-direction owner; confidence: high; commits: 769878303744; files: CONTRIBUTING.md, docs/docs_map.md, scripts/generate-docs-map.mjs)
  • obviyus: Current-main blame and git show tie Ayaan Zaidi to Task Flow, durable message lifecycle docs, and recent agent runtime liveness work adjacent to this durable-runtime RFC boundary. (role: recent adjacent runtime-docs contributor; confidence: medium; commits: e4949996d1eb, e975d4923808, 4af2ca0a4d78; files: docs/automation/taskflow.md, docs/concepts/message-lifecycle-refactor.md, src/agents)
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-07T17:20:10.735Z sha bc13de0 :: found issues before merge. :: [P2] Regenerate the docs metadata for the new specs
  • reviewed 2026-07-07T17:39:33.310Z sha 98ffd6a :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T09:07:42.750Z sha 6d13b67 :: needs changes before merge. :: [P2] Regenerate the docs map from the actual pages

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jul 7, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 7, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 7, 2026
@mjnkao

mjnkao commented Jul 9, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 9, 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 rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 9, 2026
@mjnkao

mjnkao commented Jul 9, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review please. I refreshed the generated docs map at d94b141 so docs/docs_map.md no longer lists the missing docs/specs/durable-session-task-runtime-rfc.md page. Proof: node scripts/generate-docs-map.mjs --check passed; git diff --check passed.

@clawsweeper

clawsweeper Bot commented Jul 9, 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 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 9, 2026
@mjnkao

mjnkao commented Jul 11, 2026 •

Copy link
Copy Markdown
Author

Superseded by the rebuilt PR1 candidate: #104246

This new PR1 is rebuilt on the latest release/2026.7.1 / 2026.7.1 beta 3 foundation (619a8728905f9d751e86b655efaa8c6129c42b52 / release/2026.7.1) so the stack is as upstream-friendly as possible. Please treat #104246 as the current canonical PR1 candidate for the durable core stack. This is a rebuild/supersession path, not a transfer of the old PR review or rating state.

@mjnkao

mjnkao commented Jul 12, 2026

Copy link
Copy Markdown
Author

Closing this older durable-core PR stack entry because the work has moved to the refreshed 2026.7.1-beta.3 stack. Please use the new stack starting at PR #104246 for current context and review: #104246. Follow-on PR2 is #104327. This PR is superseded, not abandoned.

@mjnkao mjnkao closed this Jul 12, 2026
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 merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. triage: low-signal-docs Candidate: docs-only change looks low signal; maintainer review needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant