Skip to content

fix(review): re-review stale approvals on current head - #528

Closed
rianjs wants to merge 1 commit into
mainfrom
rianjs/MON-6650/current-head-review
Closed

fix(review): re-review stale approvals on current head#528
rianjs wants to merge 1 commit into
mainfrom
rianjs/MON-6650/current-head-review

Conversation

@rianjs

@rianjs rianjs commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Bind the existing-approval fast path to the pull request's current head SHA.
  • Let the normal review command continue when the posting identity approved an older head.
  • Update the command help and add current-head/stale-head regression coverage.

Why

The gate selected the latest decisive review by state but ignored its CommitSHA. After a push, an older approval therefore short-circuited review of the new head.

Impact

Current-head approvals retain the cheap early exit. Older or revision-unbound approvals fail closed into a normal review of the current head.

Validation

  • go test ./internal/gateio ./internal/app ./internal/cmd/reviewcmd — 233 passed
  • go test ./... — 2,869 passed, 2 skipped, and one unrelated date-sensitive datacmd test failed identically on untouched origin/main

@rianjs-bot rianjs-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: d06896d3fa5a
Profile: codex-rianjs-bot - Posting as: rianjs-bot[bot]

Summary

Reviewer Findings
go:implementation-tests 0
policies:conventions 0
structure:repo-health 0

Reviewer Coverage

Reviewer Status Inspected Skipped Constraints
go:implementation-tests complete_broad internal/app/runtime_test.go, internal/cmd/reviewcmd/reviewcmd.go, internal/cmd/reviewcmd/reviewcmd_test.go, internal/gateio/gateio.go, internal/gateio/gateio_test.go unavailable Focused review limited to the assigned changed files. Targeted Go tests could not run because the configured Go build-cache path is outside the writable sandbox.
policies:conventions complete_broad internal/cmd/reviewcmd/reviewcmd.go, internal/cmd/reviewcmd/reviewcmd_test.go unavailable Review limited to the two assigned changed files; shared CLI standards convenience checkout was not present.
structure:repo-health complete_broad internal/app/runtime_test.go, internal/cmd/reviewcmd/reviewcmd.go, internal/cmd/reviewcmd/reviewcmd_test.go, internal/gateio/gateio.go, internal/gateio/gateio_test.go unavailable Focused structural review limited to the assigned changed files and their immediate provider contracts.

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 1m 57s | unavailable | gpt-5.6-terra | cr 0.10.267
Field Value
Model gpt-5.6-terra
Reviewers go:implementation-tests, policies:conventions, structure:repo-health
Engine codex_cli · gpt-5.6-terra
Reviewed by cr · rianjs-bot[bot]
Duration 1m 57s wall · 4m 05s compute
Cost unavailable
Tokens 1.1M in / 11.2k out

Per-workstream usage

Workstream Model In Out Cache read Cache create Cost Duration
orchestrator-selection gpt-5.6-terra 16.8k 328 11.0k unavailable unavailable 11s
go:implementation-tests gpt-5.6-terra 344.4k 4.0k 292.4k unavailable unavailable 1m 24s
policies:conventions gpt-5.6-terra 223.8k 2.3k 183.3k unavailable unavailable 51s
structure:repo-health gpt-5.6-terra 460.7k 4.2k 404.7k unavailable unavailable 1m 32s
orchestrator-rollup gpt-5.6-terra 35.4k 367 27.1k unavailable unavailable 5s

@rianjs rianjs changed the title Review stale approvals on the current PR head fix(review): re-review stale approvals on current head Jul 31, 2026
@rianjs
rianjs force-pushed the rianjs/MON-6650/current-head-review branch from d06896d to 7e0f0cd Compare August 1, 2026 09:36

@rianjs-bot rianjs-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 7e0f0cdcc12b
Profile: codex-rianjs-bot - Posting as: rianjs-bot[bot]

Summary

Reviewer Findings
go:implementation-tests 0
policies:conventions 1
structure:repo-health 0
policies:conventions (1 finding)

Minor - internal/cmd/reviewcmd/reviewcmd.go:34

Document this durable gate semantic in docs/review-lifecycle.md, which is declared the canonical end-to-end lifecycle for cr review. The help text is useful for users, but future implementers following the lifecycle still cannot see that only an approval bound to the current PR head short-circuits a normal run (and that revision-unbound approvals continue into review).

Reviewer Coverage

