Trial P-65: a cancelled run's suite concludes cancelled, its judging check failure, and the rollup gives each check its suite's conclusion and its run (#681, step 1)

Merged
DO
7d ago
+854-1

User description

Part of #681, "A cancelled run of a Lens is superseded by a later run on the same head": step 1 of its plan, ruled option (B) by the Factory Builder (trial, then port, then Kernel). The fixture alone, in its own PR, as ruled.

Trial P-65: verdict pass

The question and the pass condition were written at 14:02:59Z, before anything ran (trials/P-65.json pass). The trial ran on canary pull request 102, as the Maintainer. Its workflow p65-cancel.yml was granted nothing and checked nothing out: p65 / work sleeps 240 s, and p65 / verify needs it, runs under if: always(), and fails unless work succeeded.

What ran:

  1. R1 on head A, cancelled mid-way.
  2. B pushed, and its run cancelled.
  3. A pushed back; its run R3 was left alone.
  4. R1 re-run, and that attempt cancelled.
  5. The pull request closed and reopened, and its run R4 cancelled.
PointResult
(1) A cancelled runIts suite and run conclude cancelled; p65 / work cancelled, p65 / verify failure
(2) The push back to A and the reopeningEach starts a workflow run with a suite of its own on A, beside R1's, which stays
(3) A re-runKeeps its run's id and its suite, with new check runs (run_attempt tells them apart); the rollup gives only the latest attempt's
(4) The run left alonesuccess
(5) One rollup readAsking checkSuite { conclusion } and workflowRun { runNumber }, beside the run's databaseId the port reads already, costs 1, as the port's query does. P-8's measure stands

The section 6 row also names three limits the Kernel step (3) must rule on, from the Claude review:

  • A run's id, number and suite follow the order runs were created, and a re-run keeps all three, so none of them orders a re-run attempt against a later run.
  • A job stopped at its own timeout concludes cancelled too (P-42).
  • Each judging check concluded about a second before its suite, a gap the reads did not catch.

Every cancel was by hand; a concurrency group's was not tried.

Removed: the authorization header gh sent, from each of the 8 exchanges. The redaction of the eight captures found no credential: it removed only response headers a fixture may not keep. The bodies are trimmed to p65-cancel.yml's suites, runs and checks, as each call says, to keep the PR under the diff budget.

Step 8, undone in the canary:

  • Pull request 102 closed, and its branch trial/p65-cancel deleted.
  • No token, secret, variable, key, runner or webhook was made.
  • The runs stay: they hold only the two jobs' logs of a sleep and a test, and the fixture names them.

Grounding: no rule of sim/grounding.py names P-65 yet. The port's PR (#681 step 2) adds the fake's cancelled-run case and grounds it on this fixture.

Verify

make checks passes, trials included. Full verify is CI's.

Reviews

ReadHeadState
Claude + securityd2cc189cNothing blocking. Fixed in 72fd4963: the three limits above in the row; P-8 named; P-65 in batch 4; the run on B said not read; attempt 1's suite not read on its own; the PR's time 14:03:39Z; the headers kept named. Plus a trim to stay under budget
Carbon (gemini-4-carbon-high, medium fallback in one part)d2cc189cOne major (the row named the run's number, not its id): fixed in 1f92c50e
Muse (Wonder Full)d2cc189cOne minor (the run on B in no exchange): fixed in 72fd4963 and 42f1b336
Astra (gpt-6-astra)42f1b336A clean read

🤖 Generated with Claude Code


CodeAnt-AI Description

Document how cancelled workflow runs appear in pull request checks

What Changed

  • Records that cancelling a workflow run cancels its suite and work check, while its judging check fails.
  • Confirms that pushes back to a head and pull request reopenings create separate workflow runs and check suites; reruns keep the original run and suite but create new checks.
  • Documents that one rollup read can associate each check with its suite’s conclusion and workflow run at a cost of 1.

Impact

✅ Clearer cancelled-run check results
✅ Distinguishable checks for separate workflow runs
✅ One-query check attribution

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.