Skip to content

fix(review): stop escalating evidenced implementation choices - #1780

Merged
steipete merged 1 commit into
mainfrom
review/implementer-owned-decisions
Oct 9, 2026
Merged

steipete merged 1 commit into
mainfrom
review/implementer-owned-decisions

Conversation

@steipete

@steipete steipete commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes PR reviews asking maintainers to accept implementation choices that the PR already records with verifiable evidence, even when no product decision remains.

User Impact

Evidence-backed metadata exceptions, backed-up invalid-data repairs, and implementation mechanics within an authorized repair-and-land request stay with the implementer. Compatibility proof, concrete defects, security concerns, broad exceptions, and unresolved product/public-contract choices still require action.

Why This Change Was Made

The existing policy already distinguishes stored-data compatibility evidence from sign-off but leaves these common implementation cases ambiguous. The prompt now defines their narrow boundaries once and applies them across decision, product-review, next-step, and risk fields, so the same acceptance request cannot reappear under a different heading. Schema descriptions reinforce that boundary without changing the output shape or parser.

This is an owner-requested review-policy correction. It preserves the existing intent to reserve maintainer attention for unresolved choices. A repair-and-land request does not authorize new config options, breaking public API/SDK changes, new schemas/tables, changed retention of valid data, or paid services outside its scope.

OpenClaw Bay Impact

Bay is unaffected: reviewer guidance changes, with no observer fields, routes, controls, or persistent decision-schema changes.

Documentation Impact

Updated the active reviewer contract in docs/pr-review-comments.md to match the prompt and schema descriptions. Its owner remains ClawSweeper review maintainers; the prompt and schema are the source of truth, verified against this branch. Revisit the guidance when implementer ownership or compatibility-proof policy changes. Added one changelog fragment; the release changelog is unchanged.

Evidence

  • Node 26.10.0, pnpm 12.4.1, macOS arm64.
  • pnpm exec node --test test/review-prompt-policy.test.ts test/decision-parser.test.ts test/decision-packets.test.ts: 127 passed, zero failed. The package's pnpm test alias expands the whole suite; the scoped command uses the same Node test runner through pnpm.
  • pnpm run build:all, repository static checks, and lint passed as part of pnpm run check.
  • git diff --check passed.
  • Independent Codex review before commit and on the committed branch against f847e0a87d80a4afb35d2afc2d6a3df9ef8dc73f: both scoped-clean through P2, no accepted/actionable findings. The committed review also included instructions/pr-review-rules.md to check the product-review interaction.
  • Focused prompt assertions were explicitly requested for this policy contract. They guard delivery and boundaries, not model accuracy.

Real Behavior Proof

Claim: the production review prompt delivers the implementer-decision boundary once, preserves recorded evidence, and retains the existing compatibility and product gates.

Surface and environment: production buildReviewPrompt through the exported reviewPromptForTest entrypoint, following the rendering approach in docs/proof/review-source-prompt/README.md; local Node 26.10.0 on macOS arm64, provider local-node, no container image or lease. Head: 08273f998006bedeb0e1d0bd616b2c6527b8e4d8, clean tracked tree.

Fixtures: narrow Doctor metadata snapshot exclusions with exact user-data checks; removal of three orphaned rows after a verified backup while preserving 42 valid rows and existing upgrade evidence; authorized ownership/ordering/transaction choices; and negative-control context containing a blanket snapshot exclusion plus unresolved config, SDK, schema, retention, and paid-service choices. These are synthetic recorded inputs, not assertions that an actual Doctor upgrade ran.

Observed result, copied from the local receipt:

metadata-exception: contextPreserved=true policyCopies=1 proofAndProductGatesPresent=true
invalid-data-repair: contextPreserved=true policyCopies=1 proofAndProductGatesPresent=true
authorized-mechanics: contextPreserved=true policyCopies=1 proofAndProductGatesPresent=true
unresolved-controls: contextPreserved=true policyCopies=1 proofAndProductGatesPresent=true
template SHA-256: 82b516e727bd1c3298fb25aa302903b7e593f47a249d8e17ea3e32a2a3c2081c
schema SHA-256: 7c7d17c8dddab5d9d5963acb115ff166f9ad9da0089ab1ac0b1b2f3633135ca5

Artifacts: local recorded fixture JSON, rendered prompt Markdown, and result.json under .artifacts/implementer-decisions/; the relevant receipt is copied above. Reproduce the delivery checks after pnpm run build:all with the following production entrypoint (the focused test additionally asserts each policy boundary):

pnpm exec node --input-type=module <<'NODE'
import assert from 'node:assert/strict';
import { reviewPromptForTest } from './dist/clawsweeper.js';
const bodies = [
  'The upgrade snapshot excludes only Doctor-owned run counters and config provenance. Each field is source-verified against its writer. User data is compared exactly, and the excluded metadata is asserted separately.',
  'Doctor verifies a backup before removing 3 unreachable rows whose parent is absent. It reports the count and leaves all 42 valid rows unchanged. A latest-stable-to-head upgrade trace verifies preserved settings and valid user data.',
  'The maintainer authorized this repair and landing. The PR records source and runtime evidence for placing ownership in the existing store, ordering backup before repair, and using its internal transaction lifecycle without changing public contracts.',
  'The proposal adds a config option and a new table, breaks a public SDK call, changes retention of valid data, and requires a paid service. No maintainer chose between the viable product alternatives. A blanket snapshot exception hides all rows.',
];
for (const body of bodies) {
  const item = {repo:'openclaw/clawsweeper', number:1, kind:'pull_request', title:'Synthetic policy fixture', url:'https://github.com/openclaw/clawsweeper/pull/1', author:'synthetic-contributor', authorAssociation:'NONE', createdAt:'2026-10-08T00:00:00Z', updatedAt:'2026-10-08T00:00:00Z', labels:[]};
  const context = {issue:{body}, comments:[], timeline:[]};
  const before = JSON.stringify(context);
  const prompt = reviewPromptForTest(item, context, {mainSha:'08273f998006bedeb0e1d0bd616b2c6527b8e4d8', latestRelease:null});
  assert.equal(JSON.stringify(context), before);
  assert.ok(prompt.includes(body));
  assert.equal(prompt.split('Treat the following as implementer-owned decisions').length - 1, 1);
  assert.ok(prompt.includes('cannot waive this assessment'));
  assert.ok(prompt.includes('Genuinely unresolved product or public-contract choices still require a maintainer decision'));
  console.log('PASS: context preserved, policy delivered once, compatibility/product gates retained');
}
NODE

Limits: this exercises actual prompt assembly, not model inference, decision classification, review publication, or Doctor upgrade behavior. No recorded inference evaluator for these cases was found in the repository. Model adherence remains a limitation; the current-head hosted ClawSweeper review is a separate landing gate. This change introduces no storage migration and waives no upgrade-proof requirement.

Rank-up disposition: defer the optional live baseline/head model comparison. This narrow change follows the existing maintainer-decision contract and adds explicit implementation cases; the repository has no recorded inference evaluator for those cases. Building and qualifying a source-grounded classification benchmark would be a separate evaluation change. The executed production-rendering proof supports delivery of the policy, and this PR explicitly makes no measured claim about model classification accuracy. The first hosted review found no defects or unresolved product choices and no Before-merge items.

@clawsweeper

clawsweeper Bot commented Oct 9, 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 P2 Normal priority bug or improvement with limited blast radius. 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 Oct 9, 2026
@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Clarifies when verified metadata exceptions, backed-up invalid-data repairs, and authorized implementation choices stay with the PR owner.

Example: Submit a Doctor repair removing three orphaned rows while preserving 42 valid rows

  • Before: The review guidance leaves room to request maintainer design acceptance despite backup and compatibility evidence.
  • After: The guidance assigns the verified repair choice to the implementer while retaining compatibility and security checks.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, coherent policy correction with production-assembly evidence, while improved model decisions remain unmeasured.
Proof confidence 🦐 gold shrimp (3/6) This area-owner policy PR is outside the external-contributor proof gate. Its recorded production-builder harness shows policy delivery and context preservation for four synthetic contexts; model inference and publication remain explicitly untested. Description-only schema edits have verified no-migration compatibility.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Contributors can receive unnecessary maintainer-acceptance requests after documenting and proving implementation choices within an authorized repair.
Reason: The clarification follows established area-owner direction to avoid sign-off requests without an unresolved choice. Its narrow conditions preserve compatibility, security, and product gates.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main leaves these implementation cases implicit. The clarification follows existing owner direction, and no actionable patch defect or unresolved product choice remains.

Priority: P2
Reviewed head: 08273f998006bedeb0e1d0bd616b2c6527b8e4d8

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No live baseline/head model assessment demonstrates the evidenced repair classification and unresolved public-contract control; the body explicitly justifies deferring this optional comparison.
Agent review details

How this fits together

ClawSweeper combines repository evidence and review instructions into a model prompt. The resulting assessment feeds public review comments and automation readiness.

flowchart TD
  A[PR evidence and recorded choices] --> B[Production prompt assembly]
  C[Review policy and schema guidance] --> B
  B --> D[Model assessment]
  D --> E[Defects and compatibility checks]
  D --> F[Unresolved product choices]
  E --> G[Review comment and readiness]
  F --> G
Loading

Technical review

Best possible solution:

Keep implementation judgments evidence-driven in the shared reviewer contract and reserve decision packets for unresolved product or public-contract choices.

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

No deterministic current-main reproduction is established: the supplied receipt verifies prompt delivery rather than reproducing an erroneous model decision.

Is this the best way to solve the issue?

Yes, clarifying the shared reviewer contract is a narrow solution that preserves model judgment and independent safety gates without adding parser overrides.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Introduced policy boundaries: The added guidance requires review-verified evidence, exact user-data preservation, verified backups, and authorized scope; it explicitly preserves defects, security checks, compatibility proof, and unresolved public-contract decisions. (prompts/review-item.md:198, 08273f998006)
  • Established owner direction: Merged fix(review): stop requiring maintainer sign-off for decided, proven PRs #1751 reserves maintainer decisions for genuinely unresolved choices and keeps proof and fixable defects with the PR owner. Its source change and recorded parent were inspected; this PR extends that intent. (schema/clawsweeper-decision.schema.json:234, 34cc1aa014a1)
  • Product-review contract: Merged feat(review): judge PRs on product value, provenance and end-to-end proof #1755 requires product judgment while honoring existing area-owner decisions throughout review. The new implementation boundary preserves genuine product choices. (instructions/pr-review-rules.md:25, 197df625648b)
  • Production owner exercised: reviewPromptForTest delegates directly to production buildReviewPrompt, which loads the changed template and appends the PR review rules. The recorded harness therefore exercises prompt delivery, without proving model classification. (src/clawsweeper-review-runtime.ts:614, 08273f998006)
  • Recorded proof and source identity: The captured PR body, source revision 459d71a45596dbe4b647c92bd77e64deb8c058ee840ec9ba812867452a02484a, records four synthetic contexts rendered on macOS arm64 with Node 26.10.0 and provider local-node. Each preserved context, delivered the policy once, and retained compatibility/product gates. Template hash 82b516e727bd1c3298fb25aa302903b7e593f47a249d8e17ea3e32a2a3c2081c and schema hash 7c7d17c8dddab5d9d5963acb115ff166f9ad9da0089ab1ac0b1b2f3633135ca5 match the checkout. (08273f998006)
  • Re-review continuity: The previous review had no findings. The current body explicitly defers its optional baseline/head model comparison because no qualified inference evaluator exists for these cases and makes no measured classification-accuracy claim; that is a reasonable exception for this bounded policy clarification. (08273f998006)

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded correction to unnecessary maintainer-facing review blockers.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-09T03:54:47.676Z sha 08273f9 :: needs maintainer review before merge. :: none

Reviewed October 9, 2026, 12:03 AM ET / 04:03 UTC (Revision 2).

@steipete

steipete commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

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

Labels

P2 Normal priority bug or improvement with limited blast radius. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant