Repository navigation
ci: reference organization reusable workflows at main - #802
Conversation
The workflow contract required callers to pin the organization's own reusable workflows to a full SHA, so every change to a shared workflow needed a pull request in each calling repository, and callers ran different revisions in the meantime. The starter templates already referenced the shared workflows at @main. Accepted ADR-0042 records the rule: callers reference z-shell/.github/.github/workflows/* at @main; third-party actions and reusable workflows and the organization's own actions stay pinned to a full SHA with a release comment. Existing SHA pins of the shared workflows stay valid until each caller moves in its own change. The contract source, its generated instructions, the implementation patterns and the shared pinact template follow the rule; the template now also ignores an exact main ref for the shared workflows only.
The golden in test_repair_2_consumer_parser_outputs_match_frozen_golden hashes the visible text of PATTERNS.md among other consumers. The pinning-pattern edit changed only that file's text; the instruction's rule blocks, parsed rules and documentation registry are unchanged. The previous digest reproduces exactly on the base revision.
The organization preset extends config:best-practices, which pins GitHub Actions references to digests. The Dependency Dashboard already lists a pin update for the starter templates' z-shell/.github main references, and every caller that extends the preset would receive the same pull requests, undoing ADR-0042. A package rule turns off digest pinning for z-shell/.github references whose current ref is main. Organization actions with release tags and existing SHA pins keep their updates. The contract and ADR-0042 name the rule.
The new-repository procedure installs CI from the starter templates, which reference the organization reusable workflows at @main, and then told maintainers to pin reusable-workflow references to SHAs. It now follows ADR-0042: the shared workflows stay at @main, and every other action and reusable-workflow reference is pinned to a SHA.
ss-o
left a comment
There was a problem hiding this comment.
Fallback review under ADR-0026: Copilot request not registered on c002459
Findings
No actionable findings on the reviewed head.
Two findings from this review were fixed before it was posted:
- IMPORTANT, CI pinning (fixed in 434a639):
renovate-config.jsonextendsconfig:best-practices, which pins GitHub Actions references to digests. The Dependency Dashboard (#790) already listed a pin update for the starter templates'z-shell/.githubmainreferences, so every caller extending the preset would have received pull requests undoing ADR-0042. A package rule now turns off digest pinning forz-shell/.githubreferences whose current ref ismain. - IMPORTANT, contradicting guidance (fixed in c002459):
knowledge/domains/governance/new-repository.md:141installed CI from the@maintemplates and then said to pin reusable-workflow references to SHAs. It now follows ADR-0042.
Scope: complete diff of d8edc83...c002459 (four commits), against issue #801. Copilot was requested once on 7a73dbb at 12:35:28Z; after two minutes the timeline held only the CODEOWNERS tsc request and no Copilot review_requested event, so the request did not register (cause unconfirmed). Later commits changed the test golden, the Renovate preset and the new-repository guidance; no second request was made.
Note
This is a maintainer-elected self-review, not an independent review or approval to merge.
Validation
- Passed on c002459: all 12 hosted checks, including Validate Agent Instructions, Org Routing, Validate Commits, Validate Issue Link and links-check.
- Passed locally on c002459: every step of the Validate Agent Instructions job (policy, delivery, coverage, routing, decision-record and Zsh standard suites and validators);
org-routing.py verify-approvedwith thez-shell/agent-skillssource root;trunk check --no-fixon the changed files. - Skipped or unavailable: Renovate was not run against the new rule; its keys (
matchManagers,matchPackageNames,matchCurrentValue,pinDigests) were checked against Renovate's published JSON schema, so the rule's effect is confirmed on the next scheduled Renovate run, not here. pinact was not run; the template follows the pinact 4.1.1 documentation thatnameandrefmust match exactly. Private control-workspace validators are outside this repository.
Checklist verdicts and supporting evidence
- Policy consistency: pass. The contract source and its generated instructions,
implementation-patterns.mdandPATTERNS.md, the new-repository procedure, ADR-0042 and the Renovate preset state one rule: organization reusable workflows at@main, every other remote reference SHA-pinned, existing SHA pins valid. A repository search finds no remaining statement that organization reusable workflows must be SHA-pinned. - Scope boundary: pass. Organization actions under
z-shell/.github/actions/stay pinned (the rclone template keepsactions/rclone@6443afd # v1.0.0), and the Renovate rule matches only a current ref ofmain, so tagged actions and existing SHA pins keep their updates. - pinact template: pass. Two
ignore_actionsentries forz-shell/\.github/\.github/workflows/.*: refmainand the existing full-SHA pattern, so callers that copied the template keep passing. The usage link targets the renamed heading#pinact-exception-for-organization-reusable-workflows, which exists in the generated instructions. - Audit tooling: pass.
repo-settings-audit.rb --workflow-pinsonly matches 40-hex SHA refs, so@maincallers are not reported; its default-branch check still applies to remaining SHA pins, as the contract says. - Generated outputs: pass. Delivery, coverage and the decisions index were regenerated by their tools; the
repository-resources.mddiff is one new row plus column realignment. The Zsh standard consumer golden changed only becausePATTERNS.md's visible text changed: the scripting instruction's rule blocks, parsed rules and documentation registry are identical, and the previous digest reproduces on the base revision. - ADR: pass. ADR-0042 is ACCEPTED with an acceptance record, declared in
.github/instruction-surfaces.jsonandknowledge/repository-files.json, and listed in the generated index. It states the accepted risk (a defect onmainreaches every caller at once) and the controls (review on this repository, an optional default-branch SHA pin for a caller that must freeze). - Text policy: pass. No em dash, tool credit or private reference in the added text.
Follow-up
Moving existing callers from SHA pins to @main is per-repository work outside this pull request.
Closes #801.
Summary
z-shell/.github/.github/workflows/*) at@main, so a change merged here reaches every caller without a pull request in each repository. Every other remote reference stays pinned to a full SHA with its release comment, including third-party actions and workflows and the organization's actions underz-shell/.github/actions/.knowledge/domains/ci/workflow-contract.mdand generated.github/instructions/ci/workflow-contract.instructions.md): the pinning rules, called-workflow guidance and pre-merge checklist follow the ADR. Existing SHA pins of the shared workflows stay valid until each caller moves, and the default-branch rule from [bug]: commit-lint callers pinned to 64a427d end in a startup failure #774 still applies to them.templates/pinact/.pinact.yaml): adds anignore_actionsentry for an exactmainref on the shared workflows and keeps the full-SHA entry, so callers that copied the template still pass. pinact 4.1.1 matches both patterns against the whole name and ref.renovate-config.json): a package rule turns off digest pinning forz-shell/.githubreferences whose ref ismain.config:best-practicespins GitHub Actions references, and the Dependency Dashboard (Dependency Dashboard #790) already lists a pin update for the starter templates'mainreferences; without the rule every caller extending the preset would get pin pull requests that undo the ADR. Release-tagged organization actions and existing SHA pins keep their updates. Its keys were checked against Renovate's published JSON schema; Renovate itself was not run.knowledge/domains/governance/new-repository.md, generatedrunbooks/new-repository.md): it installs CI from the@maintemplates and then said to pin reusable-workflow references to SHAs; it now keeps the shared workflows at@mainand pins everything else.knowledge/domains/agents/implementation-patterns.md(generatedPATTERNS.md) follows the same rule and the renamed contract anchor..github/instruction-surfaces.jsonandknowledge/repository-files.json;decisions/README.mdandknowledge/domains/ci/repository-resources.mdare regenerated (the latter's diff is one new row plus column realignment).automation/ci/test_validate_zsh_standard_policy.py: the frozen consumer golden hashes the visible text ofPATTERNS.md, so it is refreshed. Only that file's visible text changed; the scripting instruction's rule blocks, parsed rules and documentation registry are identical, and the previous digest reproduces on the base revision.Not changed: the starter templates (already
@main), any caller repository,repo-settings-audit.rb --workflow-pins(it only matches SHA pins), and ADR-0009 (it defers workflow conventions to the contract).Impact review
Answers to the instruction update questions:
PATTERNS.md, and every caller that copies the pinact template. The change-impact report lists the policy files as shared-policy review and the template as needing a caller inventory: no caller changes here; callers keep their SHA pins until their own reviewed change.knowledge/domains/ci/workflow-contract.mdremains the editable source; the ADR records the decision.implementation-patterns.mdand the new-repository procedure repeated the old rule, and the Renovate preset would have pinned@mainreferences; all three are updated in this change. ADR-0009 and the CI workflow author and reviewer roles defer to the contract and stay accurate for actions.decision-0042); no route changes.knowledge-delivery.py --checkpasses for 57 consumers, and the policy validators below pass.Verification
python3 automation/knowledge/knowledge-delivery.py --check: 57 consumers checked.python3 automation/knowledge/knowledge-coverage.py: 366 files covered.python3 automation/governance/decision-records.py --check: passed.python3 automation/agents/validate-agent-policy.py: passed.python3 automation/agents/org-routing.py validateandverify-approved(with thez-shell/agent-skillssource root): passed.python3 -m unittest automation/agents/test_validate_agent_policy.py(99 tests) andautomation/agents/test_org_routing.py(77 tests): OK.Validate Agent Instructionsjob, run locally on the head, includingautomation/ci/test_validate_zsh_standard_policy.py(111 tests) andvalidate-zsh-standard-policy.py: passed.trunk check --no-fixon the changed files: no issues.Agent handoff
No handoff needed.