nemo-relay-instrument-context-isolation
Use this skill when concurrent requests, async tasks, threads, workers, goroutines, or agents need independent NeMo Relay scope stacks and correct ancestry propagation.
- 0
- Installs
- —
- Rating
- —
- Success rate
- 4
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 a28b5076a5790983… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
Use Context Isolation
Use this skill when an application runs concurrent requests, worker pools, async tasks, goroutines, or multiple agents in the same process. Treat scope-stack ownership as part of the request boundary.
Core Rule
Each independent request, agent, or workflow needs its own scope stack. Do not share one mutable stack across unrelated concurrent work unless you want shared ancestry and shared scope-local middleware.
Embedded Scope Model
- A root scope is always present, and pushed scopes form a parent-child tree beneath it.
- Scope hierarchy determines event parentage, lifetime boundaries, and visibility for scope-local middleware and subscribers.
- Standard scope types include
Agent,Function,Tool,Llm,Retriever,Embedder,Reranker,Guardrail,Evaluator,Custom, andUnknown. - Scope start and end events can carry semantic
inputandoutputpayloads when the scope represents a request, task, or meaningful result boundary. - Scope-local registrations disappear when the owning scope closes; use them for behavior that should not outlive a request or agent run.
- Mark events are useful for retries, checkpoints, interrupts, and important state transitions that are not full spans.
Per-Language Defaults
- Python: rely on task-local behavior via
get_scope_stack()andcontextvars, or explicitly propagate when work leaves the current execution context - Rust core: use runtime helpers such as
create_scope_stack(),current_scope_stack(), andset_thread_scope_stack(...)when an integration needs explicit stack ownership - Go: use
NewScopeStack()andScopeStack.Run(...)for goroutine-safe usage - Node.js: create and set a scope stack explicitly for the current execution
path with
createScopeStack()andsetThreadScopeStack(...)
Common Failures
- Events from different requests appear under one root UUID
- Scope-local middleware leaks across requests
- Worker-thread work runs without the expected active scope
- Integrations activate NeMo Relay without an explicitly initialized stack
- Relying on a thread-local stack after crossing async tasks, goroutines, or JS worker boundaries
Related Skills
nemo-relay-instrument-callsnemo-relay-plugin-observabilitynemo-relay-debug-runtime-integration
Files
4- BENCHMARK.md
f6687bfb1d3.8 KB - SKILL.md
3a6faa4fc12.6 KB - evals/evals.json
2319ea90b15.0 KB - skill-card.md
1deed8b0223.9 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from NVIDIA/skills8
Official NVIDIA-authored guidance for NVIDIA cuDF GPU DataFrames, pandas acceleration, dask-cuDF, ETL, joins, groupby, CSV/Parquet I/O, nullable semantics, and multi-GPU DataFrame workloads.
Use when asked to install, deploy, run, validate, troubleshoot, or stop NVIDIA AI-Q Blueprint infrastructure.
Use when asked to run deep research or AI-Q research through a reachable NVIDIA AI-Q Blueprint backend.
Customize NVIDIA Nemotron Voice Agent's Generic Pipecat example for healthcare appointment, five-field patient intake, or custom tool-calling workflows without a separate backend.
Calibrate a new dataset from live RTSP camera streams via the AutoMagicCalib REST API. Use when the user provides RTSP URLs or asks to calibrate live cameras; VIOS records clips, AMC ingests them, then runs calibration.
Run end-to-end calibration on the shipped sample dataset (sdg_08_2_sample_data_010926.zip) against a running AMC microservice. Use when user says 'test sample dataset', 'run sample calibration', 'verify AMC install', or 'launch and test'.
Calibrates pre-recorded `cam_*.mp4` datasets through the AutoMagicCalib REST API. Use for user-supplied local MP4s; route live RTSP streams to `amc-run-rtsp-calibration`.
Launch AutoMagicCalib microservice and web UI from NGC release images via Docker Compose. Use when user says 'deploy auto calibration', 'launch auto calibration', 'launch AMC', 'start MS+UI', or 'set up auto-magic-calib'. Requires NGC API key.