Skip to content

fix(rules): know the standards repository under its new name - #961

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/eager-wright-zwwbe2-standards-rename
Oct 27, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/eager-wright-zwwbe2-standards-rename

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Follow-up to #958. hyperpolymath/standards moved to metadatastician/standards on 2026-10-25. Rules keyed on the old name went quiet for anything under the new one, which Codex raised on #958:

Where Before After
ShaBumpPropagation Merge events from the moved repo carry the new name, and matched_reusables/1 compares names exactly, so no propagation finding fired Every standards reusable is registered under both names
MergeOrchestration.Sensor Standards contractiles/ and rulesets/ were :meta (never self-approved) only for "hyperpolymath/standards", so under the new name they classified as :object Either name, any case
SecurityErrors pin exemption for own-org standards reusables at @main Old path only Both paths
WorkflowAudit WF016 (orphan pin) and WF027 (measured-dead revision) Old path only Either name (owner/repo matched case-insensitively, as GitHub resolves it)
scripts/ci-health/action-superset.txt Old paths only; the hyperpolymath/* owner pattern doesn't cover the new owner Adds the 13 metadatastician/standards/... reusable paths

Hypatia.Rules.StandardsRepo now holds the names (current first, then former), so the next rule asks one place.

Also fixed: remediate.sh's allow-list body. jq parsed ["hyperpolymath/*"] + . as $pats | {...} as array + object, so the B-ALLOWLIST remediation could never build its request, and test/ci-health-test.sh exited 5 on main. I added the missing parentheses: (["hyperpolymath/*"] + .) as $pats.

Type of change

  • 🐛 Bug fix (false negatives after an upstream repository move; a broken remediation)

How has this been verified?

hex.pm is unreachable here, so I compiled the touched modules standalone (Elixir 1.14) with their dependencies:

  • standards_repo_test (new), sha_bump_propagation_test, security_errors_test, workflow_audit_pins_test and sensor_test: 146/146 pass.
  • Control: 6 of the new tests fail against main, one per gap in the table. StandardsRepo's own 4 tests are new.
  • test/ci-health-test.sh: exit 0 (PASS: CI-health classification and remediation fixtures). On main it exits 5 with the jq error above.
  • mix format is clean on all touched files, and shellcheck is clean on remediate.sh.
  • Blast radius: WorkflowAudit.audit/2 gives identical findings with the old and new code on the hypatia, standards and echidna trees (200 / 176 / 120).

Notes for reviewers

Beyond this repo:

  • gitbot-fleet's fix-stale-reusable-pin.sh and stale-reusable-pins.tsv mirror the WF027 table and likely key on the old path too.
  • The estate needs a rule that flags any uses: hyperpolymath/standards/... as a certain startup_failure and routes the re-point to the fleet. That is the detection half of the estate-wide fix(ci): re-point standards callers to metadatastician/standards #958 fix, and I'd propose it as the next PR.
  • rsr-oracle.yml's standards-source guard still names hyperpolymath/standards. That one is an interface change, so it's left for its own PR.

Checklist

  • My commits are signed. The session's signing shim is platform-mediated.
  • I ran the project's own checks/tests locally and they pass (scoped as above).
  • New files carry the correct SPDX (MPL-2.0).
  • Docs are updated (StandardsRepo moduledoc; comments at each site).
  • I have not introduced a soundness hole. Old-name behaviour is unchanged; the new name is added beside it.

Generated by Claude Code

hyperpolymath/standards moved to metadatastician/standards on 2026-10-25.
Rules keyed on the old name went quiet for anything under the new one
(Codex on #958):

- ShaBumpPropagation: merge events from the moved repo carry the new name,
  and matched_reusables/1 compares names exactly, so no propagation
  finding fired. Both names are now registered.
- MergeOrchestration.Sensor: standards contractiles/ and rulesets/ were
  meta (never self-approved) only for "hyperpolymath/standards"; events
  under the new name classified them as object. Either name, any case.
- SecurityErrors pin exemption for own-org standards reusables, and
  WorkflowAudit WF016 (orphan pin) / WF027 (measured-dead revision):
  matched only the old path. Either name now.
- ci-health action-superset: the metadatastician/standards reusable paths,
  which the hyperpolymath/* owner pattern does not cover.

Hypatia.Rules.StandardsRepo holds the names (current first) so the next
rule asks one place.

Also fixes remediate.sh's allow-list body: jq parsed
`["hyperpolymath/*"] + . as $pats | {...}` as array + object, so the
B-ALLOWLIST remediation could never build its request and
test/ci-health-test.sh exited 5 on main. Parenthesised.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CYR5bf5FBLS7cXQK72aVNM
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

CodeRabbit couldn't verify your organization's usage billing state, so no usage-priced review was started. Retry after the billing service recovers.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 356d28f7-a9ea-4a52-8327-42246e4bff1d
Commits

Reviewing files that changed from the base of the PR and between ff8a609 and c8d78e2.

Files selected for processing: 12
  • lib/merge_orchestration/sensor.ex
  • lib/rules/security_errors.ex
  • lib/rules/sha_bump_propagation.ex
  • lib/rules/standards_repo.ex
  • lib/rules/workflow_audit.ex
  • scripts/ci-health/action-superset.txt
  • scripts/ci-health/remediate.sh
  • test/merge_orchestration/sensor_test.exs
  • test/rules/sha_bump_propagation_test.exs
  • test/rules/standards_repo_test.exs
  • test/rules/workflow_audit_pins_test.exs
  • test/security_errors_test.exs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 26, 2026 22:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T22:41:41.999027Z c8d78e2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Add Carrot credits or activate Agent usage billing to use Autofix

@hyperpolymath
hyperpolymath merged commit 237859d into main Oct 27, 2026
67 checks passed
@hyperpolymath
hyperpolymath deleted the claude/eager-wright-zwwbe2-standards-rename branch October 27, 2026 00:07
hyperpolymath added a commit that referenced this pull request Oct 27, 2026
…965)

## Why

`hyperpolymath/standards` moved to `metadatastician/standards` on
2026-10-25. GitHub keeps a redirect for git and the REST API, but it
does **not** follow that redirect when it resolves a reusable workflow's
`uses:`. Every caller still naming the old owner therefore ends in
`startup_failure` ("workflow was not found") before any job runs. This
was measured on hypatia's governance runs 40424594888 and 40424740139.
#961 proposed a rule for this so that a regression is caught by a rule,
not found by people. This PR is that rule.

## What

- **WF028** (`check_reusable_call_to_moved_repository/1`, wired into
`audit/3`) flags a reusable-workflow call by a moved repository's former
name. It finds the call where WF027 does: a job's `uses:` key in block
or flow style, a value continued below its key, or a call through a job
alias. A path in a `run:` script, an `env:` value, a comment or a step's
`uses:` does not fire. The finding names the re-pointed reference at the
**same revision**, since a move keeps history.
- The moved-repo table is derived from the new `StandardsRepo.former/0`.
Each further transfer into the org (standards ruling D97) is then one
row, not a new rule.
- Like WF026 and WF027, WF028 is advisory, severity `low` and
`auto_fixable: false`. AGENTIC's `must-not-promote-to-blocking` rule
applies, and no fleet fixer rewrites the owner yet.
- `cli.ex` now carries the finding's `replacement` key through to SARIF
and the fleet; until now it was dropped by the `Map.take` whitelist.
- AGENTIC `[workflow-pin-detection]` and `Operations.md` list WF028.

## Validation

- `test/rules/workflow_audit_pins_test.exs`: 104 tests, 0 failures. That
includes 9 new WF028 tests and a self-check that hypatia's own
`.github/workflows` produce no WF028 findings. `workflow_audit_chapel`,
`workflow_audit_cron_drift` and `standards_repo` tests pass too.
- Mutation check: with the job-key guard replaced by `true`, the "step /
run-script" test goes red.
- `mix format --check-formatted` passes on the touched files.
- **Caveat:** these runs used a standalone compile of the rule modules
on Elixir 1.14. The session's network policy blocks `repo.hex.pm`, so
the project's deps (and the full `mix test`, including `cli_test.exs`)
could not be fetched. CI is the first full-suite run.

## Follow-ups outside this repo

- gitbot-fleet: an owner re-point fixer (WF028 → `auto_fixable: true`),
and `fix-stale-reusable-pin.sh` / `stale-reusable-pins.tsv` still key on
the old path.
- `rsr-oracle.yml` still treats `hyperpolymath/standards` as the canon
(separate change).

---
_Generated by [Claude
Code](https://claude.ai/code/session_01J4QvDfvetbJ5z7uREtbJWw)_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants