Skip to content

RFC 0018: Readiness Conditions and Providers - #33

Closed
giodl73-repo wants to merge 102 commits into
openclaw:mainfrom
giodl73-repo:user/giodl/standard-hosting-profiles-ready-check
Closed

giodl73-repo wants to merge 102 commits into
openclaw:mainfrom
giodl73-repo:user/giodl/standard-hosting-profiles-ready-check

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Decision Requested

Should OpenClaw add an opt-in, structured, subject-aware readiness contract around its existing Gateway checker?

This RFC covers Readiness Conditions and Providers. Standard Hosting Profiles remain a separate product/support decision in RFC 0023.

Why

OpenClaw already exposes /ready and /readyz, but their evaluator is purpose-built around fixed Gateway observations. Operators cannot select which known runtime facts their deployment requires, plugins cannot contribute bounded observations, and a single result cannot identify the different runtime subjects those observations describe.

Proposed V1

Each condition has stable type, subjectRef, status, requirement, reason, and message fields, with optional bounded related subjects. Required False or Unknown conditions fail readiness; advisory conditions remain visible. Activated /ready, /readyz, Gateway health/status projections, and openclaw ready consume the same canonical result. HTTP /health and /healthz remain shallow liveness.

Health/status consumers can derive one selected-condition state without changing or re-evaluating conditions:

  • required False -> failing
  • required Unknown without a required failure -> unknown
  • advisory non-True with all required conditions true -> degraded
  • every selected condition true -> passing

Detailed local or authenticated status reuses each condition's stable reason, bounded redacted message, and subject references. Unauthenticated remote output exposes only the aggregate status and readiness boolean. A separate /statusz may expose this diagnostic projection while /healthz remains liveness and /readyz remains traffic admission.

The result declares its producer and a versioned reconciled subject package once. IDs renew at the lifecycle boundary owned by each subject: optional host workload, process, Gateway serving lifecycle, config, plugin, node, or another resource. A generation revises the same object. Operators can therefore diff (subjectRef, type) and distinguish a condition transition from replacement or revision.

OpenClaw retains no history. Hosts and telemetry systems may store and diff the bounded result. This gives Docker, Kubernetes, OCC, and other operators enough attribution to explain a readiness transition without turning readiness into a resource store or control plane.

Operators select reusable criteria through gateway.readiness. Registering a criterion never selects it. Plugin providers are namespaced, enumerable, observational, advisory by default, and receive a subject collector. Core owns deadlines, cancellation, coalescing, caching, output bounds, redaction, reconciliation, deterministic ordering, and fail-closed projection.

This PR includes the normative Readiness v1 and Readiness Subjects v1 sidecars. Its non-normative platform comparison maps the design to Kubernetes, Docker, systemd, ASP.NET Core, Spring Boot, and OpenTelemetry.

Proposed Condition Catalog

Area Conditions How they participate
Gateway serving baseline GatewayStartupComplete, GatewayAcceptingWork, ChannelRuntimeReady, ConfigLoaded Universal required conditions that modernize existing Gateway observations.
Gateway diagnostics ChannelRuntimeSuppressed, EventLoopHealthy, PluginsLoaded Visible advisories; the selectable conditions may be promoted to required.
Runtime activation WorkspaceWritable, ConfigCurrent, ModelRouteReady, SecretsReady Selectable checks for the active workspace, config, model/auth route, and secret owners.
Agent execution ContextEngineReady, ToolCatalogReady, McpRuntimeReady, SandboxReady, HarnessReady Selectable observations from the OpenClaw owners of each execution capability.
State and background services SessionStorageReady, StateReady, DeliveryRuntimeReady, SchedulerReady Selectable storage, state, delivery, and scheduler lifecycle observations.
Plugin dependencies plugin.<plugin-id>.<criterion-id> Activated plugins may register bounded, namespaced observations; they remain advisory unless selected as required.

ReadinessEvaluationComplete and remote GatewayResponding guard failures keep incomplete evaluation or an unreachable Gateway explicit. Merely implementing or registering a condition never selects it. Outside the universal baseline, only gateway.readiness configuration or a separately accepted Hosting Profile changes what must pass.

Compatibility Boundary

  • Without gateway.readiness or another accepted activation contract, /ready and /readyz use the legacy checker.
  • Presence of gateway.readiness, including {}, activates bounded canonical evaluation.
  • Selected but unobserved facts remain explicit Unknown conditions.
  • A separately accepted Standard Hosting Profile may activate the same evaluator by selecting a named condition set.
  • Selected-condition health is a projection outside CanonicalReadinessResult; it does not change readiness contract version 1.
  • /health and /healthz remain shallow liveness. /statusz is diagnostic and returns 200 after successful evaluation regardless of condition-health state.

