feat(autoreview): add reference support#23
Conversation
Add shared reference parsing, validation, JSONC loading, prompt-manifest rendering, and metadata scaffolding for the autoreview helper.\n\nThe new contract keeps dataset inputs file-only while allowing validated read-only path and Git references for later engine wiring.
Route normalized review references through engine-specific access paths: OpenCode generated config references, Claude and Codex add-dir support, and prompt-manifest fallback for prompt-only engines. Preserve existing isolation defaults while making strict reference mode fail before review execution when native directory access is unavailable.
Document review references in the public autoreview skill and add deterministic fake-engine harness coverage for native and prompt-manifest reference modes.
Replace Path.write_text(newline=...) with an explicit open call so the reference fixture harness works on the Python runtime used by this repo.\n\nThis coordinator fix was found by rerunning the PLAN-03 reference fixture gate before integration.
Fix accepted final autoreview findings by resolving existing local reference paths before Git shorthand parsing and by preventing AUTOREVIEW_STRICT_REFERENCES from overriding explicit CLI reference sources.\n\nAdds focused self-test coverage for relative local references and strict env precedence.
Reject exact broad filesystem roots before granting native reference access so reviewers cannot be handed overly broad local directories. Redact hidden reference details from normal run metadata while keeping explicit dry-run output useful for diagnostics.
Native directory modes now only receive references that materialize to directories. File references remain valid prompt-manifest references and strict native reference mode rejects them instead of passing unusable file paths to add-dir style engines.
Wrap all post-materialization setup and validation in the reference workspace cleanup guard so strict-mode, target-selection, reviewer-option, dry-run, and review execution exits all remove cloned reference repositories.
Dry-run now parses and validates git reference specs without cloning them, preserving the inspection-only contract while real review paths still materialize references before execution.
Dry-run now treats unmaterialized git references as intended native directories for mode planning without cloning them. Reference path safety also rejects every .env-prefixed filename so secret-bearing dotenv variants cannot be exposed as review context.
Git references pinned to commit SHAs now fall back to clone, fetch, and checkout when branch-style shallow clone cannot resolve the ref. The reference self-test covers immutable commit pins using a local fixture repository.
Hidden references are now rendered alias-only in reviewer prompts, with explicit instructions not to repeat hidden locations or descriptions. The reference self-test verifies hidden git references do not leak repository, runtime path, or description details.
Local file references now contribute bounded prompt content instead of only an inaccessible path. Native-capable engines can combine embedded file references with native directory references, while actual add-dir arguments still include only directories.
Local file references now grant native access to their containing directory while retaining bounded prompt excerpts. Validation rejects file references whose parent directory is too broad, preserving the strict-reference guarantee without passing file paths to add-dir.
Local file references are copied into per-alias temp directories before native engine access is granted. This preserves strict-reference completeness without exposing unrelated sibling files from the original directory.
Reference aliases now require an alphanumeric character and reject dot segments before they are used as materialization path components. The reference self-test covers the path traversal case.
Reference dry-runs now report planned Codex native directory mode without invoking codex exec --help. The reference self-test covers previewing strict git references with a missing Codex binary.
|
Codex review: needs real behavior proof before merge. Reviewed June 11, 2026, 6:38 PM ET / 22:38 UTC. Summary Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 720c704bfe92. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Related issue: #24 |
|
@clawsweeper re-review Default-branch exact-review capacity fix is now landed in openclaw/clawsweeper@c88270b. Triggering one normal exact review to verify repository_dispatch -> capacity gate -> Codex review end to end. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Closes #24
Summary
Verification
python3 skills/autoreview/scripts/autoreview --helppython3 skills/autoreview/scripts/autoreview --self-test-config-defaultspython3 skills/autoreview/scripts/autoreview --self-test-engine-isolationpython3 skills/autoreview/scripts/autoreview --self-test-opencode-isolationpython3 skills/autoreview/scripts/autoreview --self-test-json-array-parserpython3 skills/autoreview/scripts/autoreview --self-test-referencesskills/autoreview/scripts/test-review-harness --reference-fixturespython3 -m compileall -q skills/autoreview/scriptsscripts/validate-skillsgit diff --check -- skills/autoreview/SKILL.md skills/autoreview/scripts/autoreview skills/autoreview/scripts/test-review-harness.py skills/autoreview/scripts/test-review-harness skills/autoreview/scripts/test-review-harness.ps1python3 skills/autoreview/scripts/autoreview --mode branch --base origin/main --engine codex --model gpt-5.5 --thinking highreported clean with no accepted/actionable findingsNotes
ruby scripts/install-skills.test.rbstill fails on the pre-existing Ruby 2.6assert_path_existsincompatibility inscripts/install-skills.test.rb.