shuke987 opened a new pull request, #68872:
URL: https://github.com/apache/doris/pull/68872
### What problem does this PR solve?
Issue Number: None
Related PR: #68032, #68622
Problem Summary:
A manual `code-review: success` status with description `force pass` is
overwritten by subsequent aggregation because it is not a scoped review source.
Preserving that unscoped success would also approve other PRs sharing the same
commit.
Add an explicit PR comment command:
```text
/force-pass code-review <full 40-character PR head SHA>
```
The trusted workflow verifies the human comment creator's write/admin
permission, an open matching PR, and the exact current head. It records a
separate `code-review/source/manual/pr-<number>/head-<sha>` status linked to
the authorizing comment. Aggregation honors that acceptance across automated
reruns and base movement, without applying it to a new head or another PR.
Only the serialized aggregate job now publishes the final `code-review`
context. Remove unconditional pending writes from the runner and
local/skip/aggregate paths so they cannot erase manual acceptance. When no open
PR uses a head, leave its final status unchanged.
**Scope and behavior:** GitHub's final commit status is still shared by
identical heads. Every open PR on that SHA must independently qualify:
accepting A cannot approve B, and B can keep their shared check pending/failed.
This PR does not introduce independently green/red merge gates for identical
heads or change branch protection. During a rerun, the previous aggregate
verdict remains visible until a new aggregate verdict is published; source
statuses still report pending. If aggregation fails, the previous final verdict
remains until a successful rerun.
**Rollout:** Merge the workflow and trusted scripts together. Existing
unscoped force-pass records are not automatically migrated; a maintainer must
issue the explicit command on the intended PR. Comment edits/deletion do not
revoke an accepted source. Allow runs using older workflow definitions to
finish before final rollout verification. See
`.github/scripts/manual-code-review-pass.md`.
### Release note
None
### Check List (For Author)
- Test
- [x] Unit Test: 55 related tests passed (23 resolver, 6 manual-command
validator, 26 existing local-PASS validator).
- [x] Manual test: executed actual workflow shell blocks with a mocked
GitHub API for 8 scenarios: valid pass, stale SHA, read-only actor, failed
POST, manual pass over automated failure, new head, another PR sharing the
head, and closed head. No live statuses were written.
- [x] Static validation: actionlint v1.7.7 on all three changed
workflows (`-shellcheck=`); `git diff --check` passed.
- Live Actions acceptance remains to be verified after merging because
validators are loaded from the default branch.
- Behavior changed:
- [x] Yes. Add explicit PR/head manual acceptance and retain the
previous final verdict until serialized aggregation replaces it.
- Does this need documentation?
- [x] Yes. Usage, shared-head limitations and rollout notes are included
in this PR.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]