Cancel superseded pull-request runs without erasing evidence
A force-push starts a new run while the old run still publishes late check results under the branch name.
- Focused work estimate
- 4h + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Concurrency control · Immutable revisions
Estimated field mix
- DevOps60%
- Distributed systems40%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional TypeScript monorepo has twelve packages and a local CI simulator. Pull requests wait for redundant work, stale caches occasionally pass broken changes, and superseded runs continue consuming executors. Create synthetic package graphs and fake check APIs; no hosted CI credentials or production repositories are supplied.
Setup prerequisites
- Dependency graphs
- Process exit codes
- Test isolation
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
Acceptance criteria
- Concurrency identity binds repository, pull request, and immutable revision
- New revision requests cancellation of older active runs
- Late results remain tied to their original revision and cannot satisfy the new one
Implementation constraints
- Cancellation is cooperative and must not mark unfinished checks successful.
Verification to include
- Start two revisions and verify only the new one remains eligible.
- Deliver a late success from the old run and prove it cannot update the new revision.
Deliverables
- Revision-scoped concurrency controller and race test
Rollout and recovery
Canary on the local simulator while recording saved executor time.
Value of the work
For the engineer: Practice treating CI as a versioned delivery system with correctness, latency, and recovery constraints.
For the team: Review a pipeline that reduces wasted compute without allowing stale or skipped checks to approve changes.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.