Skip to content

Localize the toolchain and expand compiler-backed developer tooling - #35

Merged
kleeedolinux merged 7 commits into
masterfrom
toolchain-localization-lsp
Jul 17, 2026
Merged

Localize the toolchain and expand compiler-backed developer tooling#35
kleeedolinux merged 7 commits into
masterfrom
toolchain-localization-lsp

Conversation

@serene1491

@serene1491 serene1491 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Localize human toolchain presentation and expand the compiler-backed private
language server and CLI workflows used by official editor integrations.

This change embeds complete TOML catalogs for English, Simplified Chinese,
Japanese, Brazilian Portuguese, and Spanish. The CLI, compiler diagnostics,
and LSP use one immutable locale while machine identities remain invariant.

The pop-language-server executable now provides bounded LSP 3.17 stdio,
versioned full-document synchronization, structured compiler diagnostics with
related spans and notes, checked XML documentation hover, declaration symbols,
snapshot-bound safe quick fixes, and compiler-proven direct-call parameter
inlay hints. It analyzes conventional modules in the nearest dependency-free
Package Bubble without merging nested Packages or Workspace visibility.

The CLI now provides localized pop new and pop initialize commands. They
create minimal compiler-validated binary or library Packages using the
canonical bubble.toml and src/main.pop or src/lib.pop layout, publish from
staging, and never overwrite existing work.

Release toolchain archives include the language server so editor integrations
use the compiler version selected by popup. This PR does not stabilize the
public Pop.Lsp or Pop.Syntax APIs and does not claim completion, signature
help, cross-Bubble navigation, references, rename, formatting, semantic tokens,
incremental range edits, or complete Workspace/dependency analysis.

Architecture traceability

  • Authorizing architecture section or ADR: ADR 0088, ADR 0089, ADR 0090, ADR 0091, and architecture section 21.
  • New or changed public contract: Human toolchain presentation supports five complete locales. The private LSP projects rich compiler diagnostics, safe current-snapshot fixes, direct-call parameter hints, and conservative nearest-Package analysis. The CLI creates canonical binary and library Package scaffolds.
  • Architecture documents, examples, or terminology updated: Closed design questions, implementation roadmap, CLI/tooling architecture, language-server documentation, localization catalogs, release packaging, and architecture conformance tests.

Verification

  • Tests were added or updated before implementation where behavior changed.
  • Positive behavior is covered.
  • Negative/rejection boundaries are covered.
  • Convention, consistency, and regression coverage is present where relevant.
  • Cross-backend or differential coverage is present where relevant.
  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets
  • cargo test --workspace --all-targets
  • cargo clippy --workspace --all-targets -- -D warnings

If a check was not run, explain why:

The repository-recommended test selection was run as
cargo test --workspace --lib --bins --tests --examples --quiet -- --test-threads=1
because --all-targets executes harness-free benchmark binaries. All selected
workspace tests passed serially.

Additional successful verification includes focused LSP and CLI scaffolding
tests, architecture conformance, localization catalog parity, relative Markdown
links, a popup-installed CLI scaffold/check smoke test, VS Code checks and unit
tests, VSIX packaging and installation, and real Extension Host sessions against
the installed final language server.

Review notes

  • No dynamic typing, runtime string lookup, broad reflection, or universal-table behavior was introduced.
  • HIR/MIR remain backend-neutral.
  • No generated artifacts, dependency caches, credentials, or editor files are included.
  • This is ready for technical review.

The compiler tooling projection remains private and version-coupled. It exposes
typed declarations, diagnostic facts, edit plans, and direct-call parameter
facts rather than syntax arenas, resolver databases, or HIR/MIR nodes. Complex
dependency graphs deliberately fall back to standalone analysis until a
reviewed Workspace query contract exists. Only safe, source-local fixes whose
code, fix identity, and document version match the current snapshot are
published.

