Skip to content

docs(agents): stop requiring speculative race and in-flight revocation work - #197557

Merged
obviyus merged 2 commits into
mainfrom
docs/instructions-cut-speculative-complexity
Nov 12, 2026
Merged

obviyus merged 2 commits into
mainfrom
docs/instructions-cut-speculative-complexity

Conversation

@obviyus

@obviyus obviyus commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Agents and the review bot keep asking for code and proof for races nobody has hit, such as "show that revoking a key stops a request that is already in flight". The cause is our own instructions.

User Impact

There is no product behavior change. Contributors and agents stop writing in-flight revocation checks and race tests unless a real incident calls for them. This is how the repo already treats closed sessions ("work already handed to a transport may finish during close") and Telegram limiters ("in-flight requests finish").

Why This Change Was Made

An audit of every instruction layer found the chain behind the in-flight revocation demand on #197501, #197469, #197474 and #197507:

  • Root AGENTS.md said "revalidate after awaited work and right before effect". Its own anti-race rule carried an "unless user data, security, or money at risk" exception that covers almost every change.
  • Three scoped AGENTS.md files repeated the rule as "including closure during awaited policy work" and "revalidate service generation at effect boundary".
  • The Decision SDK docs turned it into "check isAdmissible() immediately before physical I/O, including after DNS".

Changes:

  • Choose good compromises:
    • Adopts two OpenCode principles verbatim:
      • "Before adding complexity for a speculative or vanishingly unlikely race or security edge case, explain the concrete failure mode, likelihood, and complexity cost to the user and get their buy-in."
      • "Do not extract single-use helpers preemptively."
    • Authority is checked one time, when work starts. Revocation, removal and reload apply to the next request; a started request may finish. Queued, retried and replayed work checks again when it starts.
    • Removes the security/data/money exception.
  • Security boundaries: points to that rule instead of "revalidate after awaited work".
  • Scoped guides and Decision SDK docs: now say "the next call fails; a call already started may finish".
  • pr-simplify: now applies "Choose good compromises". It no longer lists stale-authority tests as worth keeping.
  • New "Instruction rules" section in the technical-documentation skill (regrowth guard):
    • A new rule cites an incident and passes the deletion test.
    • A rule has no "unless security" exception.
    • A rule added in one layer removes its copies in the other layers.
    • The root file links to it.
  • Trims:
    • Root AGENTS.md: removes lines a strong model follows without being told (comment style, delegation, review-gate restatement), plus a duplicate helper rule.
    • End-to-end proof is now scoped to user-visible changes.
    • Root AGENTS.md goes from 19,728 to 19,607 characters.

Kept: rules backed by real incidents, such as credential storage, durable-before-ack, release upload, upgrade/migration, cache identity, and the logging redaction boundary.

Follow-ups in separate PRs:

Evidence

…n work

Check authority once when work starts; revocation applies to the next
request. Adopt OpenCode's buy-in rule for speculative race/security
complexity and its single-use helper rule, remove the security/data/money
exception, align scoped guides and the Decision SDK contract, and add an
instruction-rules regrowth guard.

Co-authored-by: obviyus <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: S labels Nov 12, 2026
obviyus added a commit that referenced this pull request Nov 12, 2026
Revocation applies to the next request (#197557); a race test for a request
already in flight is speculative machinery the updated rules reject.

This reverts commit 1f7ea1e.

Co-authored-by: obviyus <[email protected]>
@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces blanket in-flight authority rechecks with request-start checks and limits speculative race work in contributor guidance.

Example: A Decision provider request passes admission, then its credential is revoked while the request runs.

  • Before: The guidance requires further authority checks after awaited preparation.
  • After: The guidance allows the started request to finish and requires fresh checks for subsequent, queued, or retried requests.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused documentation change with the prior finding resolved and no remaining actionable defect; exact-head docs CI remains pending.
Proof confidence 🌊 off-meta tidepool Not applicable: This documentation-only PR changes contributor policy; the separate review-pipeline replay is supporting context rather than proof of an OpenClaw runtime change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Docs · Worth it: Yes · Fix scope: Complete
User problem: Contributors receive blanket demands for speculative race machinery and in-flight revocation proof from repository guidance.
Reason: The collaborator-authored PR records the direction and tradeoff, aligns the relevant guidance, and preserves checks when subsequent work starts.

Merge readiness

✅ Ready for maintainer review

The latest commit resolves the earlier V1 admission finding. This maintainer-authored documentation change is coherent, and no actionable defects remain; exact-head CI is still pending.

Priority: P3
Reviewed head: 4cf6b0aba18d7e989afb5aa0a0ab1d975840e3d8

Before merge

None.

Findings

None.

Agent review details

How this fits together

Repository instructions guide contributors and agents, while the Decision SDK documentation translates those policies into provider admission and cleanup requirements.

flowchart LR
  A[Maintainer policy] --> B[Root agent guidance]
  B --> C[Scoped agent guides]
  B --> D[Simplification skill]
  B --> E[Decision SDK documentation]
  C --> F[Contributor implementation]
  D --> F
  E --> F
Loading

Technical review

Best possible solution:

Keep the aligned request-start policy in the existing guidance owners and complete the ordinary exact-head CI gates.

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

The earlier conflicting V1 instructions are visible in the base blobs and reconciled in the head; no target code was executed.

Is this the best way to solve the issue?

Editing the existing policy owners is a focused solution, and the intentional policy change is explained without introducing parallel implementation machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 87c10f5d4a58.

Provenance checked

  • Root compromise policy changes intended behavior with a stated reason (9d38eba: Reduce excessive concurrency machinery after a cron writer stall disrupted an update.)
  • Closure-bound capability guidance changes intended behavior with a stated reason (73a9eed: Bind delegated operations to canonical admitted-run authority and reject retained capabilities after closure, including across awaited policy work.)
  • Deferred plugin work changes intended behavior with a stated reason (40c9c11: Clarify campaign authority boundaries for work that outlives its originating caller.)
  • Decision prepared execution changes intended behavior with a stated reason (3dd7f57: Reuse prepared model credentials and prevent revoked authority from dispatching additional physical requests or affecting provider health.)
  • Decision provider ownership documentation changes intended behavior with a stated reason (4d76d1d: Document host admission and settlement responsibilities separately from plugin-owned codecs and execution.)
  • Simplification skill changes intended behavior with a stated reason (f19a736: Reduce unnecessary architecture and keep tests for distinct observable failures.)
  • End-to-end proof guidance changes intended behavior with a stated reason (9b22951: Require end-to-end proof and resolution of substantive review findings.)
  • Root instruction size keeps the original intent (b2e85fa: Keep root instructions within the bootstrap limit and move detailed rules to their owning guides.)

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 4d76d1d adds docs/plugins/sdk-overview/capabilities.md:291 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4d76d1d82f70; files: docs/plugins/sdk-overview/capabilities.md)

