Skip to content

feat(editors): add Registry Stack YAML navigation previews#409

Merged
jeremi merged 4 commits into
release/1.0from
codex/registry-language-server
Jul 18, 2026
Merged

feat(editors): add Registry Stack YAML navigation previews#409
jeremi merged 4 commits into
release/1.0from
codex/registry-language-server

Conversation

@jeremi

@jeremi jeremi commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • add a shared Registry Stack YAML language server with definitions, references, document/workspace symbols, and bounded reference diagnostics
  • expose it through registryctl authoring language-server
  • add thin source-installable developer previews for VS Code and Zed
  • keep Red Hat YAML and Zed YAML responsible for syntax, version-matched schemas, completion, hover, and formatting
  • index every maintained project-authoring catalog workspace to prevent semantic drift

Beta support boundary

The generated editor setup from registryctl init and registryctl authoring editor remains the stable beta path.

VS Code and Zed semantic navigation are optional developer previews for this beta. They must be built and installed from the source checkout. They are not marketplace extensions or release assets.

VS Code uses an explicit configured server, then registry-language-server on PATH, then registryctl authoring language-server. It is disabled in untrusted and virtual workspaces. Zed uses the same PATH/fallback order; because its current extension API cannot predicate YAML registration on registry-stack.yaml, the docs tell users to remove the development extension after previewing to avoid unrelated-worktree noise.

Review repairs

  • reject symlinks and prove canonical containment across every authored project path before reading or indexing
  • keep orphan definition files searchable without allowing them to satisfy project references
  • require declared aliases to resolve to valid, readable, in-project YAML targets; missing or invalid targets remain unresolved with actionable diagnostics
  • preserve and report bounded project-load failures instead of treating them as “no project found”
  • prevent textless save notifications from reading URI-derived filesystem paths
  • verify the VSIX contains its bundled runtime and no external node_modules dependency

Verification

Exact head: a710c85d283a5298c0384940f5a40d92c6656c17
Exact base: 6fe963e36ba15c320f6b3de0f98e4326473d27ce

  • cargo fmt --all -- --check
  • cargo check --locked --workspace --all-targets
  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo test --locked -p registry-language-server (14 unit, 4 protocol)
  • cargo test --locked -p registryctl --test language_server
  • catalog-wide maintained-workspace LSP conformance and symlink/orphan/missing-target negatives
  • VS Code npm run package:dev and Extension Host tests
  • Zed wasm32-wasip2 check/test-no-run/format
  • docs npm test and full npm run check
  • independent exact-head security review: approved, no findings
  • independent exact-head developer-experience review: approved, no findings

Merge gate

Every applicable exact-head GitHub check passed before merge.

@jeremi
jeremi force-pushed the codex/registry-language-server branch from ebdb7db to d3c5f42 Compare July 17, 2026 14:37
jeremi added 4 commits July 18, 2026 07:29
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi
jeremi force-pushed the codex/registry-language-server branch from d3c5f42 to a710c85 Compare July 18, 2026 00:33
@jeremi jeremi changed the title Add Registry Stack YAML navigation for VS Code and Zed feat(editors): add Registry Stack YAML navigation previews Jul 18, 2026
@jeremi
jeremi marked this pull request as ready for review July 18, 2026 01:28
@jeremi
jeremi merged commit cb795ea into release/1.0 Jul 18, 2026
28 of 29 checks passed
@jeremi
jeremi deleted the codex/registry-language-server branch July 18, 2026 01:29

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a710c85d28

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +702 to +705
SymbolKey::scoped(
RegistrySymbolKind::Claim,
&service_name,
&claim.key.value,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Enforce project-wide claim uniqueness

When two different services define the same claim ID, registryctl check rejects the project because project_authoring/project.rs keeps a single project_claim_ids set and bails with “Notary claim ids must be unique across project services.” The new LSP keys claim symbols by service_name, so build_diagnostics() only reports duplicates within the same service; editors will show no duplicate diagnostic for a project that the CLI refuses. Use a project-global claim key for duplicate detection, or add a separate global duplicate pass while keeping service-scoped navigation where needed.

Useful? React with 👍 / 👎.

Comment on lines +711 to +712
if let Some(output) = claim.value.get_scalar("output") {
if let Some((consultation, _)) = output.value.split_once('.') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Index registry-backed CEL consultation references

This only records consultation references for claims that use output, but registry-backed claims can also use cel expressions rooted at consultations; for example the bundled HTTP starter has cel: person_record.matched, and inferred_claim_evidence() treats consultation roots in CEL as registry-backed evidence. In those projects, renaming or misspelling the consultation inside cel produces no Registry Stack definition/reference support or missing-reference diagnostic, even though it is the same cross-reference the preview is meant to cover.

Useful? React with 👍 / 👎.

Comment thread .github/workflows/ci.yml
Comment on lines +107 to +110
case "${path}" in
editors/*)
editors=true
;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Run editor checks when the shared server changes

The new editor job is gated only by editors/*, but the VS Code and Zed previews both launch crates/registry-language-server and the job’s own test section builds that crate before exercising the extensions. A PR that changes only crates/registry-language-server sets the existing rust flag via crates/* but leaves editors=false, so the extension-host and Zed integration checks are skipped for the shared protocol/server they depend on.

Useful? React with 👍 / 👎.

Comment on lines +784 to +786
if let Some((path, id)) = external_id {
claimed_definition_files.insert(path.clone());
self.add_resolvable_symbol(key, None, path, id.range);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Mirror entity alias constraints in the LSP

For entity aliases, registryctl rejects the project unless the manifest key points to entities/<alias>.yaml and the referenced document's id equals that alias. This branch accepts any parsed entity file with a scalar id and registers it under the manifest alias, so an editor shows clean references for projects that registryctl check refuses, such as entities: resident: { file: entities/person.yaml } or an id mismatch inside the entity file.

Useful? React with 👍 / 👎.

Comment on lines +1155 to +1157
let supported = match kind {
RegistrySymbolKind::Integration => is_integration_path(path),
RegistrySymbolKind::Entity => is_entity_path(path),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Follow declared integration file paths

For integration aliases whose file is a valid relative authored path outside integrations/*/integration.yaml, registryctl only validates the relative path and then loads that file, but the LSP rejects it here by requiring is_integration_path(). Those CLI-valid projects get a false “outside the supported project layout” diagnostic plus unknown integration references in the editor; either enforce the same layout in project validation or have the LSP securely load the declared integration path.

Useful? React with 👍 / 👎.

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