Skip to content

ci(image): add path-filtered image workflow, delete old jobs #7330

Backlog

Description

@devops-cli-service

Split from #1858.

Problem: The image checks of .github/workflows/ci.yml still find their changed paths with hand-written git diff steps, fetch-depth: 0 and guards. The smoke checks are shared in .github/actions/image-smoke after this item, but the checks still run in ci.yml. This part moves them to .github/workflows/image.yml with the native on.pull_request.paths deny-list and deletes the old jobs. Why deferred: The shared smoke action must land first. The old and new workflows run together during the rollout. The old tests and documents need the new action. Acceptance criteria: 1. .github/workflows/image.yml SHALL have on.pull_request.paths with ['', '!docs/', '!openspec/', '!/*.md', '!k8s/**'], workflow_dispatch, contents: read, security-events: write, and a concurrency group. 2. The workflow SHALL have two jobs: Image Service for service, and Image Runner for runner, mcp-server and uv-seed. The runner job SHALL call the smoke action for runner and mcp-server and keep the uv-seed seed check. 3. The workflow SHALL use the current timeouts: service job 12 min, runner job 18 min, bake 12 min, scan 4 min. 4. .github/workflows/ci.yml SHALL delete the service-image and mcp-server-image jobs, their Detect steps, their guards, and their fetch-depth: 0 checkout. 5. tests/invariants/test_architectural_invariants.py SHALL delete the image path filter test and the IMAGE_CONTENT_PATHS lists. 6. docs/SDLC.md SHALL name image.yml as the path-filtered image check. The documents that name the old jobs SHALL name the new jobs. Proof: uv run devops ci --check --only actionlint,zizmor exits 0 with no finding for image.yml and ci.yml. uv run devops ci --check --only docs exits 0. A pull request that changes only docs/ starts no image.yml run. A pull request that changes an image input starts it and the jobs pass.

Proposed design

Problem statement

The image checks in .github/workflows/ci.yml find changed paths with hand-written git diff steps, full history and guards. This item moves the checks to .github/workflows/image.yml with the native path filter. It deletes the old jobs and updates the invariant test and the documents.

Acceptance criteria

Requirement: Image workflow trigger and permissions

The image workflow SHALL have on.pull_request.paths with ['**', '!docs/**', '!openspec/**', '!**/*.md', '!k8s/**'], workflow_dispatch, contents: read, security-events: write and a concurrency group.

Scenario: Docs-only pull request starts no image workflow

  • WHEN A pull request changes only files under docs/ and uv run devops ci --check --only actionlint,zizmor runs.
  • THEN The Actions run list shows no image.yml run, and the command exits 0 with no finding for image.yml.

Requirement: Image workflow jobs

The image workflow SHALL define an Image Service job for the service image and an Image Runner job for the runner, mcp-server and uv-seed images; the runner job SHALL call the shared smoke action for runner and mcp-server and SHALL keep the uv-seed seed check.

Scenario: Image input starts both image jobs

  • WHEN A pull request changes an image input and image.yml runs.
  • THEN The Image Service job and the Image Runner job run, the runner job calls the shared smoke action for runner and mcp-server, the uv-seed seed check passes, and uv run devops ci --check --only actionlint,zizmor exits 0 with no finding for image.yml.

Requirement: Image workflow timeouts

The image workflow SHALL keep the current timeouts: 12 minutes for the service job, 18 minutes for the runner job, 12 minutes for the bake step and 4 minutes for each scan step.

Scenario: Image jobs keep their time limits

  • WHEN image.yml runs on a pull request that changes an image input.
  • THEN The Image Service job ends within 12 minutes, the Image Runner job ends within 18 minutes, the bake step ends within 12 minutes, and each scan step ends within 4 minutes.

Requirement: Old image jobs removed from CI

.github/workflows/ci.yml SHALL delete the service-image and mcp-server-image jobs, their Detect Image Content Changes steps, their guards and their fetch-depth: 0 checkout.

Scenario: CI workflow has no image jobs

  • WHEN A pull request changes an image input and uv run devops ci --check --only actionlint,zizmor runs.
  • THEN The command exits 0 with no finding for ci.yml, and the Actions run list shows no image job from ci.yml for that pull request.

Requirement: Image path filter test removed

tests/invariants/test_architectural_invariants.py SHALL delete the image path filter test and the IMAGE_CONTENT_PATHS lists.

Scenario: Invariant test has no image path filter

  • WHEN uv run pytest tests/invariants/test_architectural_invariants.py -k image_path_filter runs, and rg -n IMAGE_CONTENT_PATHS tests/invariants/test_architectural_invariants.py runs.
  • THEN pytest exits 5 with no test collected, rg exits 1 with no match, and uv run pytest tests/invariants/test_architectural_invariants.py exits 0.

Requirement: Image workflow documentation

docs/SDLC.md SHALL name image.yml as the path-filtered image check, and each document that names the old image jobs SHALL name the new jobs.

Scenario: Documentation check passes

  • WHEN uv run devops ci --check --only docs runs.
  • THEN The command exits 0, and docs/SDLC.md names image.yml as the path-filtered image check.

Existing Tool Considered

No alternatives check has run. GitHub Actions' native on.pull_request.paths filter covers the need. The open dorny/paths-filter action filters changed files inside a job, not the whole workflow, so it is not used for this gate. The plan writes no custom path-detection code.

Key questions

  • Which path-filter mechanism should the image workflow use?: Use the native on.pull_request.paths deny-list in .github/workflows/image.yml. Do not keep the hand-written git diff step and do not add dorny/paths-filter for this gate. (best practice) [sources: .github/workflows/ci.yml]
    • Chosen: Native on.pull_request.paths. The platform filters the whole workflow before jobs start and removes the fetch-depth: 0 and guard steps.
    • Rejected: dorny/paths-filter. It adds a job step and a pull-requests read permission. The issue asks for the native filter.
    • Rejected: Hand-written git diff. It needs fetch-depth: 0 and guard steps. The issue deletes them.
  • Which timeouts should the moved image jobs keep?: Keep the current limits: service job 12 minutes, runner job 18 minutes, bake 12 minutes and scan 4 minutes. [sources: .github/workflows/ci.yml]
  • Should the image workflow keep the contents: read and security-events: write permissions?: Yes. The jobs read the repository and upload SARIF to code scanning, as the current image jobs do. (best practice) [sources: .github/workflows/ci.yml]
    • Chosen: Keep contents: read and security-events: write. The jobs need read access to the repository and write access for SARIF upload.
    • Rejected: Use contents: write. No job writes to the repository.
    • Rejected: Use security-events: read. The SARIF upload needs write access.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    ContributorAuthor
    • Scope: none. The title has the scope image, and .github/labels.yml declares no scope/image label. Add the label to the file to give the scope to this item.
    • Related: perf(ci): move the Design Tokens check into a filtered workflow #4934, which asks for a different change. Both move a check from ci.yml into its own workflow with native on.pull_request.paths, but the candidate targets image build jobs while #4934 targets the Design Tokens check.
  3. changed the title [-]ci(image): add the path-filtered image workflow and delete the old image jobs[/-] [+]ci(image): add path-filtered image workflow, delete old jobs[/+] on Nov 26, 2026
  4. devops-cli-service commented on Nov 26, 2026

    @devops-cli-service
    ContributorAuthor

    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(image): add the path-filtered image workflow and delete the old image jobs
    • Source of the summary: the background model
  5. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    ContributorAuthor

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

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/mediumpriority/p2-mediumsource/agentstatus/newtype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions