Skip to content

fix(review): retain fork CI and GitHub merge evidence - #538

Merged
T-Auto merged 1 commit into
mainfrom
fix/review-fork-evidence-495
Nov 2, 2026
Merged

T-Auto merged 1 commit into
mainfrom
fix/review-fork-evidence-495

Conversation

@Haoming9527

@Haoming9527 Haoming9527 commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #495

What was wrong

Fork pull-request workflow runs can have an empty pull_requests array despite matching the requested head SHA and event. The snapshot discarded those runs, including action_required results, and omitted GitHub's own mergeability assessment when no local objects were available.

The change

Accept an explicitly empty association list only with the exact head and pull_request event, while rejecting malformed or contradictory associations. Record whether evidence uses an explicit association or exact-head matching. Preserve run status/conclusion and explain filtered candidates.

Query and report githubMerge separately from the optional isolated local probe, including its base ref/SHA and whether that matches the requested base. Unknown results remain partial; conflict-free changes do not imply review or policy approval. Bilingual CLI documentation describes these distinctions. No resident schemas, new dependencies, or GitHub mutations are added to the CLI.

Validation

Baseline with the new regressions: node test/run.mjs review-snapshot failed 3 of 7 checks (fork CI, approval state, missing GitHub mergeability).

After the fix:

npm run build
build: compiled src/ to lib/ and copied 50 assets

node test/run.mjs review-snapshot
dsh-ops review-snapshot: all 7 checks passed
dsh-ops test: 1 suite(s) passed, 0 skipped, 0 failed

node scripts/check-file-size.mjs
541 code files checked; all at or under 1000 lines

node scripts/validate-manifest.mjs
all 83 checks passed

git diff --check
passed

Coverage includes empty/malformed/contradictory associations, wrong SHA/event rejection, approval/queued/in-progress states, conflicting/unknown/policy-blocked merge states, different requested bases, and the existing local merge isolation checks.

Own pull_request CI at head fa7dd60: https://github.com/T-Auto/dsh-ops/actions/runs/41329509620 — all 9 executed jobs passed, including Windows x64, Linux x64, macOS arm64/Intel and CI required; the opt-in benchmark smoke was skipped. GitHub reports the PR mergeable.

Read-only live validation against fork PRs #531, #515 and #503 correctly recovered their successful exact-head runs with empty association arrays and reported GitHub's conflict/policy-blocked states. Their reported PR-base SHAs differ from the requested latest main, so the overall snapshot conservatively remains partial instead of overstating current-base evidence.

Environment

Windows x64, Node 26.12.1, source worktree based on main 065cd7fba266a24ffded20c78a404860c033ba72.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] review snapshot:fork PR 的 CI/merge 被误报 unknown(run 与 mergeable 实际存在)

2 participants