Skip to content

ci: Run the quality gate as parallel jobs - #285

Merged
pterw merged 7 commits into
mainfrom
ci/parallel-jobs
Oct 31, 2026
Merged

pterw merged 7 commits into
mainfrom
ci/parallel-jobs

Conversation

@pterw

@pterw pterw commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

Splits the single CI job into parallel jobs, at the owner's request (rulings 2026-10-31). The frontend gate took about 4.5 of the job's 7 minutes and proves nothing about a documentation-only change. Plan: docs/superpowers/plans/2026-10-31-ci-parallel-jobs.md.

  • changes decides whether a pull request changes only documentation; checks runs the docsync preflight, pre-commit, the suite with coverage and the advisory pip-audit; browser runs the Playwright install and the three browser commands; quality-gate is the aggregator and keeps the name the main-protection ruleset requires, so the ruleset is unchanged.
  • The two decisions that could produce a wrong green live in scripts/dev/ci_jobs.py (stdlib only), not in inline workflow shell: whether a change is docs-only (a skip-list: any other path runs the browser job; empty or unreadable input counts as not docs-only), and whether the aggregate passes. Their tests check every input combination against a hand-written set of accepted outcomes, and near-miss paths a loose match would wrongly accept.
  • Docs-only is decided over the whole pull request, never per push: a docs commit on top of a code change still runs the browser job.
  • Expected times: about 1.5 minutes for a docs-only pull request, about 5 otherwise (the browser job runs beside checks).

State

