fix(#5669): align head_sha schema pattern with CLI regex - #5674
fix(#5669): align head_sha schema pattern with CLI regex#5674fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
The review-result.schema.json validated head_sha with minLength: 7,
while the CLI (postreview.go) enforces a strict regex requiring 40 or
64 hex characters. This divergence let schema-valid values like
"0000000" pass pre-validation but fail at runtime.
Replace the loose minLength constraint with the same regex pattern
used by the CLI: ^[0-9a-fA-F]{40}$|^[0-9a-fA-F]{64}$. Update all
test fixtures in review-result-label-actions-test.sh and
validate-output-schema-test.sh that used 7-character SHAs to use
valid 40-character hex strings.
Closes #5669
|
🤖 Finished Review · ✅ Success · Started 12:04 PM UTC · Completed 12:16 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Labels: PR modifies harness validation schema and associated tests |
|
This change does not belong here. Closing. |
|
🤖 Finished Retro · ✅ Success · Started 12:01 PM UTC · Completed 12:21 PM UTC |
Retro: PR #5674 — Wrong-Repo PR Due to Cross-Repo Path MismatchTimeline
Key FindingThe retro correctly chose the target repo but used file paths from the analyzed repo. The test file Evidence for Existing Issues
The Proposals filed
|
Summary
Aligns the
head_shavalidation inreview-result.schema.jsonwith the CLI's runtime regex (hexSHAReinpostreview.go). The schema previously usedminLength: 7, which accepted short or non-hex strings that the CLI would then reject at runtime — causing agent fix iterations.Related Issue
Fixes fullsend-ai/agents#621
Changes
{ "type": "string", "minLength": 7 }with{ "type": "string", "pattern": "^[0-9a-fA-F]{40}$|^[0-9a-fA-F]{64}$" }inreview-result.schema.json"abc1234") inreview-result-label-actions-test.shto valid 40-character hex stringsvalidate-output-schema-test.shreview-result tests to valid 40-character hex stringsTesting
review-result-label-actions-test.sh— all 8 tests passvalidate-output-schema-test.sh— all review-result tests pass (pre-existing triage-schema infra failures unrelated to this change)go test ./internal/scaffold/...passesCloses fullsend-ai/agents#621
Post-script verification
agent/5669-tighten-head-sha-schema)a3dd597c77dc90dc183f844b5aa9badea57a7bd4..HEAD)