PR surface

Docs +13. Total +13 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 8 41 28 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 41 28 +13

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

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.
  • remove rating: 🦐 gold shrimp: 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 contributor guidance and SDK documentation maintenance with no immediate runtime change.
  • 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.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-12T05:48:12.173Z sha 2573353 :: needs changes before merge. :: [P2] Align the linked V1 admission contract with the request-start policy

Reviewed November 12, 2026, 1:24 AM ET / 06:24 UTC (Revision 2).

@obviyus

obviyus commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Nov 12, 2026
@obviyus
obviyus merged commit 123f878 into main Nov 12, 2026
105 checks passed
@obviyus
obviyus deleted the docs/instructions-cut-speculative-complexity branch November 12, 2026 06:45
obviyus added a commit that referenced this pull request Nov 12, 2026
* feat(google): support Gemini Decision models

Register a V2 Decision provider in the bundled google plugin for the
Gemini Decisions API (POST /v1beta/decisions) and declare the typed-only
gemini-decision-1 model. Boolean questions map to native noul with
true/false descriptions; choice/score keep labels and rubric indices.
Text, JSON and inline PNG/JPEG/WebP evidence are supported.

Co-authored-by: obviyus <[email protected]>

* feat(google): price Gemini Decision input tokens

Co-authored-by: obviyus <[email protected]>

* test(google): add Gemini Decision live coverage

Co-authored-by: obviyus <[email protected]>

* fix(models): keep typed-only rows after live chat discovery

Successful live discovery replaced every captured row for its provider,
including typed-only manifest rows that discovery never lists. The
Decision model then reached models.list through the configured-ref path
as a synthetic chat row. Retain inference.chat=false rows across
acquisition so they stay in the decision catalog only.

Co-authored-by: obviyus <[email protected]>

* feat(google): default Gemini Decision instructions and add registered live flow

Gemini requires non-empty instructions while OpenClaw makes them optional
for choice/score rubrics. Ask the rubric itself when they are omitted.

Co-authored-by: obviyus <[email protected]>

* test(google): fold Gemini Decision live coverage into the registered flow

Co-authored-by: obviyus <[email protected]>

* refactor(google): simplify Gemini Decision provider

Inline the single-use transport closure, gate on the declared decision
protocol instead of a parallel ID set, fold the Gemini live test into the
existing registered Decision live test, drop tests that only re-prove
shared validation, and tighten the docs.

Co-authored-by: obviyus <[email protected]>

* test(google): prove revoked authority stops Gemini Decision dispatch

Co-authored-by: obviyus <[email protected]>

* test(google): drop in-flight revocation race test