Reviewer Status Inspected Skipped Constraints
go:implementation-tests complete_broad internal/app/runtime_test.go, internal/cmd/reviewcmd/reviewcmd.go, internal/cmd/reviewcmd/reviewcmd_test.go, internal/gateio/gateio.go, internal/gateio/gateio_test.go unavailable Default cgo-enabled package tests could not compile because the sandbox checkout path contains spaces; the focused suites passed with CGO_ENABLED=0.
policies:conventions complete_broad internal/cmd/reviewcmd/reviewcmd.go, internal/cmd/reviewcmd/reviewcmd_test.go unavailable Reviewed the assigned command implementation and tests; shared-standard convenience copies were not present.
structure:repo-health complete_broad internal/app/runtime_test.go, internal/cmd/reviewcmd/reviewcmd.go, internal/cmd/reviewcmd/reviewcmd_test.go, internal/gateio/gateio.go, internal/gateio/gateio_test.go unavailable Focused on assigned changed files; targeted tests passed with CGO_ENABLED=0 because the environment's spaced workspace path breaks the default C compiler invocation.

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 1m 41s | unavailable | gpt-5.6-terra | cr dev
Field Value
Model gpt-5.6-terra
Reviewers go:implementation-tests, policies:conventions, structure:repo-health
Engine codex_cli · gpt-5.6-terra
Reviewed by cr · rianjs-bot[bot]
Duration 1m 41s wall · 3m 12s compute
Cost unavailable
Tokens 899.7k in / 7.7k out

Per-workstream usage

Workstream Model In Out Cache read Cache create Cost Duration
orchestrator-selection gpt-5.6-terra 57.0k 645 38.1k unavailable unavailable 8s
go:implementation-tests gpt-5.6-terra 358.6k 2.7k 303.1k unavailable unavailable 1m 18s
policies:conventions gpt-5.6-terra 102.2k 1.4k 76.8k unavailable unavailable 34s
structure:repo-health gpt-5.6-terra 301.3k 2.2k 246.0k unavailable unavailable 1m 05s
orchestrator-rollup gpt-5.6-terra 80.5k 726 59.4k unavailable unavailable 5s

Comment thread internal/cmd/reviewcmd/reviewcmd.go
@rianjs
rianjs force-pushed the rianjs/MON-6650/current-head-review branch from 7e0f0cd to 0c85374 Compare August 1, 2026 09:44

@rianjs-bot rianjs-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 0c85374d6895
Profile: codex-rianjs-bot - Posting as: rianjs-bot[bot]

Summary

Reviewer Findings
go:implementation-tests 0
policies:conventions 0
structure:repo-health 0

Reviewer Coverage

Reviewer Status Inspected Skipped Constraints
go:implementation-tests complete_constrained internal/app/runtime_test.go, internal/cmd/reviewcmd/reviewcmd.go, internal/cmd/reviewcmd/reviewcmd_test.go, internal/gateio/gateio.go, internal/gateio/gateio_test.go unavailable Read-only sandbox prevented Go from initializing its build cache, so focused tests could not be rerun in this checkout.
policies:conventions complete_constrained docs/review-lifecycle.md, internal/cmd/reviewcmd/reviewcmd.go, internal/cmd/reviewcmd/reviewcmd_test.go unavailable Reviewed assigned files; shared-standard convenience copies were not present.
structure:repo-health complete_constrained internal/app/runtime_test.go, internal/cmd/reviewcmd/reviewcmd.go, internal/cmd/reviewcmd/reviewcmd_test.go, internal/gateio/gateio.go, internal/gateio/gateio_test.go unavailable Read-only sandbox prevented Go test execution because the build cache could not be initialized.

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 1m 15s | unavailable | gpt-5.6-terra | cr dev
Field Value
Model gpt-5.6-terra
Reviewers go:implementation-tests, policies:conventions, structure:repo-health
Engine unavailable · gpt-5.6-terra
Reviewed by cr · rianjs-bot[bot]
Duration 1m 15s
Cost unavailable
Tokens unavailable

Per-workstream usage

Workstream Model In Out Cache read Cache create Cost Duration
orchestrator-selection unavailable unavailable unavailable unavailable unavailable unavailable unavailable
go:implementation-tests gpt-5.6-terra 500.3k 3.2k 429.6k unavailable unavailable 17s
policies:conventions gpt-5.6-terra 189.2k 1.9k 148.0k unavailable unavailable 13s
structure:repo-health gpt-5.6-terra 527.8k 4.2k 448.0k unavailable unavailable 43s
orchestrator-rollup gpt-5.6-terra 105.5k 765 82.7k unavailable unavailable 5s

@rianjs
rianjs marked this pull request as ready for review August 1, 2026 09:48
@rianjs rianjs closed this Aug 1, 2026
@rianjs
rianjs deleted the rianjs/MON-6650/current-head-review branch August 1, 2026 10:11
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.

1 participant