You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Five registry families match on bare strings at runtime with no single owner or explicit versioning policy:
Compiler API method strings — crates/bamts-cli/src/api_server/session.rs:159-199 matches initialize, shutdown, ten service/* methods, fourteen ast/* methods, and three compiler/* methods. npm bamti mirrors these in internal/session.js / internal/transport.js and unstable/* wrappers; the exported Transport.request(method, …) lets any caller invoke any string.
LSP method/lifecycle strings — lsp.rs dispatch with Content-Length JSON-RPC framing, 16 MiB message cap, UTF-16 positions (research snapshot: crates/bamts-cli/src/lsp.rs:80,622-733,1264-1313). Editor consumers outside the repo are unaccounted.
Native helper symbols — 53 #[no_mangle] helpers in crates/bamts-native/src/native_bridge.rs (the table already moved once from lib.rs:52-463 in the research snapshot), duplicated by bamts-codegen::Helper indices/symbol names. Generated code, the JIT binder, static archives, and the AOT linker match by string; native ABI version 1 is a separate axis.
External module and export names — crates/bamts-runtime/src/external_modules.rs:24-56 installs node:util (parseArgs) and node:crypto (createHash; internals hash.update, hash.digest); script_compiler gates extra installs at :58-59.
The decision to make is: per family, choose the canonical owner (which crate/module holds the constants), whether the family is a versioned external surface or an internal name, and the exhaustive-comparison mechanism that must pass before any cutover. This ticket does not choose the npm target/release table authority itself — that is the sibling npm artifact distribution boundary ticket under #156 — it treats those package names as one of the string-selectable consumers that must be enumerated.
Consumer evidence required
Exhaustive string inventory per family from both sides of every crossing: Rust dispatch ↔ npm session/transport/wrappers; native table ↔ codegen emission + generated archives + linker; runtime registry ↔ scripts importing the specifiers; env names ↔ launcher / AOT entry / Cargo links protocol / operators.
Wire-version evidence for method names: answer .outline/research/workspace-boundaries.md unresolved question 7 — are method names versioned independently from cliProtocol? Answer from consumer data, not naming.
External consumer accounting: direct bamts-* Rust module consumers (.outline/research/workspace-boundaries.md question 5), editor LSP method subsets (question 12), and out-of-repo release automation (question 13); where unreachable, record unreachability and the resulting bound on the decision.
The moving tree: the helper table already changed files during the rebuild (lib.rs → native_bridge.rs). Any owner decision must include a mechanical re-runnable check, not a one-shot list.
In-flight platform rebuild may add env names or external modules (e.g., intl provider work). The comparison gate must be repeatable, not a snapshot.
N-API addon surface JS names (run, releaseMetadata) in crates/bamts-napi/src/lib.rs and their mapping through npm/bamti/native-loader.js:237-259,279-328 (research snapshot).
No-go conditions
No rename, removal, or dedup of any string in any family until the exhaustive comparison across Rust, generated code, JS loaders, npm manifests, workflows, and addon metadata passes on both sides.
The bamts-codegen / bamts-native helper-table duplication is an explicit decision family (.outline/research/workspace-boundaries.md duplicate-owners section); do not collapse it as a side effect of registry cleanup.
Local static search never proves external absence; no family may be classified interior on repository-only evidence.
Observable acceptance
Per family: a mechanically produced inventory (repeatable command named in the decision) of every live string constant with owner, both-side consumers (file:line), and its version axis.
Written ownership decision per family: owning module, external-vs-internal classification, and versioning rule (which axis bumps and what bumps with it).
Fail-closed comparison gate demonstrated on one seeded mismatch per family (e.g., generated helper name vs native table entry) — it fails, not warns.
Explicit statement of unresolved external consumers and how the decision is bounded by them.
Question
Five registry families match on bare strings at runtime with no single owner or explicit versioning policy:
crates/bamts-cli/src/api_server/session.rs:159-199matchesinitialize,shutdown, tenservice/*methods, fourteenast/*methods, and threecompiler/*methods. npmbamtimirrors these ininternal/session.js/internal/transport.jsandunstable/*wrappers; the exportedTransport.request(method, …)lets any caller invoke any string.lsp.rsdispatch with Content-Length JSON-RPC framing, 16 MiB message cap, UTF-16 positions (research snapshot:crates/bamts-cli/src/lsp.rs:80,622-733,1264-1313). Editor consumers outside the repo are unaccounted.#[no_mangle]helpers incrates/bamts-native/src/native_bridge.rs(the table already moved once fromlib.rs:52-463in the research snapshot), duplicated bybamts-codegen::Helperindices/symbol names. Generated code, the JIT binder, static archives, and the AOT linker match by string; native ABI version 1 is a separate axis.crates/bamts-runtime/src/external_modules.rs:24-56installsnode:util(parseArgs) andnode:crypto(createHash; internalshash.update,hash.digest);script_compilergates extra installs at:58-59.BAMTS_AOT_ENTRYPOINT/BAMTS_AOT_LAUNCH_TOKEN(crates/bamts-node/src/lib.rs:22,28),BAMTS_NODE_STATICLIB/BAMTS_HOST_TARGET/BAMTS_BUILD_TARGET(crates/bamts-cli/build.rs:55-59→crates/bamts-cli/src/driver.rs:69-71),BAMTS_CACHE_DIR(driver.rs:2781),DEP_BAMTS_NODE_RLIB(Cargo links-key,build.rs:25,53), and npm package selectors inCLI_TARGETS/NATIVE_TARGETS(npm/bamti-cli/index.js:21-31,npm/bamti/native-loader.js:19-67).The decision to make is: per family, choose the canonical owner (which crate/module holds the constants), whether the family is a versioned external surface or an internal name, and the exhaustive-comparison mechanism that must pass before any cutover. This ticket does not choose the npm target/release table authority itself — that is the sibling
npm artifact distributionboundary ticket under #156 — it treats those package names as one of the string-selectable consumers that must be enumerated.Consumer evidence required
.outline/research/workspace-boundaries.mdunresolved question 7 — are method names versioned independently fromcliProtocol? Answer from consumer data, not naming.bamts-*Rust module consumers (.outline/research/workspace-boundaries.mdquestion 5), editor LSP method subsets (question 12), and out-of-repo release automation (question 13); where unreachable, record unreachability and the resulting bound on the decision.Unresolved boundary channels
lib.rs→native_bridge.rs). Any owner decision must include a mechanical re-runnable check, not a one-shot list.run,releaseMetadata) incrates/bamts-napi/src/lib.rsand their mapping throughnpm/bamti/native-loader.js:237-259,279-328(research snapshot).No-go conditions
bamts-codegen/bamts-nativehelper-table duplication is an explicit decision family (.outline/research/workspace-boundaries.mdduplicate-owners section); do not collapse it as a side effect of registry cleanup.Observable acceptance
Blocked by