Skip to content

fix(ci): Use the approved source-promotion token - #38

Merged
offendingcommit merged 1 commit into
mainfrom
fix/source-promotion-token
Sep 23, 2026
Merged

offendingcommit merged 1 commit into
mainfrom
fix/source-promotion-token

Conversation

@offendingcommit

@offendingcommit offendingcommit commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Change

Replace the two GitHub App-token minting steps with secrets.SOURCE_PROMOTION_TOKEN, passed as GH_TOKEN only to the immutable-release control and guarded source-promotion steps. Both refuse missing credentials before any operation.

A GitHub App is not a publication requirement. Preserve Administration-read immutable-release verification, the tested source/tag/parent and payload checks, the atomic guarded push and retry handling, PyPI OIDC, and registry-byte verification before the discoverable receipt. The ordinary workflow token remains read-only in the privileged jobs; there is no automatic fallback or branch-policy bypass change.

Approved environment configuration completed

At Jonathan's direction, the existing authenticated GitHub credential was transferred directly in memory/stdin to the source-promotion environment as SOURCE_PROMOTION_TOKEN. No plaintext file, argv token or log output was used. Before provisioning, environment deployment access was restricted to the main branch only; that configuration and secret metadata were verified.

The credential retains its existing underlying scopes: environment restriction limits its availability, not its authority. Repository rulesets were not modified. No App ID/private key is needed. No workflow was dispatched, source/tag pushed to main, or package published as part of this repair.

Verification

  • just test: 266 tests run, OK with 17 native-Hermes skips; the pinned-host lane runs in CI.

  • actionlint and yamllint pass for all three workflows.

  • Real immutable-release step passes with the existing credential and an empty gh configuration directory, without App variables or cached login.

  • Actual promotion shell script exercised against disposable local Git remotes: missing credential refusal, verified atomic source/tag push, idempotent resume, stale-parent refusal. No production refs touched.

  • Replaced implementation-specific App assertions with executable fail-closed gate tests for absent credentials, disabled immutability and API failure.

  • The same existing credential also authenticated an explicit Git receive-pack/dry-run push with credential-helper selection forced to gh; no production ref was created or changed.

Action audit

The named github-actions-latest Codex plugin is not installed in the available plugin/skill locations. Equivalent audit used GitHub's current stable-release API and resolved immutable commit SHAs for every action across .github/workflows/; major-version release notes were reviewed. All six remaining action repositories now use their latest stable SHA: checkout v7.0.1, setup-uv v10.2.0, upload-artifact v7.0.1, download-artifact v8.0.1, setup-just v4, pypi-publish v1.14.2. Download digest mismatches now fail by default; setup-uv's newer default no longer prunes its cache.

Review and publication boundary

This corrects the unnecessary App-only prerequisite recorded in offendingcommit/infra#959 and offendingcommit/hermes-agent-runtime-image#32. A successful published wheel and final receipt remain required for live-plugin bundle qualification. SEMANTIC_RELEASE_ENABLED was already true and was not changed: merging may run the normal release pipeline. No merge or live handoff is authorized by this PR.

Replace App-token minting with an environment-scoped credential while
preserving immutable-release, exact-source, atomic-push, OIDC and
published-byte checks. Refuse empty credentials before any operation.

Document main-only environment access and the distinction between token
availability and underlying permissions. Replace App-specific assertions
with executable fail-closed authentication/control regressions.

Audit all workflow actions against current stable releases and update
stale SHA pins. Validate with actionlint, yamllint, 266 tests (17 native
Hermes skips), a real read-only API gate and disposable Git promotion
scenarios covering successful, resumed and stale-parent transactions.
@offendingcommit
offendingcommit merged commit 70f0246 into main Sep 23, 2026
6 checks passed
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