Skip to content

fix(nsolid): read source by the script's thread and its exact path - #81

Merged
brycebaril merged 1 commit into
nsolid-console-7from
source-code-thread-exact-path
Nov 3, 2026
Merged

brycebaril merged 1 commit into
nsolid-console-7from
source-code-thread-exact-path

Conversation

@brycebaril

Copy link
Copy Markdown
Contributor

What

get_source_code looks a script up by its V8 id on one thread. The process also matches the path exactly as it loaded the script, so an ES module's path keeps file://. The skills told the model to retry a failed call with file://, /app or /usr/src/app stripped, or with leading segments removed. Those retries can never match. Now the skills:

  • pass the path exactly as the profile, sample or stack gives it, with that thread's threadId;
  • go on without the code when the call fails, instead of retrying;
  • in ns-analyze-event, take the process and thread from event_stacks: latest.agentId, and latest.threadId when the stack ran on a worker thread.

This follows the N|Solid Console 7 MCP server, which adds latest.threadId to event_stacks and makes get_source_code look only at the profiles of the thread asked for.

Checks

The pre-commit hook (lint, typecheck, tests) passed under Node 22.

🤖 Generated with Claude Code

get_source_code looks a script up by its V8 id on one thread, and the
process matches the path exactly as it loaded it (an ES module's keeps
file://). Stripping file://, /app or /usr/src/app never finds it, so the
skills no longer retry with tweaked paths: they pass the path as the
profile, sample or stack gives it, with that thread's threadId, and go on
without the code if the call fails. Event stacks give the thread as
latest.threadId when they ran on a worker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ns-control-tower

ns-control-tower commented Oct 29, 2026 •

Copy link
Copy Markdown

Walkthrough

Docs-only change to four skill files. get_source_code is now called with the script path exactly as the profile, sample, stack or asset provides it, together with the threadId the data came from — no more retrying with stripped file:// / /app / /usr/src/app prefixes, which can never match because the process resolves a script by the path it loaded it from, per thread. ns-analyze-event additionally derives the process and thread from event_stacks (latest.agentId, and latest.threadId when the stack ran on a worker).

Assessment

  • Old retry guidance verified fully removed: repo-wide search at HEAD finds no file:// path-tweak instructions left in skills (the stripping /app … deploy prefixes text that remains is the unchanged workspace-mapping helper, not a runtime path retry).
  • All four call sites now carry a thread id and an explicit failure fallback: skills/ns-advanced-memory-leak-hunter/SKILL.md:53, skills/ns-analyze-asset/SKILL.md:82, skills/ns-analyze-event/SKILL.md:42, skills/ns-cpu-spike-analysis/SKILL.md:83.
  • No duplicated or materialized copies of the changed prose; node scripts/sync-plugin-assets.mjs --check reports plugin:sync up to date.
  • CI: test run 40914589317 green on ubuntu-latest, macos-latest and windows-latest (install, lint, build, tests, marketplace install).
  • The server-side contract this aligns with (per-thread get_source_code lookup, latest.threadId on event_stacks) lives in the N|Solid Console 7 MCP server, outside this repository — not verifiable here; the doc text matches the contract described in the PR.

Verdict: APPROVE — focused, consistent documentation fix; removes retry paths that can never match and pins each runtime source read to its thread. CI is green on all three OSes.

@brycebaril
brycebaril merged commit f33a015 into nsolid-console-7 Nov 3, 2026
5 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