Skip to content

feat(PL-6433): introduce org-local+lock tag#283

Merged
davidmdm merged 1 commit into
masterfrom
feat/PL-6433/introduce-org-local-plus-lock
Jun 22, 2026
Merged

feat(PL-6433): introduce org-local+lock tag#283
davidmdm merged 1 commit into
masterfrom
feat/PL-6433/introduce-org-local-plus-lock

Conversation

@davidmdm

@davidmdm davidmdm commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

When we introduced the !org-local we didn't fully account that marking a tag as org-local would disallow a user to mark that field as locked for the local org.

This PR adds a new tag to combine the concept of locked and org-local.


Note

Low Risk
Small, localized YAML tag and predicate changes with a focused test; no auth or external API surface.

Overview
Adds a new custom YAML tag !org-local+lock so a field can be both org-scoped and locked for downstream orgs, which !org-local alone could not express.

Tag constants in tags.go replace inline strings, and CustomTags now includes the new tag. IsLocked and IsOrgLocal treat !org-local+lock as locked and org-local respectively, so existing merge/purge/TODO behavior applies without separate code paths.

A merge test confirms same-org merges surface TODO for locked values and cross-org merges drop the key like plain !org-local.

Reviewed by Cursor Bugbot for commit ae1d031. Bugbot is set up for automated code reviews on this repo. Configure here.

@j-martin j-martin marked this pull request as ready for review June 22, 2026 17:31
Comment thread internal/yml/merge.go
@davidmdm davidmdm force-pushed the feat/PL-6433/introduce-org-local-plus-lock branch from 50269f7 to ada2bf6 Compare June 22, 2026 17:51
@j-martin

Copy link
Copy Markdown
Contributor

Let's not forget to update the https://github.com/nestoca/catalog/#what-are-the-org-local-tags-in-the-yaml-and-what-do-they-do

We probably want a table to explain it.

@davidmdm davidmdm force-pushed the feat/PL-6433/introduce-org-local-plus-lock branch from ada2bf6 to dbd0862 Compare June 22, 2026 17:52

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dbd0862. Configure here.

Comment thread internal/yml/merge.go

func IsLocked(node *yaml.Node) bool {
return node != nil && node.Tag == "!lock"
return node != nil && (node.Tag == TagLock || node.Tag == TagOrgLocalPlusLock)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Org-local lock becomes TODO merge

High Severity

Treating !org-local+lock as locked via IsLocked makes Merge rewrite those source scalars to TODO before merge (same as !lock), so same-organization promotions no longer copy org-local values into new or missing keys. That diverges from plain !org-local behavior and can leave promoted releases failing locked-TODO validation.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit dbd0862. Configure here.

@davidmdm davidmdm force-pushed the feat/PL-6433/introduce-org-local-plus-lock branch from dbd0862 to ae1d031 Compare June 22, 2026 17:55
@davidmdm davidmdm merged commit dc17f63 into master Jun 22, 2026
7 checks passed
@davidmdm davidmdm deleted the feat/PL-6433/introduce-org-local-plus-lock branch June 22, 2026 18:03
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.

3 participants