Shadow mode finds a reused check among every status on the head (MQ-12) #60

Merged
merge-queue merged 1 commit from mq-12-shadow-reuse into main 2026-12-01 04:31:59 -08:00
Owner

Shadow mode's first two mismatches were native reuse it failed to see: https://openproject.home.romaine.life/wp/MQ-12

On merge-queue#56, head 11e1c65 (cluster-service, check-manifests) and head b6e1341 (default, check-logs and check-rules), the native scope found recorded passes with the same fingerprints: manifests 06fe53af… passed in run 310, and logs/rules 517cc8cd…/53643f26… passed in run 302. So it skipped those checks, and the reused-checks job posted them skipped "Identical inputs; passed on …". Decide (no --passes yet) planned them, which is right for its inputs. Shadow read the combined status, the latest per context. But once the reused-checks job ends, Forgejo's job emitter writes every job's status again wherever the latest differs in state or description (services/actions/commit_status.go, via job_emitter's CreateCommitStatus(ctx, jobs...)). The skipped job's own "Has been skipped" then sits on top of the reuse post, so the reuse never showed.

Changed: shadow.go reads the head's every status (GET /repos/{o}/{r}/statuses/{sha}, paged) instead of the combined status when a planned check was skipped. A reuse post anywhere in that list for the check's context makes it reused. README says why.
Added: the fake Forgejo's list of a commit's statuses. The reuse test now has Forgejo's "Has been skipped" written over the reuse post, and fails with the old read.
Removed / left alone: nothing else. The comparison, its timing, decide and the queue are unchanged.

🤖 Generated with Claude Code

Shadow mode's first two mismatches were native reuse it failed to see: https://openproject.home.romaine.life/wp/MQ-12 On merge-queue#56, head 11e1c65 (cluster-service, check-manifests) and head b6e1341 (default, check-logs and check-rules), the native scope found recorded passes with the same fingerprints: manifests `06fe53af…` passed in run 310, and logs/rules `517cc8cd…`/`53643f26…` passed in run 302. So it skipped those checks, and the reused-checks job posted them `skipped` "Identical inputs; passed on …". Decide (no `--passes` yet) planned them, which is right for its inputs. Shadow read the combined status, the latest per context. But once the reused-checks job ends, Forgejo's job emitter writes every job's status again wherever the latest differs in state or description (services/actions/commit_status.go, via job_emitter's `CreateCommitStatus(ctx, jobs...)`). The skipped job's own "Has been skipped" then sits on top of the reuse post, so the reuse never showed. **Changed:** `shadow.go` reads the head's every status (`GET /repos/{o}/{r}/statuses/{sha}`, paged) instead of the combined status when a planned check was skipped. A reuse post anywhere in that list for the check's context makes it `reused`. README says why. **Added:** the fake Forgejo's list of a commit's statuses. The reuse test now has Forgejo's "Has been skipped" written over the reuse post, and fails with the old read. **Removed / left alone:** nothing else. The comparison, its timing, decide and the queue are unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Shadow mode finds a reused check among every status on the head, since Forgejo writes the skipped job's own status over the reuse post (MQ-12)
All checks were successful
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite go / scope (pull_request) Successful in 5s
Suite default / scope (pull_request) Successful in 5s
Suite cluster-service / scope (pull_request) Successful in 5s
Suite go / check-test-windows (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite default / check-fetches (pull_request) Has been skipped
Suite cluster-service / check-manifests (pull_request) Has been skipped
Suite cluster-service / check-smoke (pull_request) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
Suite default / check-rules (pull_request) Successful in 5s
Suite default / check-logs (pull_request) Successful in 5s
Suite go / check-format (pull_request) Successful in 5s
Suite cluster-service / check-image (pull_request) Successful in 35s
Suite default / reused-checks (pull_request) Successful in 5s
Suite go / reused-checks (pull_request) Successful in 3s
Suite cluster-service / reused-checks (pull_request) Successful in 4s
Suite go / check-test-linux (pull_request) Successful in 59s
merge-queue landed on main
7573814665
merge-queue deleted branch mq-12-shadow-reuse 2026-12-01 04:31:59 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/merge-queue!60
No description provided.