Repository navigation
Native modules: Bun, Nix shell, container; /modules explain and timings (#364, #365) - #417
Merged
Merged
Conversation
…mings (#364, #365) Bun's requested version comes from .bun-version or package.json (packageManager, engines.bun) and the active one from its install location; the Nix shell module reads IN_NIX_SHELL; the container module names Docker, Podman, a dev container or Codespaces from marker files and host variables. Nothing is run. IN_NIX_SHELL, REMOTE_CONTAINERS and CODESPACES join the shell's allowlisted environment report. A Context Pack may now require 24 capabilities (as many as its modules), since the project pack needed a 17th. /modules explain and /modules timings write plain-text reports from the engine's snapshots: each configured module's surface, visibility reason and sources' state, age and timing; or the slowest last collections. No value is shown and nothing is collected to produce them.
This was referenced Oct 18, 2026
This was referenced Oct 18, 2026
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.
Stacked on #416 (
/track) → #415 → #414 → #413 → #412 → #411. Merge in order.What
Modules (#364)
These are the remaining safe candidates from the coverage matrix. All three follow the existing rules: declarative files, allowlisted variables and marker-file presence only, and nothing is ever run.
nmsh.project.bun-version, orpackage.json(packageManager: "bun@…"is exact,engines.bunis a range); active version from the install location;onCommand(bun,bunx); recommended whenbun.lock(b),bunfig.tomlor.bun-versionexistsnmsh.environmentIN_NIX_SHELL→pure/impure(activefor older nix that sets1); recommended forflake.nix/shell.nixnmsh.systemCODESPACES/REMOTE_CONTAINERS=true, then/run/.containerenv(Podman) or/.dockerenv(Docker) presence; contents are never readSupporting changes:
IN_NIX_SHELL,REMOTE_CONTAINERSandCODESPACESjoin the shell's allowlisted value report. The snapshot protocol carries uppercase names only, which is why Nix's lowercasenameis not used.requiresbound rises from 16 to 24, the same asmodules. The project pack needed a 17th capability. The bound was undocumented, and the larger limit still holds packs to a fixed size.code,cubes); no new code points were guessed.Diagnostics (#365)
devalready shows per-module Why, Source (scope and trust), Cache (TTL, invalidation, refresh) and per-capability state, age and timing. This adds the two gaps the issue lists:/modules explainwrites, for each configured module, its surface, whether it is on screen and why, and each source's state, age, last collection time and evidence summary./modules timingswrites the slowest last collections, with honest wording when nothing was measured.Both are written as transcript blocks from the engine's snapshots: no values are shown and nothing is collected.
The coverage matrix (
docs/design/native-module-coverage.md) is updated with a dated v0.21 review. Kotlin/Scala, Lua and Haskell remain candidates, with reasons given.Tests
contextCapabilities.test.ts:package.json(an injectedpackageManager, a non-objectengines) stays inert data;moduleReport.test.ts: parse; explain (routing, off, uninstalled, inert evidence, snapshot-only); timings (order, bound, empty).nmsh.project· 17 modules).Not verified
Physical checks:
docs/testing/v021-physical-qa.mdsection 6 (Nix and container need such hosts). Not run.Refs #364, #365, #410