Skip to content

ci: run global scenarios when test/_global changes #12

Done

Description

@dan-petty

Problem

test-pr.yaml runs no test when a pull request changes only test/_global (for example the sid_usable scenario of #7). Its detect-changes step keeps only the ids that have src/<id>/devcontainer-feature.json, and its comment says that test/_global gives no test. So a pull request that breaks a global scenario passes its checks, and the failure shows only on the push to main or in the weekly test-all.yaml run. The proof of PR #11 needed a test-all.yaml run started by hand on the branch.

Expected

  • When a pull request changes test/_global/**, test-pr.yaml runs npm run test:global (the same step as the test-global job of test-all.yaml), with a job timeout and the same pinned actions.
  • A pull request that changes only a Feature does not run the global scenarios (they take about 5 minutes).
  • Proof: a pull request that changes only test/_global shows a passing test-global check.

Alternatives check of 2026-11-20: not-applicable.
Class: ci, no search.
Tool: none found.

Proposed design

Problem statement

test-pr.yaml starts no test when a pull request changes only test/_global. The detect-changes job keeps only the Feature ids that have src/<id>/devcontainer-feature.json, so a test/_global change gives an empty list. A broken global scenario then passes the pull request checks and fails only on main or in the weekly test-all.yaml run. The change adds a test-global job to test-pr.yaml that runs npm run test:global when test/_global/** changes.

Acceptance criteria

Requirement: Detect a change under test/_global

The detect-changes job of test-pr.yaml SHALL set its global output to true when a pull request changes a path under test/_global/.

Scenario: Pull request that changes only a global scenario

  • WHEN a maintainer opens a pull request that changes only test/_global/sid_usable/test.sh and the live run of test-pr.yaml on that pull request completes
  • THEN the run shows the test-global job as run and successful, and not as skipped

Requirement: Run the global scenarios with the test-all timeouts

The test-global job of test-pr.yaml SHALL run npm run test:global with timeout-minutes: 30 on the job and timeout-minutes: 25 on the step.

Scenario: Global job runs the npm script

  • WHEN the test-global job of test-pr.yaml runs on a pull request that changes test/_global/
  • THEN the job log shows the step npm run test:global and the job result is success

Requirement: Skip the global scenarios for a Feature-only change

test-pr.yaml MUST NOT start the test-global job when a pull request changes only files under src/.

Scenario: Pull request that changes only a Feature

  • WHEN a maintainer opens a pull request that changes only src/<id>/devcontainer-feature.json and the live run of test-pr.yaml on that pull request completes
  • THEN the run shows the test-global job as skipped

Requirement: Keep the Feature jobs for a Feature change

The detect-changes job of test-pr.yaml SHALL keep the features output for a pull request that changes a Feature under src/.

Scenario: Feature-only pull request keeps the Feature jobs

  • WHEN a maintainer opens a pull request that changes only src/<id>/devcontainer-feature.json and the live run of test-pr.yaml on that pull request completes
  • THEN the run shows the test, test-scenarios and podman-host jobs as run

Requirement: Pass actionlint and zizmor with pinned actions

test-pr.yaml MUST pass actionlint and zizmor with every action pinned to a full commit SHA.

Scenario: Workflow validators pass

  • WHEN a maintainer runs uv run devops ci --check --only actionlint,zizmor
  • THEN actionlint and zizmor report no error and no unpinned-uses finding for .github/workflows/test-pr.yaml

Existing Tool Considered

The alternatives check in the issue body records not-applicable for class ci with no search, and it names no tool. dorny/paths-filter v4.0.3, already pinned at .github/workflows/test-pr.yaml:32, is the open and maintained tool that covers a per-job path gate. It lacks a Feature-id computation; the existing ids shell step does that, and it stays as it is. GitHub Actions' own on.pull_request.paths covers the whole workflow only, not one job. The change adds no dependency and writes no new tool code.

Key questions

  • Which step of test-pr.yaml decides which jobs run, and what does it output?: The detect-changes job runs dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 with the filter features: src/**, test/**. It publishes one output, features. The step Get the ids of the changed Features keeps only the ids that have src/<id>/devcontainer-feature.json, so a test/_global change gives features=[]. [sources: .github/workflows/test-pr.yaml:26, .github/workflows/test-pr.yaml:32]
  • How does test-pr.yaml detect a change under test/_global?: Add global: test/_global/** to the filters block of the existing dorny/paths-filter step. Add global: ${{ steps.filter.outputs.global }} to the outputs of detect-changes, and gate the new job with if: needs.detect-changes.outputs.global == 'true'. Keep the workflow-level trigger on: pull_request as it is. (best practice) [sources: .github/workflows/test-pr.yaml:32]
    • Chosen: Extend the existing dorny/paths-filter step. It reuses the action already pinned in the workflow, so each job keeps its own if and the Feature jobs do not change.
    • Rejected: Add on.pull_request.paths at workflow level. A workflow-level filter gates the whole workflow, so a pull request that changes a Feature and a global scenario cannot run both sets of jobs.
    • Rejected: Run the global job on every pull request. The issue requires that a Feature-only pull request skips it, and the scenarios take about 5 minutes.
    • Rejected: Compute the flag in a new shell step from the changed files. It repeats the change detection that the pinned action already does and needs the pull request API.
  • Does a change under test/_global also set the existing features filter, and what happens to the Feature jobs?: Yes. The filter features matches test/**, so test/_global/sid_usable/test.sh sets it to true. The ids step then finds no src/_global/devcontainer-feature.json and writes features=[], so the test, test-scenarios and podman-host jobs skip. Keep that behavior and the filter as it is. [sources: .github/workflows/test-pr.yaml]
  • Which command runs the global scenarios in test-pr.yaml?: npm run test:global, the same command as the test-global job of test-all.yaml. (best practice) [sources: .github/workflows/test-all.yaml]
    • Chosen: Reuse npm run test:global. It is the script that test-all.yaml already runs, so the two workflows cannot drift.
    • Rejected: Call npx devcontainer features test directly. It repeats the arguments of the npm script and drifts when the script changes.
  • Which timeout-minutes values does the new job set?: timeout-minutes: 30 on the job and timeout-minutes: 25 on the npm run test:global step, the values of the test-global job of test-all.yaml. (best practice) [sources: .github/workflows/test-all.yaml, README.md:41]
    • Chosen: 30 on the job and 25 on the step, same as test-all.yaml. The two jobs run the same command on the same runner, and equal values stop a drift between them.
    • Rejected: 15 on the job and 15 on the step. It differs from the existing job with no reason and gives a slow runner less headroom than the command already has.
    • Rejected: 60 on the job and 50 on the step. A hung job holds a runner twice as long as the existing job allows.
  • Which actions, pins and steps does the new job copy?: It copies the steps of the test-global job of test-all.yaml: checkout with actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 and persist-credentials: false, then npm ci, then the guarded npm run test:global step. (best practice) [sources: .github/workflows/test-all.yaml, .github/workflows/test-pr.yaml]
    • Chosen: Copy the full-SHA pin of test-all.yaml. The issue asks for the same pinned actions, and zizmor's unpinned-uses audit passes.
    • Rejected: Use the tag actions/checkout@v7. A tag is not a full commit SHA; zizmor reports unpinned-uses, and the issue requires the same pins.
    • Rejected: Call the CLI from the runner image and skip npm ci. The CLI version then comes from the runner image and drifts from package-lock.json.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/infra
    status/new
    value/medium
    effort/low
    on Nov 19, 2026
  2. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor
  3. added
    priority/p2-medium
    on Nov 19, 2026
  4. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  5. changed the title [-]ci: run the global scenarios in pull requests that change test/_global[/-] [+]ci: run global scenarios when test/_global changes[/+] on Nov 19, 2026
  6. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    The job shortened the title of this item. The summary had 66 characters, and the limit is 60. The type and the scope stay.

    • Before: ci: run the global scenarios in pull requests that change test/_global
    • After: ci: run global scenarios when test/_global changes
    • Source of the summary: the background model
  7. added
    status/ready
    and removed
    status/new
    on Nov 20, 2026
  8. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  9. added
    owner/service
    and removed
    owner/service
    on Nov 26, 2026
  10. 23 remaining items

  11. added
    status/blocked
    status/planned
    and removed
    owner/service
    status/in-progress
    status/blocked
    on Nov 27, 2026
  12. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Cleared the stop at job by the rule continue: the runner Job devops-cli-implement-devcontainer-features-12-3e3781 ended without a result. The class ci_infra of the stop is one that a new attempt can fix. This is continuation 2 of 4 for this item. The item is Planned again. The Service takes it in the next round. The new Job takes the branch from origin, so it keeps the work that the run pushed there.

  13. added
    owner/service
    status/in-progress
    status/in-review
    and removed
    status/planned
    status/in-progress
    on Nov 27, 2026
  14. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    The draft pull request #29 holds the final title and body. In mode on of roadmap.fix_checks.mode, the watch row marks it ready when its checks pass, and a fix-checks Job repairs a failed check whose name gives the class test, lint or types. In each other case the watch row stops the item: another failed check, a cancelled check, a conflict, a fix-checks Job that ended with no repair, or another mode.

    Spend: 50 model requests, 1866968 input tokens, 14142 output tokens.

  15. removed
    owner/service
    on Nov 27, 2026
  16. removed
    status/in-review
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumtype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions