Skip to content

docs(agents): require end-to-end proof and resolved ClawSweeper findings - #176308

Merged
obviyus merged 2 commits into
mainfrom
docs/agents-md-e2e-proof
Oct 18, 2026
Merged

obviyus merged 2 commits into
mainfrom
docs/agents-md-e2e-proof

Conversation

@obviyus

@obviyus obviyus commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #176053

What Problem This Solves

Fixes: agents working in this repository shipped fixes whose proof stopped short of the real product, after #176053 removed the root lines that asked for end-to-end reproduction and boundary proof.

User Impact

No user-visible change. Agents get one short, direct rule set for proof and review: reproduce end to end, prove the fix end to end through the real product and the channel's e2e skill, commit the proof tests, and resolve real ClawSweeper findings while its review stays advisory.

Why This Change Was Made

A blind replay of 16 held-out historical tasks (16 tasks × 2 instruction versions × 2 seeds, two independent model judges) compared root AGENTS.md before and after #176053. Overall results tied, but proof quality was lower with the trimmed file in 25 of 33 judge verdicts that differed (sign test p = 0.005; per pair 16 of 22, p = 0.052). Judges noted runs that left proof tests out of the diff and left consumer tests stale and unrun. #176053 had removed "reproduce defects through actual entry point before editing" and "Behavior-only fix: direct boundary proof".

