Repository navigation
docs(agents): remove stale, duplicate and conflicting scoped guide rules - #176320
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR consolidates agent instructions, relocates test ownership notes, corrects stale references, and expands the existing test-helper import checker. Example: An agent edits fake-timer tests under test/.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This maintainer-authored PR provides useful scoped-guide cleanup, resolves the prior fake-timer finding, and introduces no identified actionable defect; current-head CI remains pending. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherRoot and scoped guides direct repository agents to subsystem contracts; the existing import checker scans shared test helpers and reports unsupported bundled-plugin imports. flowchart TD
A[Repository task] --> B[Root instructions]
B --> C[Scoped guides]
C --> D[Owning documentation]
C --> E[Test ownership comments]
F[Shared test helpers] --> G[Existing import checker]
G --> H[Boundary diagnostics]
Technical reviewBest possible solution: Land the consolidated guides and existing-checker extension after the normal current-head CI gates pass. Do we have a high-confidence way to reproduce the issue? Source confirms stale references and the earlier classifier mismatch; no executable reproduction was run under the read-only review constraints. Is this the best way to solve the issue? The change uses existing documentation owners and checker machinery, preserves the important contracts inspected, and adds no unnecessary state or parallel implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5fb1a7515b3c. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +27, Docs -275, Other -2. Total -250 across 57 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 18, 2026, 2:59 PM ET / 18:59 UTC (Revision 2). |
…egram test rules at test-audit
…-cleanup # Conflicts: # src/gateway/AGENTS.md
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Landed in 050ea4d. Scoped AGENTS.md guides drop from 98,031 to 73,215 characters: stale names and commands fixed, conflicts resolved toward root, per-test notes moved into their test files, and one boundary check now scans the channel contract test helpers. Proof: link check, boundary test, the 20 commented test files pass, green CI and the exact-head review. |
…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]>
Related: #176053, #176308
What Problem This Solves
Fixes: agents working in a subsystem load scoped
AGENTS.mdguides that name removed code and commands, repeat root rules, and in places contradict current root rules (restart the Gateway for proof, runcheck-changed.mjslocally, avoidimportOriginalmocks 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.mdtotal: 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/mainand 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):
createTelegramTransportIngressDrain(removed in refactor(channels): share durable ingress monitor #111214) → the monitor intelegram-ingress-drain-factory.ts; throttle owner →getOrCreateAccountThrottler(fix(telegram): deliver final replies through Telegram flood waits #157349).src/channels: memory profile command →pnpm test:extensions:memory.extensions: removed thesrc/plugin-sdk/<id>.tsfacade allowance (the SDK guide forbids new ones) and the deletedsrc/plugin-sdk-internal/**path.apps/macos:AppLaunchPresentationPolicy→AppLaunchRuntimePlan.sessionFile→sessionTarget.src/gateway/server-methods: the raw JSONL transcript warning (transcripts are SQLite); its liveappendMessageAsyncrule moved tosrc/agents. The staleserver-methods/CLAUDE.mdentries in.gitattributesand.oxfmtrc.jsoncare removed.docs: the "up to 30 pages" preview claim does not exist inscripts/docs-dev.mjs.Conflicts with root (resolved toward root):
scriptsandapps/macos: localcheck-changed.mjssuggestions removed (root: PR CI is the broad proof).src/agents: "avoidimportOriginalpartial mocks" → pass the real module or annotate// mock-isolation:(check:test-mock-exports).Duplicates and owner moves:
scripts/AGENTS.md"Proof Rules" repeated root, the testing skill andremote-gates.md.apps/iosandapps/androidrepeated each app'sVERSIONING.md; guardrails stay.src/channels/AGENTS.md, since five channels share that monitor.src/agents/tools/AGENTS.mdandsrc/gateway/server-methods/AGENTS.mddeleted after moving their one live rule each intosrc/agents/AGENTS.md.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-auditskill; the Telegram-specific crash-window/restart-replay rule stays.openclaw-testingskill: the worktree hint no longer suggests localcheck-changed.mjs.One check instead of prose:
scripts/check-test-helper-extension-import-boundary.mtsnow also scanssrc/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_REPLYreply rules, and the SDK SQLite removal date.Evidence
test/test-helper-extension-import-boundary.test.tspasses; the script reports[]on the new root and flagged a temporary violating file during the check.oxfmtandgit diff --checkclean; the pre-commit hook ran on this commit, including theAGENTS.mdsize check.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.