Repository navigation
Description
What
ci-lint precheck on origin/master (pin a1917ce7…) reports 11 violation(s), 491 approved exception(s), 10 needs_review. The violation floor is structural, but the GEN-005 (shell budget) baseline is still 358 findings, and each is a run: step that should be one call into a Python module.
This is the first unit of that burn-down, chosen because it is a single self-contained step whose callers all run on Linux:
.github/actions/generate-docs/action.yaml runs.steps[0] (id: setup) is a 30-line shell block:
- greps
LIBOBS_API_{MAJOR,MINOR,PATCH}_VERout oflibobs/obs-config.h, reshapes it withsed/trand splits it withreadinto three variables; - rewrites
docs/sphinx/conf.pywith threesed -i -Eexpressions (version,release,copyrightwith the current year); - optionally blanks
html_link_suffix, and appendsartifactName/commitHashto$GITHUB_OUTPUT.
[GEN-005] APPROVED EXCEPTION .github/actions/generate-docs/action.yaml — runs.steps[0]: run: step violates the shell budget (more than one line; control syntax (;, |, $(, <<); leading if/for/while).
Scope of this unit (one PR)
- RED:
ci/test_docs_version_stamp.pypins the port: the step is oneuv run --no-project --script ci/docs_version_stamp.pyline, the module stampsconf.pyfrom a fixtureobs-config.hand writes the two step outputs, the action installs uv before the call, andci.tomlhas no GEN-005 exception for that path. - GREEN:
ci/docs_version_stamp.py(stdlib only,#!/usr/bin/env -S uv run --script), the action step becomes one line,astral-sh/setup-uvis added to the action with the repo'ssave-cache/cache-suffixexpressions (thecompatibility-validatorprecedent, CACHE-013), and the[[exceptions]]block is deleted.
RED/GREEN is the precheck header: 491 → 490 approved exceptions, with the GEN-005 … generate-docs line gone and no new finding.
Why this step and not another
- The three callers (
ci.yml,push.yaml,dispatch.yaml'supdate-documentationjobs) run on a bareubuntu-26.04with nouv, so the action installs it itself — the same shapecompatibility-validatoralready uses, so the cache/family rules are unchanged. - The port is behaviour-preserving: same version parsing, same three
sedsubstitutions, same two outputs, no dialog and no new dependency. ci-pre.yml-style traps (stock distro containers with neither Python nor uv) do not apply here, and neither does.github/scripts/retry(bootstrap shell).
Not in this unit
The other 357 GEN-005 findings (the large build-project.yaml, release-rust.yaml, appimage.yaml blocks and the PowerShell helper trees). Each is its own path-scoped unit; .github/scripts/build-*, package-* and the .ps1 helpers need a per-caller check on whether the interpreter exists where they run, before they can be claimed.
Verified: ci-lint precheck header on origin/master, the step text, the three call sites, and ci/test_uv_run.py's allowlist (the action's line carries the literal uv run, so TOOL-003 is satisfied). Not verified: an actual docs run on a GitHub runner (the update-documentation job is gated on repository_owner == 'obsproject', so PR CI never executes it).
Activity
zackees commentedon Oct 27, 2026
/ready
Checked against the definition of Ready (WORKFLOW.md):
.github/actions/generate-docs/action.yamlruns.steps[0]becomes a single call intoci/docs_version_stamp.py, and the file's[[exceptions]]GEN-005 block is deleted.GEN-005 … generate-docsline is gone with no new finding,ci/test_docs_version_stamp.pypasses, andci/test_uv_run.py/CACHE-013 pins stay green.Decision needed:— the port is behaviour-preserving (same parsing, same substitutions, same two step outputs); uv is installed by the action itself, thecompatibility-validatorprecedent, so no cache policy changes.infra,P2,size:S; one PR.Infra/CI-only change, so no
docs/features.mdline.zackees commentedon Oct 27, 2026
Claiming: GEN-005 generate-docs \u2014 port the version stamp to Python (branch
infra/2681-gen-005-generate-docs)Plan (one PR):
0ced87273:ci/test_docs_version_stamp.pypins the shape and the behaviour (module stampsconf.pyfrom a fixtureobs-config.h, writesartifactName/commitHash, action installs uv, exception gone). Fails on master: module absent, step still shell, exception present.ci/docs_version_stamp.py(stdlib only), the step becomes oneuv run --no-project --script ci/docs_version_stamp.pyline,astral-sh/setup-uvadded with the repo'ssave-cache/cache-suffixexpressions, GEN-005 exception deleted.ci/test_*sweep.zackees commentedon Oct 27, 2026
Landed: #2682 merged into
masteras8b84251(2026-10-27 19:50Z).What changed:
.github/actions/generate-docs/action.yaml's 30-linesetupshell block is now oneuv run --no-project --script ci/docs_version_stamp.py …call; the action installs uv first (all three callers run on a bareubuntu-26.04);ci/test_docs_version_stamp.pyis the pin and the file's GEN-005[[exceptions]]block is gone.Measured header:
ci-lint precheckonmasterat 3edfaac read 11 violations / 491 approved exceptions / 10 needs_review; after the merge (8b84251) it reads 11 / 490 / 10.Nothing left on this unit. The remaining GEN-005 approved exceptions are the next worker unit.
zackees commentedon Oct 27, 2026
Closed: the unit landed in #2682 (
8b84251), and the measured header on master is nowci-lint precheck: 11 violation(s), 490 approved exception(s), 10 needs_review(was 491 before the merge). The GEN-005generate-docsexception is gone; the rest of the GEN-005 burn-down is separate path-scoped units, not this issue.ci: One Python call stamps the Sphinx docs version (GEN-005, refs obs…