Skip to content

ci(pi): derive promotion versions from canonical policy - #937

Merged
SUaDtL merged 6 commits into
mainfrom
codex/review-pi-promotion-oct7
Oct 9, 2026
Merged

SUaDtL merged 6 commits into
mainfrom
codex/review-pi-promotion-oct7

Conversation

@SUaDtL

@SUaDtL SUaDtL commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Pi promotion generated workflow edits that GitHub's built-in token cannot push. CI now reads supported Pi versions from the canonical compatibility descriptor, and promotion excludes workflows from its write and staging scope. This implements DEC-08 without adding credentials or changing release policy.

Promotion also inserted release headings above Unreleased. The generator now preserves that section and historical entries, inserting the new release between them.

Validation:

  • Workflow-write/policy regressions and three changelog regressions failed before their fixes. Fresh verification after integrating main passed 74 promotion tests, 56 installer/generator/trust-policy tests, typecheck and whitespace checks.
  • Independent coverage, security and Auth/Crypto reviews passed. Staged secret scans passed. This PR adds no version bump.
  • Reviewed head 8806acd53cbee0edce57cadbdb36ce2da5b06446 passed all 78 hosted checks, including merge readiness, in CI run 37866366349.
  • At the pre-merge baseline, deterministic Pi 1.1.0 preparation preserved Unreleased, inserted 0.17.2 before 0.17.1, and left workflow files unchanged.
  • The installed ADR verifier selected squash for base 97a2ea0fb1dd2983f2757f680cfb9a359cbf69aa and the reviewed head. Ancestry and hosted checks were revalidated before merging as af741255ab199f8465f4ea9ee8c5c178836fcc7e.
  • At that merge commit, postmerge CI passed with 65 successful jobs and 6 skips, including all 6 native platform jobs and 18 cold-package jobs. CodeQL passed. Automatic release planning completed successfully with all four targets ineligible and published nothing.

The first authorized live Pi 1.1.0 promotion exercise failed during source-metadata capture on all three platforms because the exact npm record omits gitHead. PR #940 repaired capture under ADR-0035's existing PENDING_REVIEW boundary and merged as bafe761bac1881438c6deed781668eb8f853ed70. Its local 48-test suite and real 148-entry pending capture passed, followed by successful hosted and postmerge checks.

The second authorized exercise captured Pi 1.1.0 successfully on all three platforms, then failed validation because the reviewed Pi 1.0.2 runtime checks ran after the prospective descriptor changed to 1.1.0. PR #941 separates those validation phases and corrects the broker close test's handling of ECONNRESET. It is open at 9286ddbe1998a2ecef272ddc01ae2e9cf829ee31, with hosted checks still running.

Both exercises skipped the draft-PR job. No candidate branch or PR was created, and no candidate code was installed or executed. The captured dependency graph remains PENDING_REVIEW; the remote draft-PR push path remains unverified.

The exercise authorizes only a draft dependency-review PR. It does not authorize merging the generated candidate, tagging or manually publishing a release.

Promotion PRs cannot push workflow edits with GitHub's built-in token.
Read the existing Pi support policy in CI and remove workflow files from
promotion's write scope. Preserve reviewed host locks and permissions.
Refresh only the unchanged CI claim's provenance hash after re-scouting it.
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Central YAML (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2e2679c2-0ce9-43c8-9477-56ef65e91f15
📥 Commits

Reviewing files that changed from the base of the PR and between 97a2ea0 and 8806acd.

📒 Files selected for processing (8)
  • .codearbiter/.provenance/code-map.json
  • .github/pi-promotion-targets.json
  • .github/scripts/pi_promotion.py
  • .github/scripts/test_ci_impact.py
  • .github/scripts/test_pi_package.py
  • .github/scripts/test_pi_promotion.py
  • .github/workflows/ci.yml
  • .github/workflows/pi-promotion.yml
💤 Files with no reviewable changes (1)
  • .github/pi-promotion-targets.json

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The CI workflow previously used a fixed Pi version for its tools matrix and coverage runtime. It now reads supported versions and the last-verified version from the promotion policy. Promotion no longer writes or stages the CI workflow, and release changelog insertion preserves the Unreleased section.

Changes

Pi policy and promotion

Layer / File(s) Summary
Policy outputs and CI version selection
.github/scripts/pi_promotion.py, .github/workflows/ci.yml, .github/scripts/test_ci_impact.py, .github/scripts/test_pi_package.py, .github/scripts/test_pi_promotion.py, .codearbiter/.provenance/code-map.json
The policy command outputs supported_versions. CI uses that list for the Pi tools matrix and last_verified for coverage. Tests check the output contract, supported and invalid version sets, and policy-driven matrix selection.
Promotion write scope
.github/pi-promotion-targets.json, .github/scripts/pi_promotion.py, .github/scripts/test_pi_promotion.py, .github/workflows/pi-promotion.yml
Promotion targets, the official write-path allowlist, and staging no longer include .github/workflows/ci.yml. Tests check workflow preservation and rejection of an unapproved workflow target.
Release changelog insertion
.github/scripts/pi_promotion.py, .github/scripts/test_pi_promotion.py
When an [Unreleased] heading exists, the new release entry is inserted after its content and before the next heading. Tests cover empty and populated Unreleased sections and release history.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Policy as pi_promotion.py
  participant ChangesJob as CI changes job
  participant ToolsJob as ca-pi-tools
  participant CoverageJob as Pi coverage job
  ChangesJob->>Policy: Run policy command
  Policy-->>ChangesJob: Return supported_versions and last_verified
  ChangesJob->>ToolsJob: Set pi-versions matrix
  ChangesJob->>CoverageJob: Set last-verified runtime
Loading

Merge Risk: ⚪ Minimal · up to 8806a

No actionable merge-blocking issue remains from this review. The policy step runs after checkout.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 4 files. (3 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately and concisely describes the main change: deriving Pi promotion versions from the canonical policy.
Full details: Docstring Coverage

Explanation

Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 4 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

SUaDtL added 5 commits October 7, 2026 16:42
The package contract still required the obsolete literal runtime matrix.
Verify the canonical policy output instead and reject a regression back to
hard-coded versions while retaining the existing executable job guards.
Promotion inserted its release heading above pending changes, violating the
release helper's required changelog order. Retain that section and all older
history while placing the new release between them.

CHANGELOG: Preserve Unreleased when preparing Pi promotion release notes.
Bring the reviewed factual documentation changes into the promotion branch
so final hosted validation runs against current main. The promotion source
and its reviewed changelog regression remain unchanged.
Keep the existing promotion repair current with the completed engine
performance group while preserving its reviewed workflow and helper changes.
The merge carries the already reviewed main sources without new behavior.
Bring the branch up to current main for strict merge readiness. The three
incoming site files retain the already-reviewed installer hash validation
unchanged; the Pi promotion implementation is unchanged.

Verify the integration with focused promotion and installer tests,
TypeScript checking, source equality and independent security review.
@SUaDtL
SUaDtL merged commit af74125 into main Oct 9, 2026
@SUaDtL
SUaDtL deleted the codex/review-pi-promotion-oct7 branch October 9, 2026 01:20
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