Skip to content

feat(release-train): store the staging freeze in a custom property, not a repo ruleset (ENG-2013) - #60

Open
hamishfagg wants to merge 1 commit into
mainfrom
hamish/eng-2013-staging-freeze-custom-property
Open

feat(release-train): store the staging freeze in a custom property, not a repo ruleset (ENG-2013)#60
hamishfagg wants to merge 1 commit into
mainfrom
hamish/eng-2013-staging-freeze-custom-property

Conversation

@hamishfagg

@hamishfagg hamishfagg commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What

  • scripts/freeze_state.py: freeze state is the repo custom property staging_frozen. read GETs repos/{repo}/properties/values; set --frozen true|false PATCHes it. Same failure asymmetry as before: readers escalate to frozen, writers fail loudly. Undefined property = drift error; null = thawed.
  • Input ruleset-name renamed to freeze-property (default staging_frozen) across release-freeze.yml, release-unfreeze.yml, release-pr.yml, notify-startup-failure.yml, notify-main-failure.yml, notify-pipeline-status/action.yml. Env RULESET_NAME became FREEZE_PROPERTY.
  • README and comments updated to the new contract. Tests rewritten; 152 pass.

Why

Pairs with mindsdb/terraform#202, which defines the staging_frozen org property and a single org ruleset staging-freeze targeting repos where it is true. With the property as the switch, the seven repo rulesets go away and terraform owns the ruleset without ignore_changes.

Compatibility

  • None of the seven repo wrappers (anton, cowork, cowork-server, mindshub_frontend, mindshub_services, mindshub_inference, auth) pass ruleset-name, so they need no change, and all seven track the reusables at @main.
  • Reading property values needs only repo read access, so the alert paths are unchanged.
  • Writing needs the "edit custom property values" permission. The release-train App holds administration: write; if the first freeze dispatch gets 403, add Custom properties: write to the App.

Order

Apply the terraform PR first (property and ruleset must exist), then merge this, then delete the seven repo rulesets.

🤖 Generated with Claude Code

…ot a repo ruleset (ENG-2013)

The freeze moves from "flip the enforcement of this repo's `staging-freeze`
ruleset" to "set this repo's `staging_frozen` custom property". One org
ruleset in terraform targets the staging branch of every repo where that
property is true, so the workflows no longer edit a ruleset at all and
terraform can own it with an empty plan.

`scripts/freeze_state.py` keeps its two modes and their failure asymmetry:
`read` escalates to frozen on any lookup problem, `set` fails loudly. It now
reads and PATCHes `repos/{repo}/properties/values`; `set --frozen true|false`
replaces `set --enforcement`. A property the org does not define is still
a drift error; a null value (never set) reads as thawed.

The `ruleset-name` input becomes `freeze-property` (default `staging_frozen`)
on release-freeze, release-unfreeze, release-pr, both notify reusables and
notify-pipeline-status. No caller in any repo passes the old input.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hamishfagg
hamishfagg requested a review from a team as a code owner September 4, 2026 05:07
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.

1 participant