Revocation applies to the next request (#197557); a race test for a request
already in flight is speculative machinery the updated rules reject.

This reverts commit 1f7ea1e.

Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: obviyus <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 13, 2026
…n work (openclaw#197557)

* docs(agents): stop requiring speculative race and in-flight revocation work

Check authority once when work starts; revocation applies to the next
request. Adopt OpenCode's buy-in rule for speculative race/security
complexity and its single-use helper rule, remove the security/data/money
exception, align scoped guides and the Decision SDK contract, and add an
instruction-rules regrowth guard.

Co-authored-by: obviyus <[email protected]>

* docs(plugins): align the V1 Decision admission contract with request-start checks

Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: obviyus <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 13, 2026
* feat(google): support Gemini Decision models

Register a V2 Decision provider in the bundled google plugin for the
Gemini Decisions API (POST /v1beta/decisions) and declare the typed-only
gemini-decision-1 model. Boolean questions map to native noul with
true/false descriptions; choice/score keep labels and rubric indices.
Text, JSON and inline PNG/JPEG/WebP evidence are supported.

Co-authored-by: obviyus <[email protected]>

* feat(google): price Gemini Decision input tokens

Co-authored-by: obviyus <[email protected]>

* test(google): add Gemini Decision live coverage

Co-authored-by: obviyus <[email protected]>

* fix(models): keep typed-only rows after live chat discovery

Successful live discovery replaced every captured row for its provider,
including typed-only manifest rows that discovery never lists. The
Decision model then reached models.list through the configured-ref path
as a synthetic chat row. Retain inference.chat=false rows across
acquisition so they stay in the decision catalog only.

Co-authored-by: obviyus <[email protected]>

* feat(google): default Gemini Decision instructions and add registered live flow

Gemini requires non-empty instructions while OpenClaw makes them optional
for choice/score rubrics. Ask the rubric itself when they are omitted.

Co-authored-by: obviyus <[email protected]>

* test(google): fold Gemini Decision live coverage into the registered flow

Co-authored-by: obviyus <[email protected]>

* refactor(google): simplify Gemini Decision provider

Inline the single-use transport closure, gate on the declared decision
protocol instead of a parallel ID set, fold the Gemini live test into the
existing registered Decision live test, drop tests that only re-prove
shared validation, and tighten the docs.

Co-authored-by: obviyus <[email protected]>

* test(google): prove revoked authority stops Gemini Decision dispatch

Co-authored-by: obviyus <[email protected]>

* test(google): drop in-flight revocation race test

Revocation applies to the next request (openclaw#197557); a race test for a request
already in flight is speculative machinery the updated rules reject.

This reverts commit 1f7ea1e.

Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: obviyus <[email protected]>
amittell added a commit to amittell/openclaw that referenced this pull request Nov 16, 2026
…arts

Root AGENTS.md checks authority one time, when work starts, and lets a
started request finish (openclaw#197557). Automatic recall now checks that the
memory audience is current right before it embeds the prompt, and no
longer checks again after the search returns.

The stale-audience test now covers that start check: with an audience
that is already stale, automatic recall neither embeds the prompt nor
searches the store.
steipete added a commit that referenced this pull request Nov 18, 2026
Keep role changes scoped to the next request as established by #197557 and #201334. Prove admitted guest writes and checkpoint settlement, next-request refusal, and explicit source cancellation across late committed receipts. Credit @obviyus for the admission contract; production behavior is unchanged.
steipete added a commit that referenced this pull request Nov 18, 2026
Apply the request-start authority contract from #197557 and @obviyus’s #201334. Remove the obsolete per-effect source check while preserving next-consult denial and explicit Stop. Follow #201473 for the stale in-process session-read expectation.
steipete added a commit that referenced this pull request Nov 19, 2026
Apply the request-start authority contract from #197557 and @obviyus’s #201334. Remove the obsolete per-effect source check while preserving next-consult denial and explicit Stop. Follow #201473 for the stale in-process session-read expectation.
steipete added a commit that referenced this pull request Nov 19, 2026
The Goal product test waited for role revocation to cancel an admitted
provider request, which #201377 correctly keeps alive under #197557.
Release that response, prove it persists while the next Goal turn is
refused, and separately verify Stop closes the provider and pauses the
Goal with its interruption note. Preserve disclosure and scope checks.

Production behavior is unchanged. Thanks @obviyus for #201377.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…aw#201473)

Keep role changes scoped to the next request as established by openclaw#197557 and openclaw#201334. Prove admitted guest writes and checkpoint settlement, next-request refusal, and explicit source cancellation across late committed receipts. Credit @obviyus for the admission contract; production behavior is unchanged.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…aw#201527)

Apply the request-start authority contract from openclaw#197557 and @obviyus’s openclaw#201334. Remove the obsolete per-effect source check while preserving next-consult denial and explicit Stop. Follow openclaw#201473 for the stale in-process session-read expectation.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…1567)

The Goal product test waited for role revocation to cancel an admitted
provider request, which openclaw#201377 correctly keeps alive under openclaw#197557.
Release that response, prove it persists while the next Goal turn is
refused, and separately verify Stop closes the provider and pauses the
Goal with its interruption note. Preserve disclosure and scope checks.

Production behavior is unchanged. Thanks @obviyus for openclaw#201377.

Co-authored-by: Ayaan Zaidi <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 19, 2026
Apply the request-start authority contract from #197557 and @obviyus’s #201334. Remove the obsolete per-effect source check while preserving next-consult denial and explicit Stop. Follow #201473 for the stale in-process session-read expectation.

(cherry picked from commit ac17452)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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