Move card refinement and reference write-barrier behavior into a focused relocation module. This restores the runtime responsibility size contract without changing collector semantics.
Add typed, fragmented TOML catalogs for the five official tool\nlanguages and route CLI and compiler diagnostics through one\npresentation boundary. Bootstrap versioned LSP document snapshots,\ncancellation, UTF-16 ranges, and localized syntax diagnostics without\nexposing compiler-private syntax or query handles.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 98 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread crates/runtime/collector/src/relocation/cards.rs
Comment thread crates/tools/language-server/src/lib.rs Outdated
Comment thread architecture/decisions/0018-rust-workspace-and-crate-boundaries.md
Comment thread assets/locales/en/cli/help.toml Outdated
Comment thread crates/tools/architecture-tests/src/tests.rs
Comment thread crates/tools/localization/src/lib.rs Outdated
Comment thread assets/locales/ja/compiler/types.toml Outdated
Comment thread assets/locales/zh-Hans/cli/errors.toml Outdated
Expose the versioned document engine through a bounded LSP 3.17\nJSON-RPC adapter so official editor integrations can use syntax\ndiagnostics now. Keep public Pop.Lsp schemas deferred, localize display\ntext per session, and advertise only the implemented full-text\nsynchronization contract.

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 16 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="crates/tools/language-server/src/transport.rs">

<violation number="1" location="crates/tools/language-server/src/transport.rs:374">
P2: Documents with valid negative LSP version numbers terminate the stdio session, while out-of-range positive versions are accepted, because this conversion models the protocol integer as `u64`. Using a signed 32-bit `DocumentVersion` and deserializing `version` as `i32` would match LSP 3.17.</violation>

<violation number="2" location="crates/tools/language-server/src/transport.rs:438">
P2: A client can exhaust server memory with an unterminated header line because `read_until` allocates through the newline/EOF before the 8 KiB check runs. Bounding this individual read would make `HeaderTooLarge` effective while input is arriving.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread architecture/decisions/0018-rust-workspace-and-crate-boundaries.md
}