Section Change
Execution discipline "Real failing entry point first" now says to reproduce end to end before editing. Added: ask whether the proof could pass while the task stays broken; a failed setup is not a product verdict.
Product and validation Added Prove it end to end: rerun the reproduction on the fix through an isolated Gateway with a real agent and model, the channel e2e skill or Control UI e2e, and an upgrade from the latest stable when update, Doctor, config or state changes. Mocks and helper tests support this proof and never replace it.
Product and validation Fixes prove the invariant now says to commit the tests with the fix and to update and run the tests of every consumer of what changed.
Product and validation The ClawSweeper line becomes Make ClawSweeper happy: its review is advisory (as #169739 decided); fix every real finding in one batch, request re-review once, and reject findings that add restrictions without a concrete harm. A maintainer's explicit land instruction does not wait for a pending or stale review.

Evidence

Before (origin/main) After
Characters 18,083 19,091
  • pnpm check:agents-md-size: 33 files within 20,000 characters. The new pre-commit hook ran on this commit.
  • All four linked skill files exist under .agents/skills/.
  • git diff --check and oxfmt --check are clean.

Merge danger: two-way door. Docs only; a revert restores the previous text. Blast radius: agent instructions for work in this repository.

@clawsweeper

clawsweeper Bot commented Oct 18, 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.

@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 Oct 18, 2026
@clawsweeper

clawsweeper Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR strengthens repository instructions for end-to-end reproduction, committed regression tests, consumer validation, and resolving substantive ClawSweeper findings.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused documentation change with appropriate static validation, successful exact-head gates, and the previous finding resolved.
Proof confidence 🐚 platinum hermit (4/6) Documentation-only instructions were checked against the owning guides, linked skill paths, bootstrap limit, and successful exact-head documentation checks.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Docs · Worth it: Yes · Fix scope: Complete
User problem: Repository agents can stop validation before the real product boundary or omit committed regression and affected-consumer tests.
Reason: The collaborator-authored direction makes validation expectations explicit with a focused change and resolves the earlier conflict with the owning landing workflow.

Merge readiness

✅ Ready for maintainer review

The previous blocker is resolved, no actionable findings remain, and the exact-head documentation and CI gates pass.

Priority: P3
Reviewed head: 437cab108d4141d4b7f845735aa1ef543b112ac3

Before merge

None.

Findings

None.

Agent review details

How this fits together

Root AGENTS.md supplies repository-wide instructions to coding agents, directing their reproduction, validation, and review work toward the existing specialized guides.

flowchart TD
  A[Root agent instructions] --> B[Reproduce reported behavior]
  B --> C[Repair existing owner]
  C --> D[Commit regression tests]
  D --> E[Verify real product behavior]
  E --> F[Resolve substantive review findings]
Loading

Technical review

Best possible solution:

Retain the focused proof instructions and explicit advisory-review wording within the root guide’s bootstrap limit.

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

This is an instruction-policy change; source inspection verifies the wording difference, while the historical replay results are reported in the PR rather than independently reproduced.

Is this the best way to solve the issue?

The small root-guide change makes reproduction and committed regression expectations explicit, uses existing proof owners, and preserves the recorded advisory-review policy.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Entry-point reproduction keeps the original intent (c43b799: Compact execution discipline required a real failing entry point and direct boundary proof.)
  • Root proof instructions and regression tests changes intended behavior with a stated reason (docs(agents): fit root AGENTS.md under the 20K bootstrap cap again #176053: Compaction restored whole-file bootstrap loading and retained concise invariant-test requirements; this PR explains why stronger explicit wording is needed and remains below the cap.)
  • ClawSweeper review guidance keeps the original intent (ac9569a: Automatic review happens once, so later substantive updates require an explicit re-review request; the separate merged landing decision keeps that feedback advisory.)

Security

None.

Evidence

What I checked:

  • Introduced change and resolved prior finding: The pinned introduction changes only root instructions; the second commit removes the exact-head ready requirement and explicitly preserves advisory review, resolving the previous finding. (AGENTS.md:85, 437cab108d41)
  • Existing advisory-review decision: The merged decision in fix(pr): land without waiting for advisory ClawSweeper reviews #169739 permits otherwise eligible landing without waiting for ClawSweeper; the current wording respects that decision and the owning maintainer guide. (.agents/skills/openclaw-pr-maintainer/SKILL.md:61, c2d151320312)
  • Bootstrap limit and documentation integrity: AGENTS.md contains 19,091 characters against its 20,000-character cap, all four newly linked skills exist, and the pinned diff passes whitespace validation. (AGENTS.md:3, 437cab108d41)
  • Exact-head checks: Fresh REST results show check-docs and openclaw/ci-gate successful on the reviewed head; combined commit status is successful and GitHub reports a clean mergeable state. The cancelled label job is not a failed product or documentation check. (437cab108d41)
  • Feature history and current main: The original execution-discipline commit establishes the entry-point and direct-boundary-proof intent; docs(agents): fit root AGENTS.md under the 20K bootstrap cap again #176053 explains the later compaction. Fetched main retains the pre-PR instructions. An extended history search encountered unavailable old objects, but the determining original commit and relevant merged PR explanations were readable. (AGENTS.md:37, c43b7990e672)

Likely related people:

  • Ayaan Zaidi: Raw commit b2e85fa adds AGENTS.md:80 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b2e85fadecb2; files: AGENTS.md)
  • Peter Steinberger: Raw commit c43b799 adds AGENTS.md:35 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c43b7990e672; files: AGENTS.md)

PR surface

Docs +2. Total +2 across 1 file. Added test files: 0.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • 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 repository workflow documentation with no runtime, configuration, or persisted-data change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • 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-10-18T17:52:21.551Z sha d459897 :: needs changes before merge. :: [P2] Update the owning landing workflow to require the same ready result

Reviewed October 18, 2026, 1:58 PM ET / 17:58 UTC (Revision 2).

@obviyus obviyus changed the title docs(agents): require end-to-end proof and a ready ClawSweeper review docs(agents): require end-to-end proof and resolved ClawSweeper findings Oct 18, 2026
@obviyus

obviyus commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 18, 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 Oct 18, 2026
@obviyus
obviyus merged commit 9b22951 into main Oct 18, 2026
84 of 85 checks passed
@obviyus
obviyus deleted the docs/agents-md-e2e-proof branch October 18, 2026 18:01
@obviyus

obviyus commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator Author

Landed. Root AGENTS.md now asks for end-to-end reproduction and proof through the real product and the channel e2e skills, commits proof tests with consumer tests, and keeps the ClawSweeper review advisory while asking agents to fix its real findings. Proof: blind replay signal in the body, size check, green CI and the exact-head review.

