Repository navigation
feat(sync): add source descriptor storage - #993
Merged
Merged
Conversation
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
2 times, most recently
from
November 2, 2026 02:26
98da134 to
3fd2b94
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 3, 2026 00:29
3fd2b94 to
c9d8b35
Compare
This was referenced Nov 3, 2026
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 4, 2026 19:46
c9d8b35 to
4464be8
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
2 times, most recently
from
November 4, 2026 22:26
a24d059 to
9228e3e
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 4, 2026 22:52
9228e3e to
8bb59bf
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 6, 2026 16:14
319a73d to
ef88797
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 6, 2026 16:47
ef88797 to
953557e
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 6, 2026 17:12
953557e to
ecb9fd2
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 6, 2026 17:39
ecb9fd2 to
326ee8c
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 6, 2026 18:02
326ee8c to
a91a72c
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 6, 2026 18:30
a91a72c to
9427354
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 6, 2026 19:08
9427354 to
3475403
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 6, 2026 19:51
3475403 to
efdc8ed
Compare
ctawiah
force-pushed
the
ctawiah/sync-descriptor-storage-3bbf
branch
from
November 6, 2026 20:19
efdc8ed to
1ae2be1
Compare
nkester-ld
approved these changes
Nov 6, 2026
Add the .ref.yaml descriptor: its path for each resource kind, its validation, and its atomic create and replace. A resource has one managed file or one descriptor, never both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit dce4240. Configure here.
| switch { | ||
| case err == nil: | ||
| return true, nil | ||
| return info.Mode()&os.ModeSymlink == 0, nil |
There was a problem hiding this comment.
Existence checks break descriptor deletes
High Severity
VariationExists and ResourceExists now return true for a .ref.yaml descriptor and false for a leftover managed-path symlink, but detach and local-delete still call DeleteResources, which only removes the managed file. A descriptor-only variation therefore fails detach as missing, and a leftover variation symlink is left behind where compile still rejects it. DeleteDefinitions handles both cases and is unused.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit dce4240. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Context
A linked resource needs an editable descriptor with a known path and strict validation.
What changes
.ref.yamlpath for variations, tools, and skills.Design notes
Review focus
Verification
make buildgo test ./...golangci-lint run ./...Related changes
🤖 Generated with Claude Code
Note
Overview
Adds
.ref.yamldescriptors under.launchdarklyfor variations, tools, and skills, with path helpers (ReferencePath,ParseReferencePath) alongside existing managed-file layout.Descriptor I/O lives in new
reference.go: validate and normalize references, read/render YAML atomically (WriteDescriptor,WriteDescriptorFrom,RestoreDescriptor), and resolve external sources with repo-boundary checks (symlink escape, paths outside.launchdarkly). Generated/vendored/minified sources are rejected via newgenerated.goand enforced when linking and reading sources.Single-definition rule: create, replace, delete, and existence checks now treat a resource as either a managed file or a descriptor—coexisting both is a
definitionConflict. Symbolic links at managed paths are ignored as definitions but can be removed/replaced;DeleteDefinitionsremoves descriptors (not linked repo files) and handles leftover links. Replace transactions can verify linked source paths still resolve to the same file.Detach test now simulates a failed delete with a named pipe instead of a symlink.
Reviewed by Cursor Bugbot for commit dce4240. Bugbot is set up for automated code reviews on this repo. Configure here.