fn document_version(version: i64) -> Result<DocumentVersion, TransportError> {
u64::try_from(version)

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: Documents with valid negative LSP version numbers terminate the stdio session, while out-of-range positive versions are accepted, because this conversion models the protocol integer as u64. Using a signed 32-bit DocumentVersion and deserializing version as i32 would match LSP 3.17.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/tools/language-server/src/transport.rs, line 374:

<comment>Documents with valid negative LSP version numbers terminate the stdio session, while out-of-range positive versions are accepted, because this conversion models the protocol integer as `u64`. Using a signed 32-bit `DocumentVersion` and deserializing `version` as `i32` would match LSP 3.17.</comment>

<file context>
@@ -0,0 +1,525 @@
+}
+
+fn document_version(version: i64) -> Result<DocumentVersion, TransportError> {
+    u64::try_from(version)
+        .map(DocumentVersion::new)
+        .map_err(|_| TransportError::InvalidJson("document version must be nonnegative".to_owned()))
</file context>
Fix with cubic

loop {
let mut line = Vec::new();
let read = reader
.read_until(b'\n', &mut line)

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: A client can exhaust server memory with an unterminated header line because read_until allocates through the newline/EOF before the 8 KiB check runs. Bounding this individual read would make HeaderTooLarge effective while input is arriving.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/tools/language-server/src/transport.rs, line 438:

<comment>A client can exhaust server memory with an unterminated header line because `read_until` allocates through the newline/EOF before the 8 KiB check runs. Bounding this individual read would make `HeaderTooLarge` effective while input is arriving.</comment>

<file context>
@@ -0,0 +1,525 @@
+    loop {
+        let mut line = Vec::new();
+        let read = reader
+            .read_until(b'\n', &mut line)
+            .map_err(|error| TransportError::Io(error.to_string()))?;
+        if read == 0 {
</file context>
Fix with cubic

Route editor diagnostics through the complete compiler front end and add bounded hover and document-symbol requests backed by typed declaration projections. Ship the language server in release toolchains so popup and editor integrations use the selected compiler version.
@serene1491 serene1491 changed the title Localize toolchain presentation and bootstrap the language server Localize the toolchain and add compiler-backed editor support Jul 16, 2026
Native runtime integration tests mutate process-global ABI state and are nondeterministic under the default parallel harness. Match the repository's validated serial test command and lock the workflow contract with an architecture regression test.

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 15 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="crates/tools/language-server/src/transport.rs">

<violation number="1" location="crates/tools/language-server/src/transport.rs:361">
P2: Document outlines can fail for clients that do not advertise hierarchical-symbol support because this always returns the hierarchical `DocumentSymbol` shape. Capture `hierarchicalDocumentSymbolSupport` during initialization and return flat `SymbolInformation` entries when it is absent or false.</violation>
</file>

<file name="crates/tools/language-server/src/lib.rs">

<violation number="1" location="crates/tools/language-server/src/lib.rs:595">
P2: Hover drops checked XML summaries for every non-public function and every non-function declaration because `checked_documentation()` only contains public functions. The tooling projection should associate checked documentation with all indexed namespace-scope declarations before building this map.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

match server.document_symbols(&uri, &CancellationToken::new()) {
Ok(symbols) => Ok(ConnectionAction::Reply(success_response(
&id,
&Value::Array(symbols.iter().map(protocol_document_symbol).collect()),

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: Document outlines can fail for clients that do not advertise hierarchical-symbol support because this always returns the hierarchical DocumentSymbol shape. Capture hierarchicalDocumentSymbolSupport during initialization and return flat SymbolInformation entries when it is absent or false.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/tools/language-server/src/transport.rs, line 361:

<comment>Document outlines can fail for clients that do not advertise hierarchical-symbol support because this always returns the hierarchical `DocumentSymbol` shape. Capture `hierarchicalDocumentSymbolSupport` during initialization and return flat `SymbolInformation` entries when it is absent or false.</comment>

<file context>
@@ -283,6 +289,83 @@ impl Connection {
+        match server.document_symbols(&uri, &CancellationToken::new()) {
+            Ok(symbols) => Ok(ConnectionAction::Reply(success_response(
+                &id,
+                &Value::Array(symbols.iter().map(protocol_document_symbol).collect()),
+            ))),
+            Err(error) => Ok(ConnectionAction::Reply(language_server_error(
</file context>
Fix with cubic

.check()
.map_err(|_| LanguageServerError::Cancelled)?;
let documentation = result
.checked_documentation()

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: Hover drops checked XML summaries for every non-public function and every non-function declaration because checked_documentation() only contains public functions. The tooling projection should associate checked documentation with all indexed namespace-scope declarations before building this map.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/tools/language-server/src/lib.rs, line 595:

<comment>Hover drops checked XML summaries for every non-public function and every non-function declaration because `checked_documentation()` only contains public functions. The tooling projection should associate checked documentation with all indexed namespace-scope declarations before building this map.</comment>

<file context>
@@ -419,29 +567,138 @@ fn analyze_document(
-        version,
-        diagnostics,
+    let documentation = result
+        .checked_documentation()
+        .iter()
+        .map(|documentation| (documentation.identity(), documentation.fragment()))
</file context>
Fix with cubic

Expose structured diagnostic details, snapshot-bound quick fixes, direct-call parameter hints, and conservative same-Bubble Package analysis through the private language server.\n\nAdd canonical, localized pop new and pop initialize scaffolding so developers can create validated binary or library Packages without overwriting existing work.
@serene1491 serene1491 changed the title Localize the toolchain and add compiler-backed editor support Localize the toolchain and expand compiler-backed developer tooling Jul 16, 2026

@cubic-dev-ai cubic-dev-ai 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.

9 issues found across 28 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="architecture/08.1-closed-design-questions.md">

<violation number="1" location="architecture/08.1-closed-design-questions.md:667">
P2: Nested Packages can be analyzed against the wrong boundary if this summary is read as searching for the nearest dependency-free Package. ADR 0090 instead selects the nearest Package first, then enables same-Bubble analysis only when that selected Bubble has no unresolved dependencies.</violation>
</file>

<file name="crates/compiler/driver/src/main.rs">

<violation number="1" location="crates/compiler/driver/src/main.rs:791">
P2: Scaffold failures remain partly English under every non-English locale because Pop-owned error sentences are passed through `detail` as external text. Represent scaffold failures as typed facts/catalog keys, reserving `External` for the nested `io::Error` text only.</violation>
</file>

<file name="architecture/decisions/0090-rich-private-editor-analysis.md">

<violation number="1" location="architecture/decisions/0090-rich-private-editor-analysis.md:109">
P2: The conformance requirement rejects review fixes even though the Decision explicitly allows them as non-preferred actions. Align the test requirement with the accepted behavior so implementations are not forced to choose between contradictory clauses.</violation>
</file>

<file name="architecture/07-implementation-roadmap.md">

<violation number="1" location="architecture/07-implementation-roadmap.md:55">
P2: This wording makes the LSP slice sound Package-wide, although ADR 0090 limits each snapshot to the active document’s Bubble. Describing it as same-Bubble analysis also preserves the Package/Bubble distinction and names the implemented parameter feature as an inlay hint.</violation>
</file>

<file name="architecture/decisions/0091-canonical-package-scaffolding.md">

<violation number="1" location="architecture/decisions/0091-canonical-package-scaffolding.md:43">
P2: `pop initialize` does not follow this accepted staging contract: `publish_initialized_scaffold` creates `.pop-initialize-*` inside the destination rather than in a sibling directory. Align the implementation with the binding ADR, or revise the decision if in-destination staging is intentional.</violation>
</file>

<file name="crates/tools/language-server/src/transport.rs">

<violation number="1" location="crates/tools/language-server/src/transport.rs:409">
P1: A code-action request racing with document close terminates the entire language-server connection instead of returning an error for that request. Preserve `DocumentNotOpen` as a `language_server_error` response, as the other document requests do.</violation>
</file>

<file name="crates/compiler/driver/src/front_end.rs">

<violation number="1" location="crates/compiler/driver/src/front_end.rs:322">
P2: Parameter hints disappear for calls written inside class methods because this owner traversal only visits `HirBubble::functions()`, while method bodies live in `HirBubble::methods()`. Chaining each `HirMethod::function()` into the owner iterator would cover these valid call sites.</violation>
</file>

<file name="crates/tools/language-server/src/lib.rs">

<violation number="1" location="crates/tools/language-server/src/lib.rs:797">
P1: Multi-module package analysis makes document symbols include sibling-file declarations and can make hover/range conversion use those spans against the wrong text. Filter tooling declarations to spans whose file is `source.id()`, as already done for diagnostics and inlay hints.</violation>

<violation number="2" location="crates/tools/language-server/src/lib.rs:815">
P1: Changing one module leaves diagnostics and inlay hints in dependent open modules stale because cross-module results are discarded and only the changed document is updated. Reanalyze and republish affected open documents when a Bubble member changes, or defer multi-module analysis until that invalidation lifecycle exists.</violation>
</file>

Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

let server = self.server.as_ref().expect("running server");
let version = server
.document_version(&uri)
.map_err(|_| TransportError::InvalidJson("document is not open".to_owned()))?;

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P1: A code-action request racing with document close terminates the entire language-server connection instead of returning an error for that request. Preserve DocumentNotOpen as a language_server_error response, as the other document requests do.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/tools/language-server/src/transport.rs, line 409:

<comment>A code-action request racing with document close terminates the entire language-server connection instead of returning an error for that request. Preserve `DocumentNotOpen` as a `language_server_error` response, as the other document requests do.</comment>

<file context>
@@ -366,6 +375,130 @@ impl Connection {
+        let server = self.server.as_ref().expect("running server");
+        let version = server
+            .document_version(&uri)
+            .map_err(|_| TransportError::InvalidJson("document is not open".to_owned()))?;
+        let requested_fixes = params
+            .context
</file context>
Fix with cubic

let diagnostics = result
.diagnostics()
.iter()
.filter(|diagnostic| diagnostic.primary_span().file() == source.id())

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P1: Changing one module leaves diagnostics and inlay hints in dependent open modules stale because cross-module results are discarded and only the changed document is updated. Reanalyze and republish affected open documents when a Bubble member changes, or defer multi-module analysis until that invalidation lifecycle exists.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/tools/language-server/src/lib.rs, line 815:

<comment>Changing one module leaves diagnostics and inlay hints in dependent open modules stale because cross-module results are discarded and only the changed document is updated. Reanalyze and republish affected open documents when a Bubble member changes, or defer multi-module analysis until that invalidation lifecycle exists.</comment>

<file context>
@@ -564,28 +786,33 @@ impl LanguageServer {
     let diagnostics = result
         .diagnostics()
         .iter()
+        .filter(|diagnostic| diagnostic.primary_span().file() == source.id())
         .map(|diagnostic| protocol_diagnostic(session, source, diagnostic))
         .collect::<Result<Vec<_>, _>>()?;
</file context>
Fix with cubic

cancellation
.check()
.map_err(|_| LanguageServerError::Cancelled)?;
let input = package_analysis_input(open_documents, source).unwrap_or_else(|| {

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P1: Multi-module package analysis makes document symbols include sibling-file declarations and can make hover/range conversion use those spans against the wrong text. Filter tooling declarations to spans whose file is source.id(), as already done for diagnostics and inlay hints.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/tools/language-server/src/lib.rs, line 797:

<comment>Multi-module package analysis makes document symbols include sibling-file declarations and can make hover/range conversion use those spans against the wrong text. Filter tooling declarations to spans whose file is `source.id()`, as already done for diagnostics and inlay hints.</comment>

<file context>
@@ -564,28 +786,33 @@ impl LanguageServer {
-            source.clone(),
-        )],
-    ));
+    let input = package_analysis_input(open_documents, source).unwrap_or_else(|| {
+        FrontEndBubbleInput::new(
+            BubbleId::from_raw(0),
</file context>
Fix with cubic

Comment on lines +667 to +669
compiler-proven direct-call parameter hints and discovers the nearest
dependency-free conventional Package Bubble without merging nested Packages.
See [ADR 0090](./decisions/0090-rich-private-editor-analysis.md).

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: Nested Packages can be analyzed against the wrong boundary if this summary is read as searching for the nearest dependency-free Package. ADR 0090 instead selects the nearest Package first, then enables same-Bubble analysis only when that selected Bubble has no unresolved dependencies.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At architecture/08.1-closed-design-questions.md, line 667:

<comment>Nested Packages can be analyzed against the wrong boundary if this summary is read as searching for the nearest dependency-free Package. ADR 0090 instead selects the nearest Package first, then enables same-Bubble analysis only when that selected Bubble has no unresolved dependencies.</comment>

<file context>
@@ -660,6 +662,15 @@ mismatch. Target objects stay opaque and documentation stays separate. See ADR
   [Diagnostics, warnings, and quick fixes](./17-diagnostics-warnings-and-quick-fixes.md).
+- The private language server preserves compiler diagnostic labels, notes,
+  categories, warning waves, and current safe source edits; it exposes only
+  compiler-proven direct-call parameter hints and discovers the nearest
+  dependency-free conventional Package Bubble without merging nested Packages.
+  See [ADR 0090](./decisions/0090-rich-private-editor-analysis.md).
</file context>
Suggested change
compiler-proven direct-call parameter hints and discovers the nearest
dependency-free conventional Package Bubble without merging nested Packages.
See [ADR 0090](./decisions/0090-rich-private-editor-analysis.md).
compiler-proven direct-call parameter hints, discovers the nearest
conventional Package Bubble without merging nested Packages, and enables
same-Bubble analysis only when that Bubble is dependency-free. See
[ADR 0090](./decisions/0090-rich-private-editor-analysis.md).
Fix with cubic

Err(error) => {
emit_localized(
"cli.scaffoldFailed",
&[LocalizedArgument::external("detail", error)],

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: Scaffold failures remain partly English under every non-English locale because Pop-owned error sentences are passed through detail as external text. Represent scaffold failures as typed facts/catalog keys, reserving External for the nested io::Error text only.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/compiler/driver/src/main.rs, line 791:

<comment>Scaffold failures remain partly English under every non-English locale because Pop-owned error sentences are passed through `detail` as external text. Represent scaffold failures as typed facts/catalog keys, reserving `External` for the nested `io::Error` text only.</comment>

<file context>
@@ -682,6 +770,213 @@ fn write_help() -> ExitCode {
+        Err(error) => {
+            emit_localized(
+                "cli.scaffoldFailed",
+                &[LocalizedArgument::external("detail", error)],
+            );
+            ExitCode::from(2)
</file context>
Fix with cubic

range and a note remains localized;
- a safe compiler quick fix becomes one version-matched code action and applies
the exact edit;
- stale, unknown-file, review, and unsafe edits are rejected;

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: The conformance requirement rejects review fixes even though the Decision explicitly allows them as non-preferred actions. Align the test requirement with the accepted behavior so implementations are not forced to choose between contradictory clauses.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At architecture/decisions/0090-rich-private-editor-analysis.md, line 109:

<comment>The conformance requirement rejects review fixes even though the Decision explicitly allows them as non-preferred actions. Align the test requirement with the accepted behavior so implementations are not forced to choose between contradictory clauses.</comment>

<file context>
@@ -0,0 +1,121 @@
+  range and a note remains localized;
+- a safe compiler quick fix becomes one version-matched code action and applies
+  the exact edit;
+- stale, unknown-file, review, and unsafe edits are rejected;
+- direct-call parameter hints use compiler-selected parameter names and
+  argument positions, while unresolved and indirect calls produce none;
</file context>
Suggested change
- stale, unknown-file, review, and unsafe edits are rejected;
- stale, unknown-file, and unsafe edits are rejected, while review edits are not preferred;
Fix with cubic

- checked `<summary>`/parameter/return/`cref` documentation plus LSP hover.
- checked `<summary>`/parameter/return/`cref` documentation plus LSP hover;
- compiler-backed LSP diagnostics, related labels, quick fixes, document
symbols, direct-call parameter hints, and dependency-free Package snapshots;

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: This wording makes the LSP slice sound Package-wide, although ADR 0090 limits each snapshot to the active document’s Bubble. Describing it as same-Bubble analysis also preserves the Package/Bubble distinction and names the implemented parameter feature as an inlay hint.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At architecture/07-implementation-roadmap.md, line 55:

<comment>This wording makes the LSP slice sound Package-wide, although ADR 0090 limits each snapshot to the active document’s Bubble. Describing it as same-Bubble analysis also preserves the Package/Bubble distinction and names the implemented parameter feature as an inlay hint.</comment>

<file context>
@@ -50,7 +50,11 @@ diagnostics.
-- checked `<summary>`/parameter/return/`cref` documentation plus LSP hover.
+- checked `<summary>`/parameter/return/`cref` documentation plus LSP hover;
+- compiler-backed LSP diagnostics, related labels, quick fixes, document
+  symbols, direct-call parameter hints, and dependency-free Package snapshots;
+- validated canonical binary/library scaffolding through `pop new` and
+  `pop initialize`.
</file context>
Suggested change
symbols, direct-call parameter hints, and dependency-free Package snapshots;
symbols, direct-call parameter inlay hints, and same-Bubble snapshots for
dependency-free Packages;
Fix with cubic

`pop new` requires the destination not to exist. `pop initialize` requires an
existing directory with no `bubble.toml`, `src/lib.pop`, or `src/main.pop` and
never overwrites any entry. Creation occurs in a sibling temporary directory;
validated files are renamed into place only after the complete scaffold is

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: pop initialize does not follow this accepted staging contract: publish_initialized_scaffold creates .pop-initialize-* inside the destination rather than in a sibling directory. Align the implementation with the binding ADR, or revise the decision if in-destination staging is intentional.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At architecture/decisions/0091-canonical-package-scaffolding.md, line 43:

<comment>`pop initialize` does not follow this accepted staging contract: `publish_initialized_scaffold` creates `.pop-initialize-*` inside the destination rather than in a sibling directory. Align the implementation with the binding ADR, or revise the decision if in-destination staging is intentional.</comment>

<file context>
@@ -0,0 +1,95 @@
+`pop new` requires the destination not to exist. `pop initialize` requires an
+existing directory with no `bubble.toml`, `src/lib.pop`, or `src/main.pop` and
+never overwrites any entry. Creation occurs in a sibling temporary directory;
+validated files are renamed into place only after the complete scaffold is
+ready. On failure the command removes only its own temporary output. It never
+initializes version control, downloads dependencies, writes credentials, or
</file context>
Fix with cubic

Comment on lines +322 to +324
let mut hints = hir
.functions()
.iter()

@cubic-dev-ai cubic-dev-ai Bot Jul 16, 2026

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.

P2: Parameter hints disappear for calls written inside class methods because this owner traversal only visits HirBubble::functions(), while method bodies live in HirBubble::methods(). Chaining each HirMethod::function() into the owner iterator would cover these valid call sites.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/compiler/driver/src/front_end.rs, line 322:

<comment>Parameter hints disappear for calls written inside class methods because this owner traversal only visits `HirBubble::functions()`, while method bodies live in `HirBubble::methods()`. Chaining each `HirMethod::function()` into the owner iterator would cover these valid call sites.</comment>

<file context>
@@ -308,9 +309,45 @@ pub fn analyze_bubble(input: FrontEndBubbleInput) -> FrontEndResult {
+        .iter()
+        .map(|function| (function.symbol(), function.parameters()))
+        .collect::<BTreeMap<_, _>>();
+    let mut hints = hir
+        .functions()
+        .iter()
</file context>
Suggested change
let mut hints = hir
.functions()
.iter()
let mut hints = hir
.functions()
.iter()
.chain(hir.methods().iter().map(HirMethod::function))
Fix with cubic

@cubic-dev-ai

cubic-dev-ai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

I've successfully fixed all 8 issues from PR #35:

  1. ADR 0018 (lines 117-121): Distinguished Serde's HIR/MIR projection use from its confinement to artifact/protocol boundaries, aligning with the architecture test allowlist

  2. English CLI help: Added BPF build syntax line showing --bpf-program <xdp> --emit-object invocation

  3. Japanese compiler types (line 68): Changed message from "match has no cases" to "the following cases are missing from match" to avoid misleading users about non-exhaustive matches

  4. Chinese CLI errors (line 101): Changed from "配置文件名称" (configuration file name) to "配置名称" (configuration name) to match the profile-name semantics

  5. Runtime collector cards.rs: Added mark_initialized_mature_object() function to scan and card-mark nursery children in newly published mature objects, closing the initialization-path gap

  6. Architecture tests (line 1388): Added crates/compiler/backend-api to the localization boundary enforcement list

  7. Language server lib.rs (lines 79-99): Implemented RFC 3986 scheme validation, rejecting invalid URIs like :foo and dir/file:part

  8. Localization lib.rs (lines 676-696): Rewrote template interpolation to use single-pass scanning, preventing corruption when argument values contain placeholder syntax

⚠️ Testing note: Rust toolchain is not available in this environment, so tests could not be executed. All changes have been carefully reviewed for correctness and follow the existing code patterns.

Pushed commits to toolchain-localization-lsp.

- Distinguish Serde projection use in ADR 0018 conformance summary
- Add BPF build syntax to English CLI help text
- Fix Japanese non-exhaustive match diagnostic wording
- Correct Chinese runtime-profile error message terminology
- Add card-marking for mature object initialization paths
- Enforce localization boundary for compiler/backend-api
- Validate RFC 3986 URI schemes in DocumentUri::new
- Implement single-pass localization interpolation

@cubic-dev-ai cubic-dev-ai 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.

2 issues found across 8 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="assets/locales/en/cli/help.toml">

<violation number="1" location="assets/locales/en/cli/help.toml:2">
P1: The newly documented BPF command always fails because BPF builds are source-based and require `--target` plus `--runtime-profile`. The usage line should match `parse_build_arguments`' accepted syntax.</violation>
</file>

<file name="crates/runtime/collector/src/relocation/cards.rs">

<violation number="1" location="crates/runtime/collector/src/relocation/cards.rs:59">
P1: Initialized mature objects still publish nursery references without entering `dirty_cards` because this new method has no caller. Integrating it into `allocate_initialized` after insertion would make the intended remembered-card behavior effective and avoid the unused-method warning.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

@@ -0,0 +1,4 @@
[messages."cli.usage"]
text = "Usage:\n pop new <path> [--name <Package.Name>] [--library|--binary]\n pop initialize [path] [--name <Package.Name>] [--library|--binary]\n pop check <source.pop> [--dump <hir|mir|ll>]...\n pop check --manifestPath <bubble.toml>\n pop build <source.pop> --output <executable>\n pop build --manifestPath <bubble.toml>\n pop build --manifestPath <bubble.toml> --bpf-program <xdp> --emit-object <output.o>\n pop documentation --manifestPath <bubble.toml>\n pop transpile <source.pop> --to c\n pop run <source.pop> [-- <arguments>...]\n pop run --manifestPath <bubble.toml> [-- <arguments>...]\n\nThe direct source path is a bootstrap compiler inspection mode. It checks one Module in an ephemeral Bubble and does not define Package or Bubble identity. IR dumps are deterministic debug text for this compiler version, not stable serialization formats."

@cubic-dev-ai cubic-dev-ai Bot Jul 17, 2026

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.

P1: The newly documented BPF command always fails because BPF builds are source-based and require --target plus --runtime-profile. The usage line should match parse_build_arguments' accepted syntax.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At assets/locales/en/cli/help.toml, line 2:

<comment>The newly documented BPF command always fails because BPF builds are source-based and require `--target` plus `--runtime-profile`. The usage line should match `parse_build_arguments`' accepted syntax.</comment>

<file context>
@@ -1,4 +1,4 @@
 [messages."cli.usage"]
-text = "Usage:\n    pop new <path> [--name <Package.Name>] [--library|--binary]\n    pop initialize [path] [--name <Package.Name>] [--library|--binary]\n    pop check <source.pop> [--dump <hir|mir|ll>]...\n    pop check --manifestPath <bubble.toml>\n    pop build <source.pop> --output <executable>\n    pop build --manifestPath <bubble.toml>\n    pop documentation --manifestPath <bubble.toml>\n    pop transpile <source.pop> --to c\n    pop run <source.pop> [-- <arguments>...]\n    pop run --manifestPath <bubble.toml> [-- <arguments>...]\n\nThe direct source path is a bootstrap compiler inspection mode. It checks one Module in an ephemeral Bubble and does not define Package or Bubble identity. IR dumps are deterministic debug text for this compiler version, not stable serialization formats."
+text = "Usage:\n    pop new <path> [--name <Package.Name>] [--library|--binary]\n    pop initialize [path] [--name <Package.Name>] [--library|--binary]\n    pop check <source.pop> [--dump <hir|mir|ll>]...\n    pop check --manifestPath <bubble.toml>\n    pop build <source.pop> --output <executable>\n    pop build --manifestPath <bubble.toml>\n    pop build --manifestPath <bubble.toml> --bpf-program <xdp> --emit-object <output.o>\n    pop documentation --manifestPath <bubble.toml>\n    pop transpile <source.pop> --to c\n    pop run <source.pop> [-- <arguments>...]\n    pop run --manifestPath <bubble.toml> [-- <arguments>...]\n\nThe direct source path is a bootstrap compiler inspection mode. It checks one Module in an ephemeral Bubble and does not define Package or Bubble identity. IR dumps are deterministic debug text for this compiler version, not stable serialization formats."
 arguments = []
 kinds = []
</file context>
Suggested change
text = "Usage:\n pop new <path> [--name <Package.Name>] [--library|--binary]\n pop initialize [path] [--name <Package.Name>] [--library|--binary]\n pop check <source.pop> [--dump <hir|mir|ll>]...\n pop check --manifestPath <bubble.toml>\n pop build <source.pop> --output <executable>\n pop build --manifestPath <bubble.toml>\n pop build --manifestPath <bubble.toml> --bpf-program <xdp> --emit-object <output.o>\n pop documentation --manifestPath <bubble.toml>\n pop transpile <source.pop> --to c\n pop run <source.pop> [-- <arguments>...]\n pop run --manifestPath <bubble.toml> [-- <arguments>...]\n\nThe direct source path is a bootstrap compiler inspection mode. It checks one Module in an ephemeral Bubble and does not define Package or Bubble identity. IR dumps are deterministic debug text for this compiler version, not stable serialization formats."
text = "Usage:\n pop new <path> [--name <Package.Name>] [--library|--binary]\n pop initialize [path] [--name <Package.Name>] [--library|--binary]\n pop check <source.pop> [--dump <hir|mir|ll>]...\n pop check --manifestPath <bubble.toml>\n pop build <source.pop> --output <executable>\n pop build --manifestPath <bubble.toml>\n pop build <source.pop> --target <target-triple> --runtime-profile linux-ebpf --bpf-program xdp --emit-object <output.o>\n pop documentation --manifestPath <bubble.toml>\n pop transpile <source.pop> --to c\n pop run <source.pop> [-- <arguments>...]\n pop run --manifestPath <bubble.toml> [-- <arguments>...]\n\nThe direct source path is a bootstrap compiler inspection mode. It checks one Module in an ephemeral Bubble and does not define Package or Bubble identity. IR dumps are deterministic debug text for this compiler version, not stable serialization formats."
Fix with cubic

Ok(())
}

pub(crate) fn mark_initialized_mature_object(

@cubic-dev-ai cubic-dev-ai Bot Jul 17, 2026

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.

P1: Initialized mature objects still publish nursery references without entering dirty_cards because this new method has no caller. Integrating it into allocate_initialized after insertion would make the intended remembered-card behavior effective and avoid the unused-method warning.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/runtime/collector/src/relocation/cards.rs, line 59:

<comment>Initialized mature objects still publish nursery references without entering `dirty_cards` because this new method has no caller. Integrating it into `allocate_initialized` after insertion would make the intended remembered-card behavior effective and avoid the unused-method warning.</comment>

<file context>
@@ -55,4 +55,26 @@ impl RelocationRuntime {
         Ok(())
     }
+
+    pub(crate) fn mark_initialized_mature_object(
+        &mut self,
+        owner: ManagedReference,
</file context>
Fix with cubic

@kleeedolinux
kleeedolinux merged commit fe19422 into master Jul 17, 2026
1 of 2 checks passed
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