Skip to content

fix(actions): preserve draft and close cancellation contract - #933

Draft
seonghobae wants to merge 5 commits into
docs/public-surface-deepwikifrom
codex/avoid-draft-transition-runs
Draft

fix(actions): preserve draft and close cancellation contract#933
seonghobae wants to merge 5 commits into
docs/public-surface-deepwikifrom
codex/avoid-draft-transition-runs

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Outcome

Preserve repository-local workflow cancellation on pull-request lifecycle transitions without allocating product runners for Draft/closed states. Tests, PROV-O contract, and Ontology Pages retain converted_to_draft and closed events in the PR-scoped concurrency domain; their product jobs still fail admission when the PR is Draft or closed.

Finding → RED → causal repair

Review 5119691752 found that the original d42bccf7c4e3fddf342a227d2c867e35da1560e4 change removed converted_to_draft and closed. That prevents GitHub from creating the same-workflow/same-PR lifecycle run needed for workflow-level cancel-in-progress to retire an already queued or in-progress repository-local run. The central current-head coalescer is not a substitute: it deliberately coalesces redundant queued siblings and never selects an observed in-progress run.

  • realistic RED b2ec8b53df37944e1fb96a68081ec28b46a6bd67 strengthens tests/test_tests_workflow_contract.py so all three repository-local workflows must keep converted_to_draft/closed and must skip product jobs on closed/Draft events;
  • 8eff81f15eb12b54262393175915af661ba888fd restores Tests lifecycle cancellation and documents the non-obvious no-job-run purpose;
  • a6c149c9bf5cdb4ded78f6fc2332074ad7ef2aa7 restores the same contract for PROV-O;
  • de4e6cf9a48b042af0bb1128fa9b194abd1952a5 restores it for Ontology Pages.

Live lifecycle evidence

The PR was intentionally converted back to Draft on exact head de4e6cf9a48b042af0bb1128fa9b194abd1952a5. The pre-transition Tests run 33943475569 on that same head completed cancelled; the converted-to-Draft successor run 33943496485 completed skipped. Its Full test suite and Frontend jobs both had runner_id=null, proving the lifecycle event cancelled stale work without allocating a product runner.

PROV-O and Ontology Pages are path/base scoped to main; because this PR remains stacked on #908, their current-head hosted product jobs are not claimed. The structural regression pins the same cancellation/admission contract for those workflows until the stack reaches main.

Stack / exact boundary

  • base: #908@00e90e03ae1afb7f13ae843dd578694d0f72b325 (docs/public-surface-deepwiki)
  • exact head: de4e6cf9a48b042af0bb1128fa9b194abd1952a5
  • compare: base is the exact merge base, behind_by=0
  • surviving delta: workflow rationale comments plus the stronger executable lifecycle-cancellation regression; the original event-removal behavior is not retained
  • PR: open / Draft / mechanically mergeable

Keep Draft behind #908/#911. Do not self-approve, bypass, force-push, transfer predecessor GREEN/reviews, or remove lifecycle cancellation in pursuit of eliminating harmless no-job workflow records.

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: ed60fe1a-f38d-4dd6-9bf8-577c474d4108

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Valid lifecycle-cancellation regression: removing converted_to_draft and closed stops these repository-local workflows from creating the same-concurrency-group event that cancels an already queued/in-progress Tests/PROV-O/Ontology run for this PR. The central current-head coalescer only retires redundant queued siblings and deliberately never selects an observed in-progress run; it cannot substitute for workflow-level cancellation of the sole active repository-local run. Preserve the no-runner Draft/closed behavior with job guards, but keep lifecycle events in the trigger so conversion/closure cancels stale local work before it consumes further capacity. Please repair with an executable regression covering all three workflows.

@seonghobae
seonghobae marked this pull request as draft September 5, 2026 04:02
@seonghobae seonghobae changed the title fix(actions): avoid inactive PR runs test(actions): preserve lifecycle cancellation Sep 5, 2026
@seonghobae seonghobae changed the title test(actions): preserve lifecycle cancellation fix(actions): preserve draft and close cancellation contract Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant