Skip to content

fix: bind the smoke listener deploy job to the commit-App environment - #1794

Merged
c-vigo merged 3 commits into
devfrom
bugfix/1793-bind-smoke-listener-env
Oct 1, 2026
Merged

c-vigo merged 3 commits into
devfrom
bugfix/1793-bind-smoke-listener-env

Conversation

@c-vigo

@c-vigo c-vigo commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

render_commit_app_environment() (assets/init-workspace.sh, #1710) binds a
fixed list of token-minting jobs to DEVKIT_COMMIT_APP_ENVIRONMENT. The
smoke-test listener assets/smoke-test/.github/workflows/repository-dispatch.yml
was not on that list, yet its deploy job mints the commit App token
(secrets.COMMIT_APP_CLIENT_ID / secrets.COMMIT_APP_PRIVATE_KEY). Harmless
while org/repo copies of the COMMIT_APP_* pair still exist, but the
documented end state (docs/MIGRATION.md, "move the secrets ... then remove
the organization/repository copies") would have left the listener's deploy
with no credentials, failing the first step of the next release train's smoke
gate.

"repository-dispatch.yml:deploy" is added to the render list. The function's
existing [[ -f ]] / job-presence guard means this is a no-op on every
non---smoke-test scaffold — the file only ships on the smoke-test overlay.

Audit (acceptance criterion: no other unbound COMMIT_APP-minting job)

grep -rn "secrets\.COMMIT_APP_" assets/ across every shipped workflow,
mapped to the job that owns each create-github-app-token step:

Workflow Job In render list?
sync-issues.yml sync yes
sync-main-to-dev.yml sync yes
prepare-release.yml prepare, rollback yes
prepare-hotfix.yml prepare, rollback yes
release.yml rollback yes
release-core.yml finalize yes
promote-release.yml reset-sync-mirror (mirror-mode render) yes
repository-dispatch.yml deploy was missing — fixed here

repository-dispatch.yml has several other create-github-app-token steps,
but all of them mint RELEASE_APP_*, not COMMIT_APP_* — only deploy was
in scope. No other shipped workflow mints COMMIT_APP_* outside this list.

Changes

  • assets/init-workspace.sh: add "repository-dispatch.yml:deploy" to
    render_commit_app_environment's pair list.
  • tests/workflow_scaffold.py: scaffold() gains a smoke_test kwarg
    (--smoke-test) so render tests can exercise the overlay.
  • tests/test_commit_app_environment.py: two new tests —
    test_smoke_set_binds_the_listener_deploy_job (RED before the fix, GREEN
    after) and test_smoke_unset_leaves_the_listener_unbound (byte-identical
    when the knob is empty). The non-smoke-scaffold case is already covered by
    tests/test_integration.py::TestSmokeRepo::test_default_init_does_not_deploy_repository_dispatch,
    so it isn't duplicated.
  • docs/MIGRATION.md: "Which jobs get the key" list now names
    repository-dispatch.yml (deploy), scoped to --smoke-test scaffolds.
  • CHANGELOG.md (## Unreleased → ### Fixed), mirrored to
    assets/workspace/.devcontainer/CHANGELOG.md by the sync-manifest
    pre-commit hook.

Test evidence

  • uv run pytest tests/test_commit_app_environment.py -v — 50 passed
    (confirmed RED on the new test before the fix: AssertionError, missing
    ('repository-dispatch.yml', 'deploy') from the bound-jobs set).
  • uv run pytest tests/test_vig_os_manifest.py -v — 31 passed.
  • bats --filter "commit-App" tests/bats/init-workspace.bats — both
    actionlint-over-rendered-workflow tests pass unchanged (they don't scaffold
    with --smoke-test, so the mirror-mode "9 token-minting job(s)" count is
    untouched).
  • Manual sanity check: scaffolded a workspace with --force --smoke-test and
    DEVKIT_COMMIT_APP_ENVIRONMENT=commit-app; deploy carries
    environment: 'commit-app' and actionlint passes over the rendered tree.
  • just precommit (prek run --all-files) — green, working tree clean
    afterward.

Refs: #1793

@c-vigo
c-vigo merged commit 9fff73a into dev Oct 1, 2026
25 of 27 checks passed
@c-vigo
c-vigo deleted the bugfix/1793-bind-smoke-listener-env branch October 1, 2026 12:55
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