Skip to content

ci: decide the full e2e suite from the pull request's current labels (#372) - #34

Merged
jcguo123 merged 1 commit into
mainfrom
sync/full-suite-labels
Oct 28, 2026
Merged

jcguo123 merged 1 commit into
mainfrom
sync/full-suite-labels

Conversation

@jcguo123

Copy link
Copy Markdown
Collaborator

Sync of private jcguo123/Choruz#372, merged as c6e1c36d. The same patch is applied on public main; the branch tree equals private main's tree.


Type

  • ci / build / deps

Agent Note

New: .agents/notes/implemented/process/2026-10-28-full-suite-follows-current-labels.md

Summary

CI (linux) required could pass without the full e2e suite on a pull request labelled database, security or ci-full:

  • The full suite was selected from the triggering event's payload (github.event.pull_request.labels).
  • Opening a pull request and applying its label fire opened and labeled within a second, and the per-ref concurrency group cancels one of the two runs.
  • When the opened run survives, its payload has no label. Change detection then reports FULL: false and the required check goes green.

This happened on jcguo123/Choruz#371:

  • Run 40656202171 selected checks,rust-lint,rust-test,db-smoke,e2e,perf and passed.
  • The labelled run 40656201989 had been cancelled; re-running it selected e2e-full.

gh pr create --label also produces two runs (inclusionAI/Choruz#32).

Changes:

  • Single owner: check_ci_results.py owns which labels require the full suite (FULL_SUITE_LABELS).
  • Change detection: calls check_ci_results.py full, which reads the pull request's labels through the API when the job runs.
  • Required gate: re-reads the labels after every other job. If a full-suite label is present and the run did not select e2e-full, it fails, naming the label and telling the author to re-run the labelled run.
  • Fail closed: a failed label lookup fails the job.
  • Push: a push to main still selects the full suite without any lookup.
  • Event payload: the workflow no longer reads labels from github.event.
  • Permissions: the required job gains pull-requests: read. Change detection already had it.

Ownership

  • Owner: .github/scripts/check_ci_results.py decides when the full e2e suite is required, for both change detection and the required gate.
  • Removed: the FULL expression in ci.yml that read the event payload's labels.

Tests

All in .github/scripts/tests/test_check_ci_results.py. Every test that runs the real required step from ci.yml now does so under bash -e, as Actions does.

Test What it checks Negative control (observed to fail)
test_full_suite_follows_the_pull_requests_current_labels Each of ci-full, database and security selects e2e-full. An unrelated label does not. A workflow change still does. The workflow no longer reads github.event.pull_request.labels. —
test_gate_rejects_a_run_that_predates_a_full_suite_label A run without e2e-full and with the database label exits 1 with the remedy. No label exits 0. e2e-full selected exits 0. —
test_gate_fails_closed_when_labels_cannot_be_read Missing API configuration, and an urlopen raising URLError, both make the selection and the gate raise. pull_request_labels swallowing OSError
test_push_runs_the_full_suite_without_a_label_lookup EVENT=push with no PR or API variables: the list includes e2e-full, the step writes full=true, and check_ci_results.py full prints true. full always looking up labels
test_server_and_schema_pull_requests_require_the_load_smoke Existing test; now supplies PR_LABELS. —

With the previous ci.yml and check_ci_results.py, the new tests fail.

Ran locally

CI script tests: python3 -m unittest discover -s .github/scripts/tests -v on f3aed0e0: 53 tests, OK (captured verbose output).

Real API path, using the jcguo123 token:

Command Result
check_ci_results.py full for #371 (label database) true
check_ci_results.py full for #370 (no label) false
Gate for #371 with REQUIRED_NEEDS=checks Exit 1 with the re-run message

Other checks: python3 scripts/verify_agent_notes.py and python3 scripts/check_architecture.py both pass.

Not run locally: the Rust, web and e2e suites. No Rust or web source changed, and this workflow change makes CI run the full suite.

Independent audit: GPT-5.6 Terra used choruz-pre-simplify-audit.

Revision Verdict Gap
1945f5e8 FAIL The push path was untested; an API failure was not actually exercised.
f3aed0e0 UNVERIFIED No captured test output.
f3aed0e0 PASS Captured output provided.

This PR's own run uses the new workflow, so its change detection performs the live label lookup.

Risk

  • API dependency: change detection and the required gate each make one GitHub API call per pull request run. If the API is unavailable, the run fails closed and must be re-run.
  • Labels added later: a label added after a run has started can make that run's required check fail. The message tells the author to re-run the labelled run.

This PR was written by an AI agent (Claude), which ran every command listed above.

…(#372)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jcguo123
jcguo123 merged commit 50a3c97 into main Oct 28, 2026
16 checks passed
@jcguo123
jcguo123 deleted the sync/full-suite-labels branch October 28, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant