Skip to content

fix(contracts): report a level label in a labels step instead of failing the whole stored pack - #765

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-11709-stored-pack-level-label
Oct 29, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-11709-stored-pack-level-label

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

A stored policy pack whose labels step names a label Triage takes back (a risk or sensitive level label) no longer fails to parse as a whole. That step is left out, so it never runs, and is named in the pack's dropped list by its stored position, with the other labels that are not added either; the rest of the pack loads. A policy file, an extended file's override and a pushed file checked by the hub still refuse such a step with the same message as before. Level-label comparison was already case-insensitive on both sides. The contracts README now describes this.

Verified with contracts tests (a stored pack with the step, a file refused through checkPolicyFile) and the repo's check, lint and contracts tests.

Closes CL-11709

@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown

CL-11709

@TheGreatAxios
TheGreatAxios marked this pull request as ready for review October 29, 2026 15:56
@corbits-triage

corbits-triage Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Notes:

  • Risk: medium (2 recently fixed files)

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stored policy packs with a labels step naming a risk or sensitive level label now load instead of failing; that step is skipped and reported in the dropped list, while policy files, extended overrides and pushed files still refuse it. The main defect is that the dropped message can misreport other level labels as ordinary labels that are not added.

corbits-triage[bot]
corbits-triage Bot previously approved these changes Oct 29, 2026

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes stored policy pack loading so a labels step naming a risk or sensitive level label is dropped and reported in the pack's dropped list, instead of failing the whole pack. Policy files, extended overrides and pushed files still refuse such a step with the same error. The contracts README is updated to match.

@TheGreatAxios
TheGreatAxios added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 51cc574 Oct 29, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant