Repository navigation
ci: port the macOS analysis steps to ci/analyze_project.py, clearing the analyze-project GEN-005 block (#3040) - #3043
Merged
Conversation
The workflow still carries three multi-line zsh steps and its ci.toml GEN-005 exception, so this pin fails on master and passes once ci/analyze_project.py and the single-call steps land.
`.github/workflows/analyze-project.yaml` carried four GEN-005 findings: a `defaults.run.shell: pwsh` in the disabled PVS-Studio job (which has no `run:` step at all) and three multi-line zsh steps in the macOS job. The three steps are now one call each: uv run --no-project --script ci/analyze_project.py setup uv run --no-project --script ci/analyze_project.py build uv run --no-project --script ci/analyze_project.py merge-sarif setup switches Xcode, uninstalls the (currently empty) unwanted Homebrew formula list, creates the DerivedData compilation cache and writes xcodeCasPath to $GITHUB_OUTPUT. build assembles the analyzer argv, refreshes origin and runs .github/scripts/build-macos. merge-sarif flattens the analyzer plists and merges them, keeping the old jq program's shape: first $schema/version, the first driver without rules, de-duplicated rules and artifacts, every result, and zero endLine/endColumn removed. The macos job gains a pinned setup-uv step (master-only save, pr-<N> cache-suffix) because the steps now need uv on a runner that installed none. ci-lint precheck: 4 violation(s), 368 approved exception(s), 2 needs_review -> 4 violation(s), 364 approved exception(s), 2 needs_review.
zackees
marked this pull request as ready for review
October 30, 2026 10:02
Member
Author
|
Handed off to the coordinator. PR CI is green ( Precheck moved |
This was referenced Oct 30, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3040
.github/workflows/analyze-project.yamlcarried fourGEN-005findings, all recorded in one path-scopedci.tomlapproved exception:jobs.windows.defaults.run.shell: pwsh— the PVS-Studio job has norun:step at all (every step isuses:), so the shell line was dead configuration.jobs.macos.steps[1]Set Up Environmentjobs.macos.steps[3]Build OBS Studiojobs.macos.steps[4]Compile Analytics DataThe three macOS steps are now one call each, so the whole block leaves the baseline:
ci/analyze_project.pysetup—sudo xcode-select --switch /Applications/Xcode_26.5.app/Contents/Developer, the step's Homebrew cleanup (itsunwanted_formulasarray is empty upstream, so the uninstall is a no-op today but stays supported),mkdir -pofLibrary/Developer/Xcode/DerivedData/CompilationCache.noindex, andxcodeCasPath=appended to$GITHUB_OUTPUT(the build step'sXCODE_CAS_PATH).build—--config Debug --target macos-arm64 --codesign --analyze, plus--debugwhenRUNNER_DEBUGis set;git fetch origin --no-tags --no-recurse-submodules -q; then.github/scripts/build-macoswith that argv.merge-sarif— flattensanalytics/StaticAnalyzer/obs-studio/**/*.plisttoanalytics/<name>.sarifand reproduces the step'sjq -sprogram in Python: first$schema/version, the firsttool.driverwithoutrules, the concatenated de-duplicatedrulesandartifacts, everyresultsentry, andcodeFlows[].threadFlows[].locations[].location.physicalLocation.region.endLine/endColumndropped where they are0.The
macosjob gains a pinnedastral-sh/setup-uvstep (the samebec219d2v10.1.0 the other jobs use, master-only save plus thepr-<N>cache-suffix) because the ported steps needuvon a runner that installed none. The permanently disabled PVS-Studio job is otherwise untouched.RED —
4791138d3ci/test_analyze_project.pyalone. On master it fails on the workflow shape (run: |present,shell: pwshpresent, steps are not module calls) and on theci.tomlblock.GREEN —
93f8354f6Module, workflow edit and the
ci.tomlblock deletion together.ci-lint precheckheader:4 violation(s), 368 approved exception(s), 2 needs_review4 violation(s), 364 approved exception(s), 2 needs_reviewNo
GEN-005finding remains for.github/workflows/analyze-project.yaml, and no other rule moved. The four remaining violations are the documented structural floor (CACHE-004,GEN-004,SEC-003,WF-003).Evidence
uv run --no-project python -m unittest ci/test_analyze_project— 13 tests, OK. Includes a differential run of the verbatim oldjq -sprogram againstmergeon two analyzer reports (shared rule, shared artifact, one zero-sized code-flow region) whenjqis on PATH; the merged documents compare equal, and the rules/artifacts/results counts match.uv run --no-project ruff check ci/analyze_project.py ci/test_analyze_project.py— clean.uv run ci/local_gate.py --only self-test— one unrelated, pre-existing failure:ci/test_check_changes.py::OutputsTest::test_outputs_are_written_to_the_step_filedies withgit: command not foundfrom the module's own subprocess on this NixOS host. It reproduces identically on unmodifiedorigin/masterin this checkout, so it is environmental and not caused by this PR.Not verified here
No PR lane runs
analyze-project.yaml(it isworkflow_callfromscheduled.yamlonly), and this host is Linux with no Xcode, so thesetup/buildsubcommands are exercised against a recording runner and their argv/output contract, not against a real macOS runner. The first real clang-analyze run after merge is the acceptance check for the composed steps;merge-sarifis additionally proven against the oldjqoutput above.