Skip to content

refactor(sync): remove Phase 1 source references - #1005

Merged
ctawiah merged 1 commit into
mainfrom
ctawiah/sync-phase1-ref-removal-3bbf
Nov 4, 2026
Merged

ctawiah merged 1 commit into
mainfrom
ctawiah/sync-phase1-ref-removal-3bbf

Conversation

@ctawiah

@ctawiah ctawiah commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Context

Phase 1 linked a prompt to a repository file through a ref entry in the front matter of its managed file, with one plain Markdown adapter. The .ref.yaml descriptors in the next pull requests replace that design.

What changes

  • Remove the Phase 1 reference format, the plain Markdown adapter, and the ref front matter field.
  • Remove the Phase 1 sync prompts link command and its planner and executor branches.
  • Remove the Phase 1 reference rows from the lock and the acceptance tests that covered them.

Design notes

  • This change only removes code. The next pull request adds the shared projection model that the descriptors build on.

Review focus

  • Does any Phase 1 reference path remain in the planner or the local store?

Verification

  • make build
  • go test ./...
  • golangci-lint run ./...

Related changes

  1. This PR: Phase 1 reference removal
  2. feat(sync): add projection and problem core #987: projection and problem core
  3. feat(sync): add the adapter core and the Markdown adapter #988: adapter core and Markdown
  4. feat(sync): add the structured document adapters #989: structured adapters
  5. feat(sync): add the Python adapter #991: Python adapter
  6. feat(sync): add the TypeScript and JavaScript adapters #992: TypeScript and JavaScript adapters
  7. feat(sync): add source descriptor storage #993: descriptor storage
  8. feat(sync): compile and publish repository sources #994: compile and publish
  9. feat(sync): detach descriptor-backed sources #1003: descriptor detach
  10. feat(sync): prepare repository source links #997: link preparation
  11. feat(sync): integrate repository sources with planning and link #995: planning and link
  12. feat(sync): add the link commands #998: link commands

🤖 Generated with Claude Code


Note

Overview
This PR removes the Phase 1 “linked prompt” model so sync no longer supports variation wrappers that point at external repo files via YAML ref front matter. It is deletion-only groundwork before .ref.yaml descriptors land in follow-up PRs.

CLI and actions: ldcli sync prompts link is gone, along with LinkAction, linkTarget, and runner wiring that created a linked variation then ran sync.

Deleted packages: internal/sync/link (link workflow), internal/sync/reference and the plain-markdown adapter, and internal/sync/local/reference.go (path validation and reading linked files).

Local workspace: Variations are inline only—compile no longer merges content from referenced files; VariationFile / front matter drop Ref; ReplaceVariations no longer rewrites external prompt files on pull; SourceFiles and watch tests no longer treat repo paths outside .launchdarkly as sync inputs.

Planner / executor / lock: Manifest entries no longer store ref; SetRefs, planRestore, and post-sync ref recording are removed. Pull-to-local no longer passes restoreRef.

Tests: Flag inventories, acceptance scenarios for linked push/pull/detach/restore, and link-specific unit tests are removed or trimmed accordingly.

Note for reviewers: Stale comments in watch.go / compile.go still mention linked files; behavior now follows managed files only via SourceFiles.

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

@ctawiah
ctawiah force-pushed the ctawiah/sync-phase1-ref-removal-3bbf branch from 25198b7 to 140c3bc Compare November 4, 2026 15:29
@ctawiah
ctawiah marked this pull request as ready for review November 4, 2026 15:29
@ctawiah
ctawiah requested a review from a team as a code owner November 4, 2026 15:29
@ctawiah
ctawiah requested review from nkester-ld and tiffanylphan and removed request for a team November 4, 2026 15:29
@ctawiah
ctawiah merged commit 6b6f6aa into main Nov 4, 2026
11 checks passed
@ctawiah
ctawiah deleted the ctawiah/sync-phase1-ref-removal-3bbf branch November 4, 2026 19:25
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