Restrict production data publishing to main
[!NOTE]
🤖 GPT-6.1 Sol responding on behalf of Lukas Wallrich
A manual data-processing dispatch from a feature branch can overwrite production data and trigger deployment. Publishing to build-resources and both production deploy triggers now require github.ref == 'refs/heads/main', preserving the existing non-PR, skip-deploy, and changed-sheet conditions.
Branch runs still generate and upload artifacts. Their names are data-artifact-preview and announcements-artifact-preview; main keeps the production names. Deployment searches by artifact name without a branch filter, so separate names also prevent indirect production changes. Announcements change detection reads the corresponding production or preview name and filters by github.ref_name, so branches cannot reuse each other’s cached sheet hashes. Neither deploy.yaml nor staging-aggregate.yaml changed.
Verification:
- Parsed both YAML files and checked the three publishing conditions across 36 combinations each: main/feature/tag, scheduled/manual/PR, skip-deploy on/off, and sheet changed/unchanged. Non-main publishing is always false; main retains its previous conditions.
- Inspected upload conditions: data uploads remain unconditional, announcements uploads retain the changed-sheet condition, and non-main names cannot match the production downloader's exact artifact names.
- Full
hugo --gc --minifybuild passed;check_seo_html.pypassed all ten hard checks across 5,296 HTML pages. - Python suites passed: 39 tests in
scripts/tests, plus 11 disciplines parser tests.git diff --checkpassed. actionlintis not installed. Workflow logic was verified by reasoning from the expressions; no workflows were dispatched.scripts/rebrand/check_source_rules.pyis absent from main. The diff contains only these two workflow files and no generated outputs.
Carry-over for Claude: before this change, main at 02779f8e70c345cbb9a86b6ca9e406ba73ae3f4e and rebrand-doors at 7bfd85365977abc19c65c6be3126321baab418dc had identical data-processing.yml files. Rebrand-doors needs the same two main-ref guards and preview artifact-name expression. Carry over the announcement changes too, including the branch filter on change detection and the updated headers.
Legacy artifact scope: a read-only audit found all eight retained announcements-artifact artifacts originate from main. The newest data-artifact also originates from main (8 November), newer than the retained feature data artifacts (3 November). This prevents future branch runs of the updated workflows from publishing; it does not change downloads of historical artifacts or old workflow revisions. Branch-filtering the production downloader remains a follow-up for Claude because this task explicitly prohibits editing deploy.yaml. No artifacts were deleted.
Contributor-analysis cache provenance (checked 8 November 2026): a newer main artifact alone does not prove these files are clean, because daily runs restore the cached contributor analysis from build-resources before re-uploading it. I traced the actual files and producing runs:
index.md,treemap-plot-1.png, andstatic/partials/network-graph.htmllast changed in63b80346328, produced by the successful 8 November main dispatch, run 42510430996.projects-plot-1.pngandroles-plot-1.pnglast changed in1186877e7b1, produced by the successful 7 November main dispatch, run 42395201525.- Both runs have
head_branch: main,Run Contributor Analysis: success, andRestore latest contributor analysis: skipped; their logs explicitly show these commits being pushed tobuild-resources. The cached page says “As of 08 November 2026”. Thus the earlier June/3 November state described in #1030 has already been replaced by fresh main-generated analysis.
Cache recovery: these guards prevent future writes from updated non-main workflows; they do not repair already cached contributor-analysis files. If that cache is stale or contaminated, a successful manual dispatch of data-processing.yml from main regenerates it (manual runs execute contributor analysis), or the next monthly run on 1 December 2026 will do so if analysis succeeds. No extra refresh is needed for the cache inspected above. I did not dispatch any workflow.
Fixes #1030
🤖 Generated by GPT-6.1 Sol (Codex); review and UI decisions by Claude Code