Task What Commits Review
-- Plan 47c2a9b reviewed once, then fixed in 2 rounds (the second without its own re-review)
1 Workflow split, ci_jobs.py, tests 496e365, fbb6f44 approved after 1 fix round
2 Documentation sweep 3ca1f53 approved
3 Execution record 11ceaf0 approved
4 Correct the plan review record; take main in (after PR #286) 0d98525, merge 1005506 approved

Validation at this head

Head 10055067 (merge of main at f393c827, after PR #286). Scoped gates (owner ruling 2026-10-31), run by an independent gate runner at this head: the full suite in three shards, 3158 passed (703 + 1549 + 906; 3157 on this branch plus the one case PR #286 added, pinned fresh from the merged tree); pre-commit run --all-files (its check-yaml hook parses the workflow) and doc_state_sync.py --check pass. The frontend gate is out of scope locally (no template, static or gate file changes) and runs in this PR's browser job. Actions cannot run locally: this PR's own CI run is the workflow's test, and it changes the workflow, so all four jobs run here. The first documentation-only PR after merge is the check that browser skips.

Codex: waived by the owner until the usage limits reset. CI: green at this head on all four jobs (run 41226550053: checks 2998 passed, 4 skipped, 156 deselected; browser 5 min 26 s). Codacy 0 new issues; no open review threads. qlty passes; its one blocking issue, reproduced with the qlty CLI, is zizmor's unpinned-action rule on pypa/gh-action-pip-audit@v1.1.0, a reference main already carries unchanged and this PR only moves into the checks job (deferred to the findings triage).

Checklist

  • pytest -q passes (update SESSION_CONTEXT Section 1 if test count changed)
  • pre-commit run --all-files passes (all hooks)
  • python scripts/doc_state_sync.py --check exits 0
  • PLAYBOOK Section 3 reflects current WP/task state
  • PLAYBOOK Section 4 has a dated log entry:
    - Batch WP: inside DOCSYNC:CURRENT-BATCH-START/END markers
    - Side task: after DOCSYNC:CURRENT-BATCH-END marker
  • Changes are within scope of the active batch definition
    (or deviation is logged in the Section 4 entry)

pterw added 4 commits October 31, 2026 12:46
The one CI job spends about 4.5 of its 7 minutes on the frontend gate,
which proves nothing about a documentation-only change. The plan splits
it into changes, checks and browser jobs plus a quality-gate aggregator
that keeps the required check's name, and moves the docs-only and
aggregator decisions into a small tested script.
The single job took about 7 minutes, 4.5 of them in the browser gate.
Split it into changes, checks, browser and an aggregating quality-gate,
so the run takes about 1.5 minutes plus the browser job beside it.

A docs-only pull request skips the browser job. The classification and
the aggregator rule live in scripts/dev/ci_jobs.py, covered by truth
tables, and fail closed. quality-gate keeps its name, so the required
context is unchanged.
The aggregate truth table enumerated 192 rows against an oracle that
copied the code's own rule. One test now loops the full input product
against a hand-written set of accepted tuples and lists every mismatch.
The docs-only table gains near-miss paths for the .superpowers/ prefix,
the .md suffix and spaces; a missing aggregate flag must exit non-zero;
the whole-file secret scan runs once instead of once per job.
The workflow now runs changes, checks, browser and the quality-gate
aggregator. Bring the live docs that described one sequence of steps in
one job in line, with the run time per ruling C13 (about 1.5 minutes
for a docs-only pull request, about 5 otherwise).
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 19 complexity · 0 duplication

Metric Results
Complexity 19
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

pterw added 3 commits October 31, 2026 13:29
The plan now carries its execution record: the three commits with their
review outcomes, and the CI run for the head that changed the workflow
(four jobs green, 5 min 32 s against 6 min 47 s for the single job).
Acceptance (b1) is recorded as passed locally; (b2), a skipped browser
job on a docs-only pull request, stays open for the controller because
this pull request changes the workflow and so runs browser on every head.

The architecture docs and the README now point at
scripts/dev/ci_jobs.py as the owner of the docs-only path list, and the
README wrap around that note is fixed. PLAYBOOK Section 3 names PR #285
and the remaining post-merge check.
The plan was reviewed once and then fixed in two rounds; the second round
was committed without its own re-review, so "approved after 2 fix rounds"
overstated it. Reworded in the plan's Execution record and the Task 3
PLAYBOOK entry.
Conflicts resolved: PLAYBOOK Section 3 (kept the CI, archive and Deezer
bullets) and Section 4 (kept the four CI entries and main's Deezer entry,
after the end marker); the log archive page 0036 and its index (took ours,
then doc_state_sync --fix regenerated them, rotating the Deezer entry);
the test-count sites and FINDINGS header (ruling C19: set by --fix).
FINDINGS keeps main's F-B23-37 resolution and rotation.

Test count: pytest -q -- 3158 passed.
@pterw
pterw marked this pull request as ready for review October 31, 2026 17:59
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-31T18:00:02.349585Z
We couldn’t complete this review. Comment @codex review to try again.
1005506 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@pterw
pterw merged commit 7fce11f into main Oct 31, 2026
6 checks passed

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Graphify reviewed this change.

No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.

Not checked: tests were not run; no formal proof of the changed code.


Graphify review — findings

Splits the single CI job into parallel changes, checks and browser jobs, and keeps the required quality-gate name as an always() aggregator that passes only when changes and checks succeed and browser succeeds or was skipped for a docs-only PR. A pull request whose whole diff against its base is documentation skips the slow browser job; the changes job judges the merge commit's first-parent diff, and any git failure leaves docs_only false so the browser job runs. Updates DEVELOPMENT, README and PLAYBOOK to describe the new job layout, and raises the pinned test count to 3158 while the tracked module count stays at 104.

Review partial — this diff was larger than one review pass covers, so later files were not reviewed; some findings may be missing.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 281 functions depend on the 281 functions this change touches.

Health — grade A; no new coupling hotspots.

Verification — 281 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 281 function(s) in the blast radius were not formally verified this run

Risky patterns (advisory)

  • medium no-unbounded-fetch in scripts/dev/ci_jobs.py:59: unbounded read (no limit/bound): print("true" if docs_only(sys.stdin.buffer.read()) else "false")

Docs that may be stale (advisory)

…and 3 more.

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