Implementation Stack

  1. PR 104018 adds the readiness framework, providers, canonical projections, CLI, and subject identity at exact head abbdfa0876f.
  2. PR 113421 adds reusable OpenClaw-owned conditions for core runtime owners at exact head a7e0df75ff2. It depends on PR 104018.
  3. PR 121355 derives condition health for Gateway health/status and adds /statusz at exact head 8cb054a8f47. It is stacked after PR 114636 to avoid reopening the rebased implementation/profile stack, but it has no runtime dependency on Hosting Profiles.

The framework and owner PRs are profile-free and independently adoptable. Owner criteria observe existing snapshots. Readiness does not make model calls, acquire credentials, connect MCP servers, start sandboxes or harnesses, open databases, or start schedulers. Active filesystem checks and provider calls are bounded.

Operator Facilities

  • Validated follow-up work demonstrates openclaw ready --watch with bounded semantic transitions, recovery, and subject-lifetime replacement without changing one-shot behavior.
  • Validated follow-up work demonstrates an inert readiness catalog and openclaw ready criteria list|inspect without invoking providers.
  • Validated follow-up work demonstrates openclaw ready --wait [duration] as a bounded startup gate over the canonical ready RPC.
  • Validated follow-up work demonstrates human explanations for the identity, generation, parent, and lifetime of subjects behind non-passing conditions.
  • Doctor, telemetry, support bundles, and updates consume readiness evidence through their existing owners.

Package Proof

Exact-head package-installed Docker proof passes over the profile and release-artifact stack. It exercises RFC 0018 readiness surfaces, stable repeated polls, fail-closed transitions, and host-stable/process-and-Gateway-renewing container restart semantics using an immutable no-push package/image artifact.

Maintainer Questions

  1. Is explicit activation the right upgrade boundary?
  2. Is required/advisory the right modernization of the existing evaluator?
  3. Is the producer/subject identity package the right attribution model?
  4. Is activation-scoped plugin registration the right extension boundary?
  5. Is a derived selected-condition health state plus separate /statusz the right diagnostic projection while /healthz remains shallow?

@giodl73-repo
giodl73-repo force-pushed the user/giodl/standard-hosting-profiles-ready-check branch 2 times, most recently from 510b525 to 5d3b673 Compare July 10, 2026 02:40
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jul 10, 2026
@clawsweeper

clawsweeper Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed October 2, 2026, 4:00 PM ET / 20:00 UTC (Revision 146).

ClawSweeper review

What this changes

Adds a readiness RFC and three supporting documents defining opt-in Gateway checks, plugin observations, runtime identity, and shared diagnostic output.

Merge readiness

⛔ Blocked before merge - 3 items remain

The proposal remains distinct from the default branch and awaits product acceptance. The previously identified specification defects are resolved; no new blocking patch defect was established.

Priority: P2
Reviewed head: b09eed5edeac4aa18bda0da81bbb70ec90b0b4b7
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent, supported design proposal with no established blocking defect; pending product acceptance does not reduce its quality rating.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): Preserved prior package-installed Docker proof exercises the proposed Gateway evaluator through HTTP readiness and CLI failure/recovery, repeated polls, and container lifecycle identity changes. Run and conformance-step success were rechecked; raw logs were proxy-blocked. This RFC changes no stored-data contract.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Preserved prior package-installed Docker proof exercises the proposed Gateway evaluator through HTTP readiness and CLI failure/recovery, repeated polls, and container lifecycle identity changes. Run and conformance-step success were rechecked; raw logs were proxy-blocked. This RFC changes no stored-data contract.
Evidence reviewed 10 items Pinned contribution scope: The introduced delta adds four Markdown documents and changes no executable code. All four added documents were read. The original head's raw parent matches the supplied pinned parent.
Still absent from the default branch: The default-branch tree contains no readiness RFC or these normative sidecars. GitHub's PR inventory identifies this proposal and Standard Hosting Profiles as separate open proposals; the merged Doctor health RFC addresses diagnostic and repair execution rather than traffic readiness. No same-repository merged fixing PR or release implementing this proposal was established.
RFC acceptance policy: README requires a maintainer-discussion thread, explicit acceptance, an implementation issue, and accepted frontmatter before merge. This proposal still correctly declares draft status and an empty implementation issue. GitHub commit metadata associates the RFC-process change with kevinslin.
Findings None None.
Security None None.

How this fits together

Gateway readiness combines runtime observations and selected plugin checks into a traffic-admission decision. The proposed contract shares that decision and its diagnostic details across HTTP probes, status, health, and CLI consumers.

flowchart TD
  A[Runtime observations] --> D[Canonical readiness evaluation]
  B[Activated plugin checks] --> D
  C[Operator criterion selection] --> D
  D --> E[Required checks determine readiness]
  E --> F[HTTP traffic admission]
  D --> G[Authenticated diagnostics and CLI]
Loading

Decision needed

Question Recommendation
Should OpenClaw accept this opt-in readiness and plugin-provider contract, including process restart as recovery for a permanently pending required provider? Accept the bounded opt-in contract: Endorse the documented API and restart recovery boundary while keeping Hosting Profiles a separate decision.

Why: The specification is coherent, but permanent public API direction and the operational recovery tradeoff require maintainer intent; implementation proof cannot grant that acceptance.

Before merge

  • Resolve merge risk (P1) - Accepting the RFC commits to a new plugin registration and readiness configuration contract. Maintainers have not endorsed the documented tradeoff that a permanently pending required provider keeps an activated deployment unready across reloads until operator repair and Gateway process restart.
  • Complete next step (P2) - Record the maintainer product decision in the required discussion thread; if accepted, create or designate the implementation issue and update status to accepted with its issue URL before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Proposal scope 4 Markdown files, +1836 lines; production +0, tests +0 The review establishes design contracts rather than changing a running installation.

Root-cause cluster

Relationship: canonical
Canonical: #33
Summary: This proposal owns the readiness contract; Hosting Profiles is an explicitly separate composition and support decision.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Endorse the proposed contract (recommended)
    Record acceptance of explicit activation, the new plugin API, and restart-based recovery before completing RFC acceptance metadata.
  2. Defer plugin extensibility
    Keep the proposal in draft while narrowing the initial agreement to canonical core observations.

Technical review

Best possible solution:

Adopt one opt-in readiness contract with explicit operator selection, preserved legacy behavior, and an agreed provider recovery policy, independently of Hosting Profiles.

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

Not applicable: this PR proposes a new contract rather than repairing a reproduced defect in the RFC repository.

Is this the best way to solve the issue?

Yes, as a design approach: explicit activation, shared projections, bounded observations, and independent profile acceptance avoid competing evaluators; the public API and recovery policy still need product approval.

AGENTS.md: not found in the target repository.

Codex review notes: model internal, reasoning medium; reviewed against 967d9aac7472.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded operational design proposal with useful implementation evidence and no established urgent regression.
  • merge-risk: 🚨 compatibility: RFC acceptance establishes a lasting plugin/configuration contract and a restart-dependent recovery policy, although this Markdown patch changes no running installation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • feature: ✨ showcase: ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. Subject-aware readiness lets operators distinguish failure transitions from runtime replacement while keeping ordinary host probes compact.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Preserved prior package-installed Docker proof exercises the proposed Gateway evaluator through HTTP readiness and CLI failure/recovery, repeated polls, and container lifecycle identity changes. Run and conformance-step success were rechecked; raw logs were proxy-blocked. This RFC changes no stored-data contract.
  • proof: sufficient: Contributor real behavior proof is sufficient. Preserved prior package-installed Docker proof exercises the proposed Gateway evaluator through HTTP readiness and CLI failure/recovery, repeated polls, and container lifecycle identity changes. Run and conformance-step success were rechecked; raw logs were proxy-blocked. This RFC changes no stored-data contract.

Evidence