obviyus added a commit that referenced this pull request Oct 18, 2026
…les (#176320)

Related: #176053, #176308

## What Problem This Solves

Fixes: agents working in a subsystem load scoped `AGENTS.md` guides that name removed code and commands, repeat root rules, and in places contradict current root rules (restart the Gateway for proof, run `check-changed.mjs` locally, avoid `importOriginal` mocks that a check now requires).

## User Impact

No user-visible change. Agents get shorter scoped guides with current names and commands and one owner per rule. Scoped `AGENTS.md` total: 98,031 → 73,215 characters (−25%). Six guides with no remaining unique rule are deleted.

## Why This Change Was Made

Every line of the 28 scoped guides was checked against `origin/main` and its history. Edits only remove or rewrite lines that are stale, duplicated, behavior-free, or in conflict with root; conflicts resolve toward current root. Lines that encode a recent maintainer decision are unchanged.

**Stale (fixed):**
- Telegram: `createTelegramTransportIngressDrain` (removed in #111214) → the monitor in `telegram-ingress-drain-factory.ts`; throttle owner → `getOrCreateAccountThrottler` (#157349).
- `src/channels`: memory profile command → `pnpm test:extensions:memory`.
- `extensions`: removed the `src/plugin-sdk/<id>.ts` facade allowance (the SDK guide forbids new ones) and the deleted `src/plugin-sdk-internal/**` path.
- `apps/macos`: `AppLaunchPresentationPolicy` → `AppLaunchRuntimePlan`.
- Embedded runner: `sessionFile` → `sessionTarget`.
- `src/gateway/server-methods`: the raw JSONL transcript warning (transcripts are SQLite); its live `appendMessageAsync` rule moved to `src/agents`. The stale `server-methods/CLAUDE.md` entries in `.gitattributes` and `.oxfmtrc.jsonc` are removed.
- `docs`: the "up to 30 pages" preview claim does not exist in `scripts/docs-dev.mjs`.

**Conflicts with root (resolved toward root):**
- acpx "restart the gateway" → validate in an isolated Gateway.
- Telegram "bot-to-bot QA lane" proof → the userbot e2e skill route in root.
- `scripts` and `apps/macos`: local `check-changed.mjs` suggestions removed (root: PR CI is the broad proof).
- `src/agents`: "avoid `importOriginal` partial mocks" → pass the real module or annotate `// mock-isolation:` (`check:test-mock-exports`).
- Embedded runner "prefer focused helper tests" → aligned with root end-to-end proof.

**Duplicates and owner moves:**
- `scripts/AGENTS.md` "Proof Rules" repeated root, the testing skill and `remote-gates.md`.
- Release mechanics in `apps/ios` and `apps/android` repeated each app's `VERSIONING.md`; guardrails stay.
- Rules that stylelint, lint scripts or tests already enforce now name the check instead of restating it.
- Core ingress-drain rules moved word for word from the Telegram guide to `src/channels/AGENTS.md`, since five channels share that monitor.
- `src/agents/tools/AGENTS.md` and `src/gateway/server-methods/AGENTS.md` deleted after moving their one live rule each into `src/agents/AGENTS.md`.
- SDK compatibility: one bullet keeps both meanings (internal callers removed freely; third-party exports need a deprecation window and maintainer approval).

**Test notes moved to their tests:** the per-test ownership notes in the litellm, lmstudio, ollama and vllm guides now sit as comments in the 20 test files they describe (several live outside the plugin folders, where those guides never loaded); the four guides are deleted. One vLLM note described a test deleted in #165813 and is dropped.

**Telegram test rules → test-audit:** the copied test-ownership rules point at the `test-audit` skill; the Telegram-specific crash-window/restart-replay rule stays.

**`openclaw-testing` skill:** the worktree hint no longer suggests local `check-changed.mjs`.

**One check instead of prose:** `scripts/check-test-helper-extension-import-boundary.mts` now also scans `src/channels/plugins/contracts/test-helpers` (zero violations today), so that guide no longer restates the boundary.

**Unchanged on purpose (recent maintainer decisions):** the Gateway session row projection contract, the UI session roster contract, the `NO_REPLY` reply rules, and the SDK SQLite removal date.

## Evidence

- Every relative link in the changed guides resolves; no file links to the deleted guides.
- `test/test-helper-extension-import-boundary.test.ts` passes; the script reports `[]` on the new root and flagged a temporary violating file during the check.
- `oxfmt` and `git diff --check` clean; the pre-commit hook ran on this commit, including the `AGENTS.md` size check.
- The 20 test files that received comments pass (318 tests, plus the shared SGLang discovery contract); comments only, no test logic changed.
- Diff: 57 files, +191/−441.

**Merge danger:** two-way door; a revert restores every guide. No runtime change. Blast radius: agent instructions for work in these directories, and one repository check that now scans one more test-helper directory.

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

Related: openclaw#176053

## What Problem This Solves

Fixes: agents working in this repository shipped fixes whose proof stopped short of the real product, after openclaw#176053 removed the root lines that asked for end-to-end reproduction and boundary proof.

## User Impact

No user-visible change. Agents get one short, direct rule set for proof and review: reproduce end to end, prove the fix end to end through the real product and the channel's e2e skill, commit the proof tests, and resolve real ClawSweeper findings while its review stays advisory.

## Why This Change Was Made

A blind replay of 16 held-out historical tasks (16 tasks × 2 instruction versions × 2 seeds, two independent model judges) compared root `AGENTS.md` before and after openclaw#176053. Overall results tied, but proof quality was lower with the trimmed file in 25 of 33 judge verdicts that differed (sign test p = 0.005; per pair 16 of 22, p = 0.052). Judges noted runs that left proof tests out of the diff and left consumer tests stale and unrun. openclaw#176053 had removed "reproduce defects through actual entry point before editing" and "Behavior-only fix: direct boundary proof".

| Section | Change |
|---|---|
| Execution discipline | "Real failing entry point first" now says to reproduce end to end before editing. Added: ask whether the proof could pass while the task stays broken; a failed setup is not a product verdict. |
| Product and validation | Added **Prove it end to end**: rerun the reproduction on the fix through an isolated Gateway with a real agent and model, the channel e2e skill or Control UI e2e, and an upgrade from the latest stable when update, Doctor, config or state changes. Mocks and helper tests support this proof and never replace it. |
| Product and validation | **Fixes prove the invariant** now says to commit the tests with the fix and to update and run the tests of every consumer of what changed. |
| Product and validation | The ClawSweeper line becomes **Make ClawSweeper happy**: its review is advisory (as openclaw#169739 decided); fix every real finding in one batch, request re-review once, and reject findings that add restrictions without a concrete harm. A maintainer's explicit land instruction does not wait for a pending or stale review. |

## Evidence

| | Before (`origin/main`) | After |
|---|---|---|
| Characters | 18,083 | 19,091 |

- `pnpm check:agents-md-size`: 33 files within 20,000 characters. The new pre-commit hook ran on this commit.
- All four linked skill files exist under `.agents/skills/`.
- `git diff --check` and `oxfmt --check` are clean.

**Merge danger:** two-way door. Docs only; a revert restores the previous text. Blast radius: agent instructions for work in this repository.

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

Related: openclaw#176053, openclaw#176308

## What Problem This Solves

Fixes: agents working in a subsystem load scoped `AGENTS.md` guides that name removed code and commands, repeat root rules, and in places contradict current root rules (restart the Gateway for proof, run `check-changed.mjs` locally, avoid `importOriginal` mocks that a check now requires).

## User Impact

No user-visible change. Agents get shorter scoped guides with current names and commands and one owner per rule. Scoped `AGENTS.md` total: 98,031 → 73,215 characters (−25%). Six guides with no remaining unique rule are deleted.

## Why This Change Was Made

Every line of the 28 scoped guides was checked against `origin/main` and its history. Edits only remove or rewrite lines that are stale, duplicated, behavior-free, or in conflict with root; conflicts resolve toward current root. Lines that encode a recent maintainer decision are unchanged.

**Stale (fixed):**
- Telegram: `createTelegramTransportIngressDrain` (removed in openclaw#111214) → the monitor in `telegram-ingress-drain-factory.ts`; throttle owner → `getOrCreateAccountThrottler` (openclaw#157349).
- `src/channels`: memory profile command → `pnpm test:extensions:memory`.
- `extensions`: removed the `src/plugin-sdk/<id>.ts` facade allowance (the SDK guide forbids new ones) and the deleted `src/plugin-sdk-internal/**` path.
- `apps/macos`: `AppLaunchPresentationPolicy` → `AppLaunchRuntimePlan`.
- Embedded runner: `sessionFile` → `sessionTarget`.
- `src/gateway/server-methods`: the raw JSONL transcript warning (transcripts are SQLite); its live `appendMessageAsync` rule moved to `src/agents`. The stale `server-methods/CLAUDE.md` entries in `.gitattributes` and `.oxfmtrc.jsonc` are removed.
- `docs`: the "up to 30 pages" preview claim does not exist in `scripts/docs-dev.mjs`.

**Conflicts with root (resolved toward root):**
- acpx "restart the gateway" → validate in an isolated Gateway.
- Telegram "bot-to-bot QA lane" proof → the userbot e2e skill route in root.
- `scripts` and `apps/macos`: local `check-changed.mjs` suggestions removed (root: PR CI is the broad proof).
- `src/agents`: "avoid `importOriginal` partial mocks" → pass the real module or annotate `// mock-isolation:` (`check:test-mock-exports`).
- Embedded runner "prefer focused helper tests" → aligned with root end-to-end proof.

**Duplicates and owner moves:**
- `scripts/AGENTS.md` "Proof Rules" repeated root, the testing skill and `remote-gates.md`.
- Release mechanics in `apps/ios` and `apps/android` repeated each app's `VERSIONING.md`; guardrails stay.
- Rules that stylelint, lint scripts or tests already enforce now name the check instead of restating it.
- Core ingress-drain rules moved word for word from the Telegram guide to `src/channels/AGENTS.md`, since five channels share that monitor.
- `src/agents/tools/AGENTS.md` and `src/gateway/server-methods/AGENTS.md` deleted after moving their one live rule each into `src/agents/AGENTS.md`.
- SDK compatibility: one bullet keeps both meanings (internal callers removed freely; third-party exports need a deprecation window and maintainer approval).

**Test notes moved to their tests:** the per-test ownership notes in the litellm, lmstudio, ollama and vllm guides now sit as comments in the 20 test files they describe (several live outside the plugin folders, where those guides never loaded); the four guides are deleted. One vLLM note described a test deleted in openclaw#165813 and is dropped.

**Telegram test rules → test-audit:** the copied test-ownership rules point at the `test-audit` skill; the Telegram-specific crash-window/restart-replay rule stays.

**`openclaw-testing` skill:** the worktree hint no longer suggests local `check-changed.mjs`.

**One check instead of prose:** `scripts/check-test-helper-extension-import-boundary.mts` now also scans `src/channels/plugins/contracts/test-helpers` (zero violations today), so that guide no longer restates the boundary.

**Unchanged on purpose (recent maintainer decisions):** the Gateway session row projection contract, the UI session roster contract, the `NO_REPLY` reply rules, and the SDK SQLite removal date.

## Evidence

- Every relative link in the changed guides resolves; no file links to the deleted guides.
- `test/test-helper-extension-import-boundary.test.ts` passes; the script reports `[]` on the new root and flagged a temporary violating file during the check.
- `oxfmt` and `git diff --check` clean; the pre-commit hook ran on this commit, including the `AGENTS.md` size check.
- The 20 test files that received comments pass (318 tests, plus the shared SGLang discovery contract); comments only, no test logic changed.
- Diff: 57 files, +191/−441.

**Merge danger:** two-way door; a revert restores every guide. No runtime change. Blast radius: agent instructions for work in these directories, and one repository check that now scans one more test-helper directory.

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

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant