Shadow mode finds a reused check among every status on the head (MQ-12) #60
Loading…
Reference in a new issue
No description provided.
Delete branch "mq-12-shadow-reuse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 headb6e1341(default, check-logs and check-rules), the native scope found recorded passes with the same fingerprints: manifests06fe53af…passed in run 310, and logs/rules517cc8cd…/53643f26…passed in run 302. So it skipped those checks, and the reused-checks job posted themskipped"Identical inputs; passed on …". Decide (no--passesyet) 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'sCreateCommitStatus(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.goreads 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 itreused. 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