What I checked:

  • Pinned contribution scope: The introduced delta adds four Markdown documents and changes no executable code. All four added documents were read. The original head's raw parent matches the supplied pinned parent. (rfcs/0018-readiness-conditions-and-providers.md:16, b09eed5edeac)
  • Still absent from the default branch: The default-branch tree contains no readiness RFC or these normative sidecars. GitHub's PR inventory identifies this proposal and Standard Hosting Profiles as separate open proposals; the merged Doctor health RFC addresses diagnostic and repair execution rather than traffic readiness. No same-repository merged fixing PR or release implementing this proposal was established. (967d9aac7472)
  • RFC acceptance policy: README requires a maintainer-discussion thread, explicit acceptance, an implementation issue, and accepted frontmatter before merge. This proposal still correctly declares draft status and an empty implementation issue. GitHub commit metadata associates the RFC-process change with kevinslin. (README.md:80, e366ea9825a4)
  • Explicit compatibility boundary: Absent readiness configuration preserves the legacy checker; an explicit empty readiness object activates the new evaluator. Registration alone does not select a provider, legacy fields remain projections, and removal requires separate compatibility review. (rfcs/0018/readiness-v1-spec.md:55, b09eed5edeac)
  • Prior findings resolved: The current specification uses ReadinessResult for the diagnostic projection and explicitly defines permanent-provider quarantine recovery: reload cannot clear it, settlement or process restart can. It includes a required-provider restart conformance case. The latest completed review covered this same head and retained no findings. Earlier reviewed object inspection failed, so no unsupported historical comparison is claimed. (rfcs/0018/readiness-v1-spec.md:450, b09eed5edeac)
  • Security and persistence boundaries: Providers are observational, output is bounded and redacted, remote unauthenticated diagnostics omit condition details, and subject IDs explicitly confer no security authority. The documents introduce no stored-data migration, executable dependency, workflow permission change, or running authorization path. (rfcs/0018/readiness-subjects-v1-spec.md:96, b09eed5edeac)

Likely related people:

  • kevinslin: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Gio Della-Libera: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (145 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-01T13:02:34.692Z sha 247d952 :: needs real behavior proof before merge. :: [P2] Use the declared canonical result type | [P2] Link the required maintainer discussion | [P3] Remove the trailing whitespace
  • reviewed 2026-09-01T20:51:05.904Z sha 247d952 :: needs real behavior proof before merge. :: [P1] Define recovery after a provider ignores cancellation | [P2] Use the declared canonical result type | [P2] Link the required maintainer discussion | [P3] Remove the trailing whitespace
  • reviewed 2026-09-03T06:04:05.301Z sha 247d952 :: needs real behavior proof before merge. :: [P1] Permit recovery after a provider ignores cancellation | [P2] Name the declared canonical result type | [P2] Create and link the required maintainer discussion | [P3] Remove trailing whitespace
  • reviewed 2026-09-03T12:40:05.262Z sha 247d952 :: needs real behavior proof before merge. :: [P1] Permit recovery from permanently pending providers | [P2] Use the declared canonical result type | [P2] Link the required maintainer discussion
  • reviewed 2026-09-03T19:38:07.641Z sha 247d952 :: needs real behavior proof before merge. :: [P1] Permit recovery from permanently pending providers | [P2] Use the declared canonical result type | [P2] Link the required maintainer discussion
  • reviewed 2026-09-04T14:53:50.613Z sha 247d952 :: needs real behavior proof before merge. :: [P1] Permit recovery from permanently pending providers | [P2] Use the declared canonical result type | [P2] Link the required maintainer discussion | [P3] Remove the trailing whitespace
  • reviewed 2026-09-05T18:59:20.489Z sha 247d952 :: blocked before merge. :: [P2] Specify recovery from permanent provider quarantine | [P3] Use the declared readiness result name
  • reviewed 2026-09-09T05:20:17.589Z sha b09eed5 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 10, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. and removed merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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. feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. labels Jul 10, 2026
giodl73-repo and others added 25 commits September 8, 2026 22:14
Co-authored-by: Copilot <[email protected]>

Copilot-Session: ab870252-d6a4-454c-8254-b94b3efe2182
Co-authored-by: Copilot <[email protected]>

Copilot-Session: ab870252-d6a4-454c-8254-b94b3efe2182
Co-authored-by: Copilot <[email protected]>

Copilot-Session: ab870252-d6a4-454c-8254-b94b3efe2182
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Refreshed onto current main at b09eed5 and resolved the two current specification findings. Permanent provider quarantine now has one bounded recovery boundary: it persists across config/plugin reload and clears only when the callback settles or the Gateway process restarts after operator repair, with an explicit conformance case. The health projection now refers to the declared ReadinessResult type. git diff --check passes. @clawsweeper re-review

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Closing this RFC as paused at the author's request while reducing the active proposal queue. This is a prioritization decision, not a statement that the design was rejected, accepted, shipped, or superseded. The branch, commits, and discussion history are retained. Reopen when the author and relevant maintainers choose to resume a concrete scope and refresh the proposal against current implementation and ownership boundaries. This closure does not merge, close, or change any implementation PR, fork, or deployed behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: ✨ showcase ClawSweeper spotlight: unusually compelling feature idea for maintainer attention. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant