Skip to content

ci: run Validate package once per PR push - #254

Merged
datacas merged 1 commit into
mainfrom
task-242
Oct 16, 2026
Merged

datacas merged 1 commit into
mainfrom
task-242

Conversation

@datacas

@datacas datacas commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Run Validate package on pushes to main only; keep pull requests unfiltered and preserve workflow_dispatch.
  • Group pull request runs by PR number and cancel the previous run in that group. Group pushes and manual runs by event and commit SHA without cancelling them.
  • Add a static regression test for the trigger and concurrency contract.

Diagnosis

Issue #242 describes duplicate validation runs for PR branch pushes and superseded runs continuing to consume runner capacity. The proposed cause was confirmed in .github/workflows/validate.yml: push had no branch filter and the workflow had no concurrency policy. This is a feature request, so no defect reproduction applies. The invariant is that every PR merge candidate is validated, while each merged commit and manual dispatch retains its own non-cancellable validation run.

The widened related-work search covered open issues and workflow/concurrency terms. Related open items are #236 (non-code change classification), #241 (parallel Windows tests), and #243 (fork PR Linux validation); none is implemented here. The workflow edits preserve their shared jobs and fork guard.

The fix applies the requested trigger and concurrency rules at workflow scope and makes them a repository-tested contract.

Work units

Unit Behaviour Files Tests Verification Rollback
WU-1 Validate main pushes, all PRs and manual dispatches; cancel only superseded runs for the same PR. .github/workflows/validate.yml, tests/test_validate_workflow.py test_validation_triggers_and_concurrency_preserve_required_runs python3 -m unittest discover -s tests -v; python3 scripts/validate-package.py; git diff --check independent

Local verification

  • python3 -m unittest discover -s tests -v — 1,462 tests passed.
  • python3 scripts/validate-package.py — passed.
  • Focused workflow regression test — passed.
  • git diff --check — passed.

The local run used the installed Linux Python and local checkout. It did not exercise GitHub's hosted/self-hosted runners or its concurrency scheduler; the pushed workflow checks provide those CI results. No dependency or database changes are included.

CI policy for this cycle is parallel; the cycle CI gate owns waiting for the checks of the published head.

Closes #242

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Implemented issue #242 on head 0c5c8f4e430e2e285fcd35f8f0e8c66bbfeeb143.

Local verification passed: 1,462 unit tests, package validation, focused workflow regression test, and git diff --check. GitHub Actions checks for this head are reported separately below as they become available.

@datacas

datacas commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Checks for head 0c5c8f4e430e2e285fcd35f8f0e8c66bbfeeb143 (single read after publication):

  • Skills, manifests, and Bash installer — in progress.
  • PowerShell installer — in progress.

The cycle CI gate will wait for these checks.

@datacas

datacas commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner Author

[CCR-20261016-001] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2

Review of #254 — ci: run Validate package once per PR push

Verdict: REVIEW_PASSED_AWAITING_CI. The review is complete for head 0c5c8f4e430e2e285fcd35f8f0e8c66bbfeeb143; it is not an approval. No open finding blocks approval. The CI gate waits for the checks (policy: parallel).

Scope

Accumulated diff origin/main merge base 1fb034c → head 0c5c8f4 (65 lines, SHA-256 727f45d7…0137, confirmed): .github/workflows/validate.yml (push filter and concurrency) and the new tests/test_validate_workflow.py. Linked work item: #242. Repository conventions applied: AGENTS.md (no Serena or Context7 lookup needed; the change is workflow-only).

Findings

None.

Checked and found sound:

  • push: branches: [main] keeps merged commits validated. release.yml keys off workflow_run of "Validate package" with event == 'push' on main, so releases still trigger.
  • pull_request stays unfiltered and workflow_dispatch is kept. The fork guard on the job is untouched.
  • The concurrency group is pr-<number> for PRs, so only a superseded run of the same PR is cancelled. Pushes and manual runs group by event and SHA with cancel-in-progress: false, so a merged commit's run is never cancelled.
  • The regression test pins the trigger block and both concurrency expressions. Its trigger regex stops at the next top-level key.

Security triage

The deterministic default rule fired on a changed CI workflow (.github/workflows/validate.yml), so the security audit ran. Result: no vulnerability and no potential risk. permissions: contents: read is unchanged. The concurrency expressions use only github.event_name, the PR number and github.sha, with no attacker-controlled strings. Nothing widens the trigger surface for the self-hosted runner.

Executed

  • python3 -m unittest discover -s tests -p test_validate_workflow.py -v → OK (1 test). Observed at runtime.
  • git diff --check was run by the implementer; not rerun here, because the disposable clone has no origin/main ref. The supplied diff file was read instead, and it has no whitespace issues.

Unverified

  • GitHub's concurrency scheduler and the hosted/self-hosted runner behaviour. This is only observable once the checks run on a later PR push.
  • The full 1,462-test suite and scripts/validate-package.py were not rerun here. They are covered by the implementer's report and the CI checks.

CI (read once, not awaited)

Check State
Skills, manifests, and Bash installer pending
PowerShell installer pending

0 passed, 0 failed, 2 pending.

Residual risk

Low. Two workflow_dispatch runs on the same SHA queue in one group, and a newer pending run replaces an older pending one. This is a negligible edge, and the issue does not ask for more.

@datacas
datacas merged commit 63743b9 into main Oct 16, 2026
2 checks passed
@datacas
datacas deleted the task-242 branch October 16, 2026 11:56
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.

ci: run Validate package once per PR push (push only on main, cancel superseded PR runs)

1 participant