Repository navigation
fix: unblock reviews rejected by raw Git metadata - #1659
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. Reviewed September 23, 2026, 9:26 AM ET / 13:26 UTC (Revision 2). ClawSweeper reviewWhat this changesExtends Git metadata qualification to raw diffs and added or deleted files, allowing reviews to proceed only after matching source checks and a successful supplemental scan. Merge readiness✅ Ready for maintainer review This remains useful work: current main rejects the raw-diff findings addressed here. The reviewed patch preserves mandatory scanning and rejection controls, and no actionable correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherClawSweeper scans review prompts, schemas, diffs, and source blobs before starting an agent. This change distinguishes generated Git object IDs from credential findings while preserving rejection of sensitive input. flowchart TD
A[Prompts and source material] --> B[Primary credential scan]
B --> C[Git metadata witnesses]
C --> D[Masked metadata replay]
D --> E{Complete and clean?}
E -->|Yes| F[Final source checks and agent admission]
E -->|No| G[Refuse review]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep one shared metadata-witness owner and require complete native replay before admitting generated Git metadata. Do we have a high-confidence way to reproduce the issue? Yes: current-main source rejects this raw-diff finding shape, and the supplied native baseline/candidate trace demonstrates the controlled case; this reviewer did not execute it. Is this the best way to solve the issue? Yes: extending the existing witness and replay mechanism avoids a parallel allowlist and preserves complete primary scanning. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 60a77566c685. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
What Problem This Solves
Fixes automated reviews being rejected when native credential detection mistakes a Git blob ID in a raw diff for a Cloudflare credential, as observed on openclaw/openclaw#156363.
User Impact
Reviews can proceed after the existing metadata owner proves that the finding is generated Git metadata. Original source, prompts, schemas, and additional inputs remain fully scanned. No detector, verification flag, workflow gate, or fixture allowlist is disabled.
Why This Change Was Made
The existing qualification covered patch headers but not the raw diff that describes the same objects. It now requires canonical matching raw and patch records, independently hashed present blobs, proven absent endpoints for added/deleted files, and no path/content collisions. A mandatory native replay masks only proven object-ID fields; any remaining raw-diff finding or incomplete replay still refuses admission.
OpenClaw Bay Impact
None. Public status, queue, publication, dashboard contracts, and action surfaces are unchanged.
Documentation Impact
Updated the active README contract and metadata-proof runbook, owned by the input-scanner implementation and verified against this candidate with pinned TruffleHog 3.97.4. Added a reproducible native raw-diff proof driver. Revalidate the guide when scanner pin, metadata witness rules, or input staging changes. Changelog updated under Unreleased.
Real Behavior Proof
Claim and surface: the real input-scan owner admits proven raw Git metadata only after a successful supplemental native scan, while matching content remains rejected.
Fixture and environment: one committed synthetic Git repository with a moved regular file and versioned filenames, exercised through pristine baseline
60a77566and the candidate. macOS arm64, Node 26.9.0, checksum-pinned TruffleHog 3.97.4, verification enabled with unchanged flags.Reproduce: build the candidate and a trusted baseline checkout, then run:
Observed trace: baseline refused detector 58 in
raw_diff; candidate admitted after classifying an actual native raw-diff finding and replaying the masked input. Literal, HTML tag-split, and HTML-entity copies in additional input all refused. Five scenarios completed in about 10.8 seconds. The generated JSON records source identities, counts, notices and refusal classifications without matched values.Limits: this is controlled real scanner execution, not a model run or a replay of the full hosted review. The hosted safe diagnostic omits matched digests, so exact identity of its 25 findings cannot be recovered. Its detector/material/decoder shape matches the reproduced path. Hosted reviews still scan their own complete inputs.
Evidence
pnpm check: 6,547 passed, 36 skipped, two failures in 21m23s. Both failures reproduce unchanged on pristine baseline: the macOS run selected Bash 3.2 withoutmapfile, and the Swedish-locale action-ledger process-incarnation probe failed. The apply-drift file then passed with the documented supported Bash (1 case, 18.95 seconds), resolving that prerequisite without source changes. The locale failure remains baseline-reproduced. Scanner tests, static checks, all builds, lint, and changed coverage pass.0b688d6309ecf871fd142cface143b879b7688e8against60a77566are scoped-clean through P2. Hosted CI remains required before landing.SourceMetadata, including the filesystem input path, and encoded additional-input findings remain rejected. No policy relaxation was made.