Repository navigation
Description
Location
ci-lint precheck on origin/master (2dddbe15a) reports four GEN-005 findings for
.github/workflows/ci.yml, all of them multi-line run: blocks:
| Job | Step | What |
|---|---|---|
flatpak-runtime-reuse |
steps[2] Record Export Provenance |
gh api run-id validation, writes FLATPAK_ARTIFACT_SOURCE / FLATPAK_ARTIFACT_RUN to $GITHUB_ENV |
flatpak-runtime-reuse |
steps[4] Install Runtime Test Infrastructure |
sudo -E uv run --no-project ci/host_apt_mirrors.py, apt-get update, apt-get install of the Flatpak/PipeWire test packages |
flatpak-runtime-reuse |
steps[5] Run Installed Flatpak with Saved Capture Profile |
tar -xf the downloaded OSTree repo, then uv run --no-project ci/flatpak_runtime.py --repo … --output … |
tier2-setup-consumer |
steps[8] Validate Prepared OFF and ON Suites |
mkdir, tar --zstd -xf the tree, read bundle.json's image_id, one docker run of rust/tools/linux-validate/validate.sh with OBS_TIER2_MODES=OFF ON |
Header before: 5 violation(s), 360 approved exception(s), 10 needs_review.
Why GEN-005
The rule's shell budget is one line per run:; each of these four is control flow
(if/case-style validation, package installation, archive extraction, a docker run
whose arguments are built from a JSON file). The established fix in this tree is one repo
module with a subcommand per step, called as a single uv run --no-project --script …
line — the shape of #2824 (ci/scheduled_steps.py), #2827 (ci/push_release.py) and
#2820 (ci/windows_signing.py).
Proposed fix
ci/ci_gate_steps.py with four subcommands, each one step's argv and exit status:
record-export-provenance— the numericSOURCE_RUNcheck,gh api repos/$GITHUB_REPOSITORY/actions/runs/$RUN --jq .head_sha, the 40-hex check, then the
two$GITHUB_ENVlines.install-runtime-deps—host_apt_mirrors.pyundersudo -E, then the twoapt-get
invocations with their retry/timeout options unchanged.run-saved-capture-profile—tar -xfplusflatpak_runtime.pywith--repo/--output.validate-prepared-suites— thetar --zstdextraction, theimage_idread, and the
docker runwith the same--mount/--envset (including--env OBS_TIER2_MODES=OFF ON).
The two command -v uv mounts stay host-resolved by the module (shutil.which('uv')), so
the container still gets the runner's uv and no bare python3 token appears on a
workflow line (TOOL-003).
RED and GREEN
- RED:
ci/test_ci_gate_steps.py— asserts each of the four steps is a single
uv run --no-project --script …line with norun: |, and drives each subcommand on
stubs (a fakegh,apt-get,tar,dockeronPATH) comparing argv and exit status
with the step's shell block. Fails on master. - GREEN: the module, the four single-line steps, and the
GEN-005[[exceptions]]block
for.github/workflows/ci.ymldeleted. Header after:5 violation(s), 356 approved exception(s), 10 needs_review(no other rule moving).
Evidence limits, stated up front
Both jobs are workflow_dispatch-gated: flatpak-runtime-reuse needs
inputs.flatpak-runtime-reuse-run, tier2-setup-consumer is skipped by
inputs.native-cache-measurement-only. PR CI never runs either, so the acceptance
evidence is the offline pins plus ci/local_gate.py --only self-test and the precheck
header, not a remote run.
Refs #962.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 28, 2026
Claiming: investigation
run:steps in.github/workflows/ci.ymltoci/ci_gate_steps.py, one subcommand per step, withci/test_ci_gate_steps.pyas the RED (it fails on master: fourrun: |blocks, no module) and the GREEN being the module plus the four single-lineuv run --no-project --scriptsteps.GEN-005[[exceptions]]block; RED/GREEN is the precheck header,5 violation(s), 360 approved exception(s)->5 violation(s), 356 approved exception(s), no other rule moving.workflow_dispatch-gated, so PR CI cannot run them; the evidence is the offline pins plusci/local_gate.py --only self-test, and I will say so in the PR.First PR: today, a draft with the RED commit.
zackees commentedon Oct 28, 2026
/ready
Definition of Ready: the four findings are enumerated by
ci-lint precheckwith job/step indices, the fix shape is the repo's own (ci/scheduled_steps.py,ci/push_release.py), RED/GREEN is measurable offline, and the file scope is one workflow plus its ci.toml block. Acceptance is stated (header 360 -> 356 approved, no other rule moving) and the evidence limit (both jobs areworkflow_dispatch-gated) is named up front.ci(ci.yml): run the four block steps as one Python call each (GEN-005, …
zackees commentedon Oct 28, 2026
Claiming: the four ci.yml block steps (GEN-005 port)
PR #2852, draft, with the RED and GREEN commits already in it.
50ed624e8isci/test_ci_gate_steps.pyalone: on master it fails 17 cases and errors twice (no module,run: |still in both jobs, the path's GEN-005 block still inci.toml).2c7d6f146addsci/ci_gate_steps.py(record-export-provenance,install-runtime-deps,run-saved-capture-profile,validate-prepared-suites), the four single-line steps, and deletes the block.Header measured on this branch:
5 violation(s), 360 approved exception(s), 10 needs_review->5 violation(s), 356 approved exception(s), 10 needs_review, no other rule moving.ci/local_gate.py --only self-testisokover 294 files.Two pre-existing pins drove the ported steps as shell and are repointed in the same commit:
ci/test_host_apt_failover.py(module driven under the samesudo/apt-getstubs; failover at mirror/update/install still propagates 42) andci/test_flatpak_runtime.py(the two published variables are read from the module). Both jobs areworkflow_dispatch-gated, so PR CI cannot run either — the PR says so rather than claiming a remote run.ci(ci.yml): run the four block steps as one Python call each (GEN-005, …