[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-nvidia-sflow-code-review":3,"mdc-9q7brb-key":34,"related-org-nvidia-sflow-code-review":1565,"related-repo-nvidia-sflow-code-review":1722},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"sflow-code-review","review sflow code changes","Review sflow code changes for functional defects, modular by-purpose structure, duplicated logic that should be consolidated, and adequate unit + e2e CLI test coverage. Use when reviewing an sflow diff, branch, PR, staged changes, or when the user asks for a code review of sflow.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"nvidia","NVIDIA","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fnvidia.png",[12,16,17,20],{"name":13,"slug":14,"type":15},"Code Review","code-review","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Engineering","engineering",{"name":21,"slug":22,"type":15},"Testing","testing",36,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fnv-sflow","2026-07-23T06:06:17.700089",null,6,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"A Python CLI workflow orchestrator with pluggable backends (e.g. local, Slurm) for running declarative YAML DAGs, collecting logs, and organizing outputs consistently.","https:\u002F\u002Fgithub.com\u002FNVIDIA\u002Fnv-sflow\u002Ftree\u002FHEAD\u002Fsrc\u002Fsflow\u002Fskills\u002Fsflow-code-review","---\nname: sflow-code-review\ndescription: >-\n  Review sflow code changes for functional defects, modular by-purpose structure,\n  duplicated logic that should be consolidated, and adequate unit + e2e CLI test\n  coverage. Use when reviewing an sflow diff, branch, PR, staged changes, or when\n  the user asks for a code review of sflow.\n---\n\n# sflow Code Review\n\nStructured review of sflow changes against four aspects: functional defects, modular\nstructure, duplication, and test coverage. Findings are advisory — report them, do not\nsilently rewrite the author's code unless asked.\n\n## When to use\n\n- The user asks to review a diff, branch, PR, staged changes, or \"my sflow changes\".\n- Before committing or opening a PR in this repo.\n- After finishing a feature\u002Ffix and you want a self-check.\n\n## Review workflow\n\nCopy this checklist into TodoWrite and work through it in order:\n\n```\n- [ ] Step 0: Scope the change (collect the diff + changed symbols)\n- [ ] Aspect 1: Functional defects in the changed lines\n- [ ] Aspect 2: Modular \u002F by-purpose structure\n- [ ] Aspect 3: Redundant logic that should be consolidated\n- [ ] Aspect 4: Test coverage + test-integrity policy\n- [ ] Verify: run focused tests \u002F coverage \u002F dry-run\n- [ ] Report findings grouped by aspect and severity\n```\n\nDo not skip Step 0 — every later aspect needs the exact set of changed files and symbols.\n\n## Step 0: Scope the change\n\nActivate the venv first (project rule), then collect the diff. Pick the base ref that\nmatches what is being reviewed (`main`, a PR base, `--staged`, or `HEAD~1`).\n\n```bash\nsource .venv\u002Fbin\u002Factivate            # Windows: .venv\\Scripts\\activate\ngit status\ngit diff --stat main...HEAD          # files touched\ngit diff main...HEAD                  # full change (or --staged for staged review)\n```\n\nThen, for each non-trivial changed function\u002Fclass\u002Fmethod, find its callers (the blast\nradius) with a quick search — e.g. `grep -rn \"changed_symbol\" src tests` — so you know\nwhat an incompatible change would break. Confirm the change set only touches what the\nauthor intended, and that every direct caller of a changed signature\u002Fdefault was updated.\nNote the area each file belongs to (see `reference.md` layer map) — this drives Aspects 2–4.\n\n## Aspect 1 — Functional defects\n\nRead every changed hunk and ask \"what input makes this wrong?\" Prioritize the changed\nlines and their direct callers (found in Step 0).\n\nGeneral checks:\n\n- Edge cases: `None`\u002Fempty\u002Fmissing keys, empty lists, zero\u002Fnegative counts, off-by-one.\n- Mutable default args, shared mutable state, accidental aliasing of dicts\u002Flists.\n- Error handling: swallowed exceptions, wrong exception type, missing `sflow`\n  `exceptions.py` usage, unclear messages.\n- Control flow: inverted conditions, early `return`\u002F`continue` skipping cleanup.\n- Backward compatibility: changed function signatures, renamed YAML keys, changed\n  defaults — confirm all direct callers were updated.\n\nsflow-specific defect hotspots (verify the behavior end to end, not just locally):\n\n- **CLI flag threading** (`cli\u002Frun.py`, `cli\u002Fbatch.py`): a new flag must flow CLI →\n  `app\u002Fsflow.py` → assembly → backend\u002Foperator. A flag parsed but never passed down is a\n  classic silent defect — confirm it reaches the backend and shows in `--dry-run`.\n- **Expression\u002Fvariable resolution** (`config\u002Fresolver.py`, `resolution.py`): `${...}`\n  expansion, variable precedence, `--set` \u002F CSV overrides.\n- **Task graph \u002F DAG** (`app\u002Fassembly.py`, `core\u002F`): dependencies, `missable_tasks`,\n  replicas, resource placement.\n- **Backends** (`plugins\u002Fbackends\u002F`): `salloc`\u002F`srun`\u002F`#SBATCH` flag construction,\n  `extra_args` merge\u002Fde-dup, container mounts.\n- **Probes** (`plugins\u002Fprobes\u002F`): readiness\u002Ffailure conditions, timeouts, log-watch regex.\n- **Artifacts** (`plugins\u002Fartifacts\u002F`): `file:\u002F\u002F` content, same-path auto-mount across backends.\n- **Results & uploads** (`core\u002Fresults.py`, `core\u002Fuploads.py`, `plugins\u002Fstorage\u002F`): `result:`\n  parsing (regex map \u002F `patterns` \u002F JSON `file:` — `patterns` and `file` are mutually exclusive)\n  writing `result.json` + `results.json`; `uploads:` \u002F `upload_all` fire at task finalize\n  **before** `COMPLETED`; the S3 credential chain (boto3) must never be hard-coded in YAML.\n- **Hardware monitor** (`app\u002Fmonitor_planner.py`, `monitoring\u002F`): `monitor:` scopes \u002F interval \u002F\n  report; monitors are **passive** (never reserve nodes\u002FGPUs); backend\n  `capabilities.supports_host_monitoring` gates it (kubernetes = unsupported); a new\n  `--enable-workflow-monitor` \u002F `--enable-task-monitor` path must thread into a planned monitor.\n- **Dry-run vs real-run parity**: logic gated only on `dry_run` can hide real-run bugs.\n\nSee `reference.md` for the full hotspot list.\n\n## Aspect 2 — Modular \u002F by-purpose structure\n\nConfirm new code lives in the layer that matches its purpose. sflow's layering:\n\n`cli\u002F` (thin arg parsing) → `app\u002F` (assembly + orchestration) → `core\u002F` (domain model)\n→ `plugins\u002F` (backends, operators, probes, artifacts, storage). `config\u002F` is\ncross-cutting; `utils\u002F` holds reusable non-domain helpers.\n\nFlag these structural smells:\n\n- Domain or backend logic added inside a `cli\u002F` command (CLI should parse + delegate).\n- Backend-specific behavior (Slurm\u002FDocker\u002FK8s) leaking into `core\u002F` instead of a plugin.\n- A new, distinct concern bolted onto an unrelated existing file instead of its own module.\n- A function\u002Fclass doing several unrelated jobs — should be split by purpose.\n- Helper used by multiple layers but defined privately in one of them — belongs in `utils\u002F`.\n\nFull responsibility table for each package: `reference.md`.\n\n## Aspect 3 — Redundant logic to consolidate\n\nLook for near-duplicate snippets with the same purpose scattered across files. They\nshould become one dedicated module\u002Ffunction called the same way everywhere.\n\nHow to detect:\n\n- Grep for repeated string literals, flag names, or parsing patterns across `cli\u002Frun.py`,\n  `cli\u002Fbatch.py`, and `plugins\u002Fbackends\u002F*` (common duplication sites).\n- Search for similarly named helpers (`_merge_*`, `_parse_*`, `_extract_*`) doing the\n  same job in different modules.\n- Search the codebase for the concept (a keyword\u002Fphrase describing what the snippet does)\n  to find sibling implementations.\n\nThe fix pattern (canonical example in this repo): `extra_args` merging was consolidated\ninto `src\u002Fsflow\u002Futils\u002Fextra_args.py` (`extra_arg_key`, `dedup_merge_extra_args`) and is\nnow called uniformly by CLI `run`, `batch`, and the docker backend. New shared logic\nshould follow the same shape:\n\n- Cross-cutting helper → `src\u002Fsflow\u002Futils\u002F\u003Cname>.py`.\n- Domain logic → `src\u002Fsflow\u002Fcore\u002F`.\n- Backend-\u002Foperator-specific shared code → within that `plugins\u002F` subpackage.\n\nReport each duplication with: the locations, the proposed home module, and which call\nsites should be switched to the unified API.\n\n## Aspect 4 — Test coverage + test integrity\n\nThis repo has a strict change policy (`CONTRIBUTING.md`). Enforce it:\n\n> Do not modify existing unit tests or existing e2e cases in\n> `scripts\u002Ffull_sample_tests.sh` just to make new behavior pass. Add new coverage instead.\n> The only exception is an intentional breaking change, which must document what old\n> behavior breaks, why, which tests changed, and how users migrate.\n\nTwo-part check:\n\n1. **New behavior is covered.**\n   - Unit tests near the change, named by area: `cli\u002F`→`test_cli_*`, `config\u002F`→\n     `test_config_*`, `app`+`core`→`test_app_assembly_*` \u002F `test_core_*`,\n     `plugins\u002Fbackends\u002F`→`test_plugin_backends_*`, `plugins\u002Foperators\u002F`→\n     `test_plugin_operators_*`, `utils\u002F`→`test_utils_*`, artifacts→`test_artifacts_*`.\n   - e2e\u002FCLI coverage: an `examples\u002F` YAML exercised by `scripts\u002Ffull_sample_tests.sh -P`\n     (dry-run preflight), and\u002For an integration test using Typer `CliRunner` against a\n     real example. User-facing changes also need the `src\u002Fsflow\u002Fsamples\u002F` copy kept in sync.\n   - Use coverage to find untested new lines: `pytest --cov=src --cov-report=term-missing`.\n\n2. **Existing tests were not weakened.** In the diff, inspect every change under `tests\u002F`\n   and to `scripts\u002Ffull_sample_tests.sh`. For each, decide:\n   - Is it a NEW test\u002Fassertion? Good.\n   - Is it an EDIT to an existing test that loosens\u002Fdeletes an assertion or changes\n     expected values so the new code passes? **Flag it** unless the PR explicitly declares\n     an intentional behavior\u002Fbreaking change with migration notes. Tests must not be bent\n     to fit the implementation.\n\n## Verify\n\nRun the focused checks for the touched areas before concluding (venv active):\n\n```bash\npytest tests\u002Funit\u002Ftest_\u003Carea>_*.py -v                 # focused unit tests\npytest --cov=src --cov-report=term-missing            # coverage (matches CI)\nMODEL_PATH=\u002Ftmp\u002Fdummy_model bash scripts\u002Ffull_sample_tests.sh -P   # e2e preflight (no Slurm)\nsflow run -f examples\u002F\u003Cchanged_example>.yaml --dry-run             # plan parity\n```\n\nReport what you ran and the result. If you could not run something, say so explicitly.\n\n## Reporting format\n\nGroup findings by aspect, ordered by severity. Use file:line references.\n\n```\n## sflow code review — \u003Cscope>\n\n### Summary\n\u003C1-2 sentences: overall risk + headline issues>\n\n### Aspect 1 — Functional defects\n- 🔴 Critical: \u003Cfile>:\u003Cline> — \u003Cissue> → \u003Csuggested fix>\n- 🟡 Major: ...\n\n### Aspect 2 — Structure\n- 🟡 Major: ...\n\n### Aspect 3 — Duplication\n- 🟢 Minor: \u003Clocations> — consolidate into \u003Cmodule>, switch \u003Ccall sites>\n\n### Aspect 4 — Tests\n- 🔴 Critical: existing test \u003Cfile> weakened without declared breaking change\n- 🟡 Major: new behavior in \u003Cfile> lacks unit\u002Fe2e coverage\n\n### Verification\n- pytest ...: \u003Cpass\u002Ffail>\n- full_sample_tests.sh -P: \u003Cpass\u002Ffail\u002Fnot run + reason>\n```\n\nSeverity: 🔴 Critical (must fix — bug, broken caller, weakened test) · 🟡 Major (should\nfix — missing coverage, misplaced logic) · 🟢 Minor\u002FNit (optional improvement).\n\n## Additional resources\n\n- `reference.md` — full source-layout responsibilities, test-file map, defect hotspots,\n  and the command cheat-sheet.\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,47,53,60,80,86,91,104,109,115,144,241,262,268,273,278,344,349,749,761,767,772,822,827,875,886,892,897,902,964,1013,1052,1057,1063,1076,1093,1098,1317,1323,1328,1510,1515,1521,1526,1535,1540,1546,1559],{"type":40,"tag":41,"props":42,"children":43},"element","h1",{"id":4},[44],{"type":45,"value":46},"text","sflow Code Review",{"type":40,"tag":48,"props":49,"children":50},"p",{},[51],{"type":45,"value":52},"Structured review of sflow changes against four aspects: functional defects, modular\nstructure, duplication, and test coverage. Findings are advisory — report them, do not\nsilently rewrite the author's code unless asked.",{"type":40,"tag":54,"props":55,"children":57},"h2",{"id":56},"when-to-use",[58],{"type":45,"value":59},"When to use",{"type":40,"tag":61,"props":62,"children":63},"ul",{},[64,70,75],{"type":40,"tag":65,"props":66,"children":67},"li",{},[68],{"type":45,"value":69},"The user asks to review a diff, branch, PR, staged changes, or \"my sflow changes\".",{"type":40,"tag":65,"props":71,"children":72},{},[73],{"type":45,"value":74},"Before committing or opening a PR in this repo.",{"type":40,"tag":65,"props":76,"children":77},{},[78],{"type":45,"value":79},"After finishing a feature\u002Ffix and you want a self-check.",{"type":40,"tag":54,"props":81,"children":83},{"id":82},"review-workflow",[84],{"type":45,"value":85},"Review workflow",{"type":40,"tag":48,"props":87,"children":88},{},[89],{"type":45,"value":90},"Copy this checklist into TodoWrite and work through it in order:",{"type":40,"tag":92,"props":93,"children":97},"pre",{"className":94,"code":96,"language":45},[95],"language-text","- [ ] Step 0: Scope the change (collect the diff + changed symbols)\n- [ ] Aspect 1: Functional defects in the changed lines\n- [ ] Aspect 2: Modular \u002F by-purpose structure\n- [ ] Aspect 3: Redundant logic that should be consolidated\n- [ ] Aspect 4: Test coverage + test-integrity policy\n- [ ] Verify: run focused tests \u002F coverage \u002F dry-run\n- [ ] Report findings grouped by aspect and severity\n",[98],{"type":40,"tag":99,"props":100,"children":102},"code",{"__ignoreMap":101},"",[103],{"type":45,"value":96},{"type":40,"tag":48,"props":105,"children":106},{},[107],{"type":45,"value":108},"Do not skip Step 0 — every later aspect needs the exact set of changed files and symbols.",{"type":40,"tag":54,"props":110,"children":112},{"id":111},"step-0-scope-the-change",[113],{"type":45,"value":114},"Step 0: Scope the change",{"type":40,"tag":48,"props":116,"children":117},{},[118,120,126,128,134,136,142],{"type":45,"value":119},"Activate the venv first (project rule), then collect the diff. Pick the base ref that\nmatches what is being reviewed (",{"type":40,"tag":99,"props":121,"children":123},{"className":122},[],[124],{"type":45,"value":125},"main",{"type":45,"value":127},", a PR base, ",{"type":40,"tag":99,"props":129,"children":131},{"className":130},[],[132],{"type":45,"value":133},"--staged",{"type":45,"value":135},", or ",{"type":40,"tag":99,"props":137,"children":139},{"className":138},[],[140],{"type":45,"value":141},"HEAD~1",{"type":45,"value":143},").",{"type":40,"tag":92,"props":145,"children":149},{"className":146,"code":147,"language":148,"meta":101,"style":101},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","source .venv\u002Fbin\u002Factivate            # Windows: .venv\\Scripts\\activate\ngit status\ngit diff --stat main...HEAD          # files touched\ngit diff main...HEAD                  # full change (or --staged for staged review)\n","bash",[150],{"type":40,"tag":99,"props":151,"children":152},{"__ignoreMap":101},[153,177,192,220],{"type":40,"tag":154,"props":155,"children":158},"span",{"class":156,"line":157},"line",1,[159,165,171],{"type":40,"tag":154,"props":160,"children":162},{"style":161},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[163],{"type":45,"value":164},"source",{"type":40,"tag":154,"props":166,"children":168},{"style":167},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[169],{"type":45,"value":170}," .venv\u002Fbin\u002Factivate",{"type":40,"tag":154,"props":172,"children":174},{"style":173},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[175],{"type":45,"value":176},"            # Windows: .venv\\Scripts\\activate\n",{"type":40,"tag":154,"props":178,"children":180},{"class":156,"line":179},2,[181,187],{"type":40,"tag":154,"props":182,"children":184},{"style":183},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[185],{"type":45,"value":186},"git",{"type":40,"tag":154,"props":188,"children":189},{"style":167},[190],{"type":45,"value":191}," status\n",{"type":40,"tag":154,"props":193,"children":195},{"class":156,"line":194},3,[196,200,205,210,215],{"type":40,"tag":154,"props":197,"children":198},{"style":183},[199],{"type":45,"value":186},{"type":40,"tag":154,"props":201,"children":202},{"style":167},[203],{"type":45,"value":204}," diff",{"type":40,"tag":154,"props":206,"children":207},{"style":167},[208],{"type":45,"value":209}," --stat",{"type":40,"tag":154,"props":211,"children":212},{"style":167},[213],{"type":45,"value":214}," main...HEAD",{"type":40,"tag":154,"props":216,"children":217},{"style":173},[218],{"type":45,"value":219},"          # files touched\n",{"type":40,"tag":154,"props":221,"children":223},{"class":156,"line":222},4,[224,228,232,236],{"type":40,"tag":154,"props":225,"children":226},{"style":183},[227],{"type":45,"value":186},{"type":40,"tag":154,"props":229,"children":230},{"style":167},[231],{"type":45,"value":204},{"type":40,"tag":154,"props":233,"children":234},{"style":167},[235],{"type":45,"value":214},{"type":40,"tag":154,"props":237,"children":238},{"style":173},[239],{"type":45,"value":240},"                  # full change (or --staged for staged review)\n",{"type":40,"tag":48,"props":242,"children":243},{},[244,246,252,254,260],{"type":45,"value":245},"Then, for each non-trivial changed function\u002Fclass\u002Fmethod, find its callers (the blast\nradius) with a quick search — e.g. ",{"type":40,"tag":99,"props":247,"children":249},{"className":248},[],[250],{"type":45,"value":251},"grep -rn \"changed_symbol\" src tests",{"type":45,"value":253}," — so you know\nwhat an incompatible change would break. Confirm the change set only touches what the\nauthor intended, and that every direct caller of a changed signature\u002Fdefault was updated.\nNote the area each file belongs to (see ",{"type":40,"tag":99,"props":255,"children":257},{"className":256},[],[258],{"type":45,"value":259},"reference.md",{"type":45,"value":261}," layer map) — this drives Aspects 2–4.",{"type":40,"tag":54,"props":263,"children":265},{"id":264},"aspect-1-functional-defects",[266],{"type":45,"value":267},"Aspect 1 — Functional defects",{"type":40,"tag":48,"props":269,"children":270},{},[271],{"type":45,"value":272},"Read every changed hunk and ask \"what input makes this wrong?\" Prioritize the changed\nlines and their direct callers (found in Step 0).",{"type":40,"tag":48,"props":274,"children":275},{},[276],{"type":45,"value":277},"General checks:",{"type":40,"tag":61,"props":279,"children":280},{},[281,294,299,318,339],{"type":40,"tag":65,"props":282,"children":283},{},[284,286,292],{"type":45,"value":285},"Edge cases: ",{"type":40,"tag":99,"props":287,"children":289},{"className":288},[],[290],{"type":45,"value":291},"None",{"type":45,"value":293},"\u002Fempty\u002Fmissing keys, empty lists, zero\u002Fnegative counts, off-by-one.",{"type":40,"tag":65,"props":295,"children":296},{},[297],{"type":45,"value":298},"Mutable default args, shared mutable state, accidental aliasing of dicts\u002Flists.",{"type":40,"tag":65,"props":300,"children":301},{},[302,304,310,316],{"type":45,"value":303},"Error handling: swallowed exceptions, wrong exception type, missing ",{"type":40,"tag":99,"props":305,"children":307},{"className":306},[],[308],{"type":45,"value":309},"sflow",{"type":40,"tag":99,"props":311,"children":313},{"className":312},[],[314],{"type":45,"value":315},"exceptions.py",{"type":45,"value":317}," usage, unclear messages.",{"type":40,"tag":65,"props":319,"children":320},{},[321,323,329,331,337],{"type":45,"value":322},"Control flow: inverted conditions, early ",{"type":40,"tag":99,"props":324,"children":326},{"className":325},[],[327],{"type":45,"value":328},"return",{"type":45,"value":330},"\u002F",{"type":40,"tag":99,"props":332,"children":334},{"className":333},[],[335],{"type":45,"value":336},"continue",{"type":45,"value":338}," skipping cleanup.",{"type":40,"tag":65,"props":340,"children":341},{},[342],{"type":45,"value":343},"Backward compatibility: changed function signatures, renamed YAML keys, changed\ndefaults — confirm all direct callers were updated.",{"type":40,"tag":48,"props":345,"children":346},{},[347],{"type":45,"value":348},"sflow-specific defect hotspots (verify the behavior end to end, not just locally):",{"type":40,"tag":61,"props":350,"children":351},{},[352,395,435,467,513,530,554,670,731],{"type":40,"tag":65,"props":353,"children":354},{},[355,361,363,369,371,377,379,385,387,393],{"type":40,"tag":356,"props":357,"children":358},"strong",{},[359],{"type":45,"value":360},"CLI flag threading",{"type":45,"value":362}," (",{"type":40,"tag":99,"props":364,"children":366},{"className":365},[],[367],{"type":45,"value":368},"cli\u002Frun.py",{"type":45,"value":370},", ",{"type":40,"tag":99,"props":372,"children":374},{"className":373},[],[375],{"type":45,"value":376},"cli\u002Fbatch.py",{"type":45,"value":378},"): a new flag must flow CLI →\n",{"type":40,"tag":99,"props":380,"children":382},{"className":381},[],[383],{"type":45,"value":384},"app\u002Fsflow.py",{"type":45,"value":386}," → assembly → backend\u002Foperator. A flag parsed but never passed down is a\nclassic silent defect — confirm it reaches the backend and shows in ",{"type":40,"tag":99,"props":388,"children":390},{"className":389},[],[391],{"type":45,"value":392},"--dry-run",{"type":45,"value":394},".",{"type":40,"tag":65,"props":396,"children":397},{},[398,403,404,410,411,417,419,425,427,433],{"type":40,"tag":356,"props":399,"children":400},{},[401],{"type":45,"value":402},"Expression\u002Fvariable resolution",{"type":45,"value":362},{"type":40,"tag":99,"props":405,"children":407},{"className":406},[],[408],{"type":45,"value":409},"config\u002Fresolver.py",{"type":45,"value":370},{"type":40,"tag":99,"props":412,"children":414},{"className":413},[],[415],{"type":45,"value":416},"resolution.py",{"type":45,"value":418},"): ",{"type":40,"tag":99,"props":420,"children":422},{"className":421},[],[423],{"type":45,"value":424},"${...}",{"type":45,"value":426},"\nexpansion, variable precedence, ",{"type":40,"tag":99,"props":428,"children":430},{"className":429},[],[431],{"type":45,"value":432},"--set",{"type":45,"value":434}," \u002F CSV overrides.",{"type":40,"tag":65,"props":436,"children":437},{},[438,443,444,450,451,457,459,465],{"type":40,"tag":356,"props":439,"children":440},{},[441],{"type":45,"value":442},"Task graph \u002F DAG",{"type":45,"value":362},{"type":40,"tag":99,"props":445,"children":447},{"className":446},[],[448],{"type":45,"value":449},"app\u002Fassembly.py",{"type":45,"value":370},{"type":40,"tag":99,"props":452,"children":454},{"className":453},[],[455],{"type":45,"value":456},"core\u002F",{"type":45,"value":458},"): dependencies, ",{"type":40,"tag":99,"props":460,"children":462},{"className":461},[],[463],{"type":45,"value":464},"missable_tasks",{"type":45,"value":466},",\nreplicas, resource placement.",{"type":40,"tag":65,"props":468,"children":469},{},[470,475,476,482,483,489,490,496,497,503,505,511],{"type":40,"tag":356,"props":471,"children":472},{},[473],{"type":45,"value":474},"Backends",{"type":45,"value":362},{"type":40,"tag":99,"props":477,"children":479},{"className":478},[],[480],{"type":45,"value":481},"plugins\u002Fbackends\u002F",{"type":45,"value":418},{"type":40,"tag":99,"props":484,"children":486},{"className":485},[],[487],{"type":45,"value":488},"salloc",{"type":45,"value":330},{"type":40,"tag":99,"props":491,"children":493},{"className":492},[],[494],{"type":45,"value":495},"srun",{"type":45,"value":330},{"type":40,"tag":99,"props":498,"children":500},{"className":499},[],[501],{"type":45,"value":502},"#SBATCH",{"type":45,"value":504}," flag construction,\n",{"type":40,"tag":99,"props":506,"children":508},{"className":507},[],[509],{"type":45,"value":510},"extra_args",{"type":45,"value":512}," merge\u002Fde-dup, container mounts.",{"type":40,"tag":65,"props":514,"children":515},{},[516,521,522,528],{"type":40,"tag":356,"props":517,"children":518},{},[519],{"type":45,"value":520},"Probes",{"type":45,"value":362},{"type":40,"tag":99,"props":523,"children":525},{"className":524},[],[526],{"type":45,"value":527},"plugins\u002Fprobes\u002F",{"type":45,"value":529},"): readiness\u002Ffailure conditions, timeouts, log-watch regex.",{"type":40,"tag":65,"props":531,"children":532},{},[533,538,539,545,546,552],{"type":40,"tag":356,"props":534,"children":535},{},[536],{"type":45,"value":537},"Artifacts",{"type":45,"value":362},{"type":40,"tag":99,"props":540,"children":542},{"className":541},[],[543],{"type":45,"value":544},"plugins\u002Fartifacts\u002F",{"type":45,"value":418},{"type":40,"tag":99,"props":547,"children":549},{"className":548},[],[550],{"type":45,"value":551},"file:\u002F\u002F",{"type":45,"value":553}," content, same-path auto-mount across backends.",{"type":40,"tag":65,"props":555,"children":556},{},[557,562,563,569,570,576,577,583,584,590,592,598,600,606,608,613,615,621,623,629,631,637,639,645,647,653,655,660,662,668],{"type":40,"tag":356,"props":558,"children":559},{},[560],{"type":45,"value":561},"Results & uploads",{"type":45,"value":362},{"type":40,"tag":99,"props":564,"children":566},{"className":565},[],[567],{"type":45,"value":568},"core\u002Fresults.py",{"type":45,"value":370},{"type":40,"tag":99,"props":571,"children":573},{"className":572},[],[574],{"type":45,"value":575},"core\u002Fuploads.py",{"type":45,"value":370},{"type":40,"tag":99,"props":578,"children":580},{"className":579},[],[581],{"type":45,"value":582},"plugins\u002Fstorage\u002F",{"type":45,"value":418},{"type":40,"tag":99,"props":585,"children":587},{"className":586},[],[588],{"type":45,"value":589},"result:",{"type":45,"value":591},"\nparsing (regex map \u002F ",{"type":40,"tag":99,"props":593,"children":595},{"className":594},[],[596],{"type":45,"value":597},"patterns",{"type":45,"value":599}," \u002F JSON ",{"type":40,"tag":99,"props":601,"children":603},{"className":602},[],[604],{"type":45,"value":605},"file:",{"type":45,"value":607}," — ",{"type":40,"tag":99,"props":609,"children":611},{"className":610},[],[612],{"type":45,"value":597},{"type":45,"value":614}," and ",{"type":40,"tag":99,"props":616,"children":618},{"className":617},[],[619],{"type":45,"value":620},"file",{"type":45,"value":622}," are mutually exclusive)\nwriting ",{"type":40,"tag":99,"props":624,"children":626},{"className":625},[],[627],{"type":45,"value":628},"result.json",{"type":45,"value":630}," + ",{"type":40,"tag":99,"props":632,"children":634},{"className":633},[],[635],{"type":45,"value":636},"results.json",{"type":45,"value":638},"; ",{"type":40,"tag":99,"props":640,"children":642},{"className":641},[],[643],{"type":45,"value":644},"uploads:",{"type":45,"value":646}," \u002F ",{"type":40,"tag":99,"props":648,"children":650},{"className":649},[],[651],{"type":45,"value":652},"upload_all",{"type":45,"value":654}," fire at task finalize\n",{"type":40,"tag":356,"props":656,"children":657},{},[658],{"type":45,"value":659},"before",{"type":45,"value":661}," ",{"type":40,"tag":99,"props":663,"children":665},{"className":664},[],[666],{"type":45,"value":667},"COMPLETED",{"type":45,"value":669},"; the S3 credential chain (boto3) must never be hard-coded in YAML.",{"type":40,"tag":65,"props":671,"children":672},{},[673,678,679,685,686,692,693,699,701,706,708,714,716,722,723,729],{"type":40,"tag":356,"props":674,"children":675},{},[676],{"type":45,"value":677},"Hardware monitor",{"type":45,"value":362},{"type":40,"tag":99,"props":680,"children":682},{"className":681},[],[683],{"type":45,"value":684},"app\u002Fmonitor_planner.py",{"type":45,"value":370},{"type":40,"tag":99,"props":687,"children":689},{"className":688},[],[690],{"type":45,"value":691},"monitoring\u002F",{"type":45,"value":418},{"type":40,"tag":99,"props":694,"children":696},{"className":695},[],[697],{"type":45,"value":698},"monitor:",{"type":45,"value":700}," scopes \u002F interval \u002F\nreport; monitors are ",{"type":40,"tag":356,"props":702,"children":703},{},[704],{"type":45,"value":705},"passive",{"type":45,"value":707}," (never reserve nodes\u002FGPUs); backend\n",{"type":40,"tag":99,"props":709,"children":711},{"className":710},[],[712],{"type":45,"value":713},"capabilities.supports_host_monitoring",{"type":45,"value":715}," gates it (kubernetes = unsupported); a new\n",{"type":40,"tag":99,"props":717,"children":719},{"className":718},[],[720],{"type":45,"value":721},"--enable-workflow-monitor",{"type":45,"value":646},{"type":40,"tag":99,"props":724,"children":726},{"className":725},[],[727],{"type":45,"value":728},"--enable-task-monitor",{"type":45,"value":730}," path must thread into a planned monitor.",{"type":40,"tag":65,"props":732,"children":733},{},[734,739,741,747],{"type":40,"tag":356,"props":735,"children":736},{},[737],{"type":45,"value":738},"Dry-run vs real-run parity",{"type":45,"value":740},": logic gated only on ",{"type":40,"tag":99,"props":742,"children":744},{"className":743},[],[745],{"type":45,"value":746},"dry_run",{"type":45,"value":748}," can hide real-run bugs.",{"type":40,"tag":48,"props":750,"children":751},{},[752,754,759],{"type":45,"value":753},"See ",{"type":40,"tag":99,"props":755,"children":757},{"className":756},[],[758],{"type":45,"value":259},{"type":45,"value":760}," for the full hotspot list.",{"type":40,"tag":54,"props":762,"children":764},{"id":763},"aspect-2-modular-by-purpose-structure",[765],{"type":45,"value":766},"Aspect 2 — Modular \u002F by-purpose structure",{"type":40,"tag":48,"props":768,"children":769},{},[770],{"type":45,"value":771},"Confirm new code lives in the layer that matches its purpose. sflow's layering:",{"type":40,"tag":48,"props":773,"children":774},{},[775,781,783,789,791,796,798,804,806,812,814,820],{"type":40,"tag":99,"props":776,"children":778},{"className":777},[],[779],{"type":45,"value":780},"cli\u002F",{"type":45,"value":782}," (thin arg parsing) → ",{"type":40,"tag":99,"props":784,"children":786},{"className":785},[],[787],{"type":45,"value":788},"app\u002F",{"type":45,"value":790}," (assembly + orchestration) → ",{"type":40,"tag":99,"props":792,"children":794},{"className":793},[],[795],{"type":45,"value":456},{"type":45,"value":797}," (domain model)\n→ ",{"type":40,"tag":99,"props":799,"children":801},{"className":800},[],[802],{"type":45,"value":803},"plugins\u002F",{"type":45,"value":805}," (backends, operators, probes, artifacts, storage). ",{"type":40,"tag":99,"props":807,"children":809},{"className":808},[],[810],{"type":45,"value":811},"config\u002F",{"type":45,"value":813}," is\ncross-cutting; ",{"type":40,"tag":99,"props":815,"children":817},{"className":816},[],[818],{"type":45,"value":819},"utils\u002F",{"type":45,"value":821}," holds reusable non-domain helpers.",{"type":40,"tag":48,"props":823,"children":824},{},[825],{"type":45,"value":826},"Flag these structural smells:",{"type":40,"tag":61,"props":828,"children":829},{},[830,842,854,859,864],{"type":40,"tag":65,"props":831,"children":832},{},[833,835,840],{"type":45,"value":834},"Domain or backend logic added inside a ",{"type":40,"tag":99,"props":836,"children":838},{"className":837},[],[839],{"type":45,"value":780},{"type":45,"value":841}," command (CLI should parse + delegate).",{"type":40,"tag":65,"props":843,"children":844},{},[845,847,852],{"type":45,"value":846},"Backend-specific behavior (Slurm\u002FDocker\u002FK8s) leaking into ",{"type":40,"tag":99,"props":848,"children":850},{"className":849},[],[851],{"type":45,"value":456},{"type":45,"value":853}," instead of a plugin.",{"type":40,"tag":65,"props":855,"children":856},{},[857],{"type":45,"value":858},"A new, distinct concern bolted onto an unrelated existing file instead of its own module.",{"type":40,"tag":65,"props":860,"children":861},{},[862],{"type":45,"value":863},"A function\u002Fclass doing several unrelated jobs — should be split by purpose.",{"type":40,"tag":65,"props":865,"children":866},{},[867,869,874],{"type":45,"value":868},"Helper used by multiple layers but defined privately in one of them — belongs in ",{"type":40,"tag":99,"props":870,"children":872},{"className":871},[],[873],{"type":45,"value":819},{"type":45,"value":394},{"type":40,"tag":48,"props":876,"children":877},{},[878,880,885],{"type":45,"value":879},"Full responsibility table for each package: ",{"type":40,"tag":99,"props":881,"children":883},{"className":882},[],[884],{"type":45,"value":259},{"type":45,"value":394},{"type":40,"tag":54,"props":887,"children":889},{"id":888},"aspect-3-redundant-logic-to-consolidate",[890],{"type":45,"value":891},"Aspect 3 — Redundant logic to consolidate",{"type":40,"tag":48,"props":893,"children":894},{},[895],{"type":45,"value":896},"Look for near-duplicate snippets with the same purpose scattered across files. They\nshould become one dedicated module\u002Ffunction called the same way everywhere.",{"type":40,"tag":48,"props":898,"children":899},{},[900],{"type":45,"value":901},"How to detect:",{"type":40,"tag":61,"props":903,"children":904},{},[905,932,959],{"type":40,"tag":65,"props":906,"children":907},{},[908,910,915,917,922,924,930],{"type":45,"value":909},"Grep for repeated string literals, flag names, or parsing patterns across ",{"type":40,"tag":99,"props":911,"children":913},{"className":912},[],[914],{"type":45,"value":368},{"type":45,"value":916},",\n",{"type":40,"tag":99,"props":918,"children":920},{"className":919},[],[921],{"type":45,"value":376},{"type":45,"value":923},", and ",{"type":40,"tag":99,"props":925,"children":927},{"className":926},[],[928],{"type":45,"value":929},"plugins\u002Fbackends\u002F*",{"type":45,"value":931}," (common duplication sites).",{"type":40,"tag":65,"props":933,"children":934},{},[935,937,943,944,950,951,957],{"type":45,"value":936},"Search for similarly named helpers (",{"type":40,"tag":99,"props":938,"children":940},{"className":939},[],[941],{"type":45,"value":942},"_merge_*",{"type":45,"value":370},{"type":40,"tag":99,"props":945,"children":947},{"className":946},[],[948],{"type":45,"value":949},"_parse_*",{"type":45,"value":370},{"type":40,"tag":99,"props":952,"children":954},{"className":953},[],[955],{"type":45,"value":956},"_extract_*",{"type":45,"value":958},") doing the\nsame job in different modules.",{"type":40,"tag":65,"props":960,"children":961},{},[962],{"type":45,"value":963},"Search the codebase for the concept (a keyword\u002Fphrase describing what the snippet does)\nto find sibling implementations.",{"type":40,"tag":48,"props":965,"children":966},{},[967,969,974,976,982,983,989,990,996,998,1004,1005,1011],{"type":45,"value":968},"The fix pattern (canonical example in this repo): ",{"type":40,"tag":99,"props":970,"children":972},{"className":971},[],[973],{"type":45,"value":510},{"type":45,"value":975}," merging was consolidated\ninto ",{"type":40,"tag":99,"props":977,"children":979},{"className":978},[],[980],{"type":45,"value":981},"src\u002Fsflow\u002Futils\u002Fextra_args.py",{"type":45,"value":362},{"type":40,"tag":99,"props":984,"children":986},{"className":985},[],[987],{"type":45,"value":988},"extra_arg_key",{"type":45,"value":370},{"type":40,"tag":99,"props":991,"children":993},{"className":992},[],[994],{"type":45,"value":995},"dedup_merge_extra_args",{"type":45,"value":997},") and is\nnow called uniformly by CLI ",{"type":40,"tag":99,"props":999,"children":1001},{"className":1000},[],[1002],{"type":45,"value":1003},"run",{"type":45,"value":370},{"type":40,"tag":99,"props":1006,"children":1008},{"className":1007},[],[1009],{"type":45,"value":1010},"batch",{"type":45,"value":1012},", and the docker backend. New shared logic\nshould follow the same shape:",{"type":40,"tag":61,"props":1014,"children":1015},{},[1016,1028,1040],{"type":40,"tag":65,"props":1017,"children":1018},{},[1019,1021,1027],{"type":45,"value":1020},"Cross-cutting helper → ",{"type":40,"tag":99,"props":1022,"children":1024},{"className":1023},[],[1025],{"type":45,"value":1026},"src\u002Fsflow\u002Futils\u002F\u003Cname>.py",{"type":45,"value":394},{"type":40,"tag":65,"props":1029,"children":1030},{},[1031,1033,1039],{"type":45,"value":1032},"Domain logic → ",{"type":40,"tag":99,"props":1034,"children":1036},{"className":1035},[],[1037],{"type":45,"value":1038},"src\u002Fsflow\u002Fcore\u002F",{"type":45,"value":394},{"type":40,"tag":65,"props":1041,"children":1042},{},[1043,1045,1050],{"type":45,"value":1044},"Backend-\u002Foperator-specific shared code → within that ",{"type":40,"tag":99,"props":1046,"children":1048},{"className":1047},[],[1049],{"type":45,"value":803},{"type":45,"value":1051}," subpackage.",{"type":40,"tag":48,"props":1053,"children":1054},{},[1055],{"type":45,"value":1056},"Report each duplication with: the locations, the proposed home module, and which call\nsites should be switched to the unified API.",{"type":40,"tag":54,"props":1058,"children":1060},{"id":1059},"aspect-4-test-coverage-test-integrity",[1061],{"type":45,"value":1062},"Aspect 4 — Test coverage + test integrity",{"type":40,"tag":48,"props":1064,"children":1065},{},[1066,1068,1074],{"type":45,"value":1067},"This repo has a strict change policy (",{"type":40,"tag":99,"props":1069,"children":1071},{"className":1070},[],[1072],{"type":45,"value":1073},"CONTRIBUTING.md",{"type":45,"value":1075},"). Enforce it:",{"type":40,"tag":1077,"props":1078,"children":1079},"blockquote",{},[1080],{"type":40,"tag":48,"props":1081,"children":1082},{},[1083,1085,1091],{"type":45,"value":1084},"Do not modify existing unit tests or existing e2e cases in\n",{"type":40,"tag":99,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":45,"value":1090},"scripts\u002Ffull_sample_tests.sh",{"type":45,"value":1092}," just to make new behavior pass. Add new coverage instead.\nThe only exception is an intentional breaking change, which must document what old\nbehavior breaks, why, which tests changed, and how users migrate.",{"type":40,"tag":48,"props":1094,"children":1095},{},[1096],{"type":45,"value":1097},"Two-part check:",{"type":40,"tag":1099,"props":1100,"children":1101},"ol",{},[1102,1272],{"type":40,"tag":65,"props":1103,"children":1104},{},[1105,1110],{"type":40,"tag":356,"props":1106,"children":1107},{},[1108],{"type":45,"value":1109},"New behavior is covered.",{"type":40,"tag":61,"props":1111,"children":1112},{},[1113,1223,1260],{"type":40,"tag":65,"props":1114,"children":1115},{},[1116,1118,1123,1125,1131,1132,1137,1139,1145,1146,1152,1154,1160,1161,1167,1168,1174,1175,1180,1181,1187,1188,1194,1195,1201,1202,1207,1208,1214,1216,1222],{"type":45,"value":1117},"Unit tests near the change, named by area: ",{"type":40,"tag":99,"props":1119,"children":1121},{"className":1120},[],[1122],{"type":45,"value":780},{"type":45,"value":1124},"→",{"type":40,"tag":99,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":45,"value":1130},"test_cli_*",{"type":45,"value":370},{"type":40,"tag":99,"props":1133,"children":1135},{"className":1134},[],[1136],{"type":45,"value":811},{"type":45,"value":1138},"→\n",{"type":40,"tag":99,"props":1140,"children":1142},{"className":1141},[],[1143],{"type":45,"value":1144},"test_config_*",{"type":45,"value":370},{"type":40,"tag":99,"props":1147,"children":1149},{"className":1148},[],[1150],{"type":45,"value":1151},"app",{"type":45,"value":1153},"+",{"type":40,"tag":99,"props":1155,"children":1157},{"className":1156},[],[1158],{"type":45,"value":1159},"core",{"type":45,"value":1124},{"type":40,"tag":99,"props":1162,"children":1164},{"className":1163},[],[1165],{"type":45,"value":1166},"test_app_assembly_*",{"type":45,"value":646},{"type":40,"tag":99,"props":1169,"children":1171},{"className":1170},[],[1172],{"type":45,"value":1173},"test_core_*",{"type":45,"value":916},{"type":40,"tag":99,"props":1176,"children":1178},{"className":1177},[],[1179],{"type":45,"value":481},{"type":45,"value":1124},{"type":40,"tag":99,"props":1182,"children":1184},{"className":1183},[],[1185],{"type":45,"value":1186},"test_plugin_backends_*",{"type":45,"value":370},{"type":40,"tag":99,"props":1189,"children":1191},{"className":1190},[],[1192],{"type":45,"value":1193},"plugins\u002Foperators\u002F",{"type":45,"value":1138},{"type":40,"tag":99,"props":1196,"children":1198},{"className":1197},[],[1199],{"type":45,"value":1200},"test_plugin_operators_*",{"type":45,"value":370},{"type":40,"tag":99,"props":1203,"children":1205},{"className":1204},[],[1206],{"type":45,"value":819},{"type":45,"value":1124},{"type":40,"tag":99,"props":1209,"children":1211},{"className":1210},[],[1212],{"type":45,"value":1213},"test_utils_*",{"type":45,"value":1215},", artifacts→",{"type":40,"tag":99,"props":1217,"children":1219},{"className":1218},[],[1220],{"type":45,"value":1221},"test_artifacts_*",{"type":45,"value":394},{"type":40,"tag":65,"props":1224,"children":1225},{},[1226,1228,1234,1236,1242,1244,1250,1252,1258],{"type":45,"value":1227},"e2e\u002FCLI coverage: an ",{"type":40,"tag":99,"props":1229,"children":1231},{"className":1230},[],[1232],{"type":45,"value":1233},"examples\u002F",{"type":45,"value":1235}," YAML exercised by ",{"type":40,"tag":99,"props":1237,"children":1239},{"className":1238},[],[1240],{"type":45,"value":1241},"scripts\u002Ffull_sample_tests.sh -P",{"type":45,"value":1243},"\n(dry-run preflight), and\u002For an integration test using Typer ",{"type":40,"tag":99,"props":1245,"children":1247},{"className":1246},[],[1248],{"type":45,"value":1249},"CliRunner",{"type":45,"value":1251}," against a\nreal example. User-facing changes also need the ",{"type":40,"tag":99,"props":1253,"children":1255},{"className":1254},[],[1256],{"type":45,"value":1257},"src\u002Fsflow\u002Fsamples\u002F",{"type":45,"value":1259}," copy kept in sync.",{"type":40,"tag":65,"props":1261,"children":1262},{},[1263,1265,1271],{"type":45,"value":1264},"Use coverage to find untested new lines: ",{"type":40,"tag":99,"props":1266,"children":1268},{"className":1267},[],[1269],{"type":45,"value":1270},"pytest --cov=src --cov-report=term-missing",{"type":45,"value":394},{"type":40,"tag":65,"props":1273,"children":1274},{},[1275,1280,1282,1288,1290,1295,1297],{"type":40,"tag":356,"props":1276,"children":1277},{},[1278],{"type":45,"value":1279},"Existing tests were not weakened.",{"type":45,"value":1281}," In the diff, inspect every change under ",{"type":40,"tag":99,"props":1283,"children":1285},{"className":1284},[],[1286],{"type":45,"value":1287},"tests\u002F",{"type":45,"value":1289},"\nand to ",{"type":40,"tag":99,"props":1291,"children":1293},{"className":1292},[],[1294],{"type":45,"value":1090},{"type":45,"value":1296},". For each, decide:",{"type":40,"tag":61,"props":1298,"children":1299},{},[1300,1305],{"type":40,"tag":65,"props":1301,"children":1302},{},[1303],{"type":45,"value":1304},"Is it a NEW test\u002Fassertion? Good.",{"type":40,"tag":65,"props":1306,"children":1307},{},[1308,1310,1315],{"type":45,"value":1309},"Is it an EDIT to an existing test that loosens\u002Fdeletes an assertion or changes\nexpected values so the new code passes? ",{"type":40,"tag":356,"props":1311,"children":1312},{},[1313],{"type":45,"value":1314},"Flag it",{"type":45,"value":1316}," unless the PR explicitly declares\nan intentional behavior\u002Fbreaking change with migration notes. Tests must not be bent\nto fit the implementation.",{"type":40,"tag":54,"props":1318,"children":1320},{"id":1319},"verify",[1321],{"type":45,"value":1322},"Verify",{"type":40,"tag":48,"props":1324,"children":1325},{},[1326],{"type":45,"value":1327},"Run the focused checks for the touched areas before concluding (venv active):",{"type":40,"tag":92,"props":1329,"children":1331},{"className":146,"code":1330,"language":148,"meta":101,"style":101},"pytest tests\u002Funit\u002Ftest_\u003Carea>_*.py -v                 # focused unit tests\npytest --cov=src --cov-report=term-missing            # coverage (matches CI)\nMODEL_PATH=\u002Ftmp\u002Fdummy_model bash scripts\u002Ffull_sample_tests.sh -P   # e2e preflight (no Slurm)\nsflow run -f examples\u002F\u003Cchanged_example>.yaml --dry-run             # plan parity\n",[1332],{"type":40,"tag":99,"props":1333,"children":1334},{"__ignoreMap":101},[1335,1395,1417,1455],{"type":40,"tag":154,"props":1336,"children":1337},{"class":156,"line":157},[1338,1343,1348,1354,1359,1365,1370,1375,1380,1385,1390],{"type":40,"tag":154,"props":1339,"children":1340},{"style":183},[1341],{"type":45,"value":1342},"pytest",{"type":40,"tag":154,"props":1344,"children":1345},{"style":167},[1346],{"type":45,"value":1347}," tests\u002Funit\u002Ftest_",{"type":40,"tag":154,"props":1349,"children":1351},{"style":1350},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1352],{"type":45,"value":1353},"\u003C",{"type":40,"tag":154,"props":1355,"children":1356},{"style":167},[1357],{"type":45,"value":1358},"are",{"type":40,"tag":154,"props":1360,"children":1362},{"style":1361},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1363],{"type":45,"value":1364},"a",{"type":40,"tag":154,"props":1366,"children":1367},{"style":1350},[1368],{"type":45,"value":1369},">",{"type":40,"tag":154,"props":1371,"children":1372},{"style":167},[1373],{"type":45,"value":1374},"_",{"type":40,"tag":154,"props":1376,"children":1377},{"style":1361},[1378],{"type":45,"value":1379},"*",{"type":40,"tag":154,"props":1381,"children":1382},{"style":167},[1383],{"type":45,"value":1384},".py",{"type":40,"tag":154,"props":1386,"children":1387},{"style":167},[1388],{"type":45,"value":1389}," -v",{"type":40,"tag":154,"props":1391,"children":1392},{"style":173},[1393],{"type":45,"value":1394},"                 # focused unit tests\n",{"type":40,"tag":154,"props":1396,"children":1397},{"class":156,"line":179},[1398,1402,1407,1412],{"type":40,"tag":154,"props":1399,"children":1400},{"style":183},[1401],{"type":45,"value":1342},{"type":40,"tag":154,"props":1403,"children":1404},{"style":167},[1405],{"type":45,"value":1406}," --cov=src",{"type":40,"tag":154,"props":1408,"children":1409},{"style":167},[1410],{"type":45,"value":1411}," --cov-report=term-missing",{"type":40,"tag":154,"props":1413,"children":1414},{"style":173},[1415],{"type":45,"value":1416},"            # coverage (matches CI)\n",{"type":40,"tag":154,"props":1418,"children":1419},{"class":156,"line":194},[1420,1425,1430,1435,1440,1445,1450],{"type":40,"tag":154,"props":1421,"children":1422},{"style":1361},[1423],{"type":45,"value":1424},"MODEL_PATH",{"type":40,"tag":154,"props":1426,"children":1427},{"style":1350},[1428],{"type":45,"value":1429},"=",{"type":40,"tag":154,"props":1431,"children":1432},{"style":167},[1433],{"type":45,"value":1434},"\u002Ftmp\u002Fdummy_model",{"type":40,"tag":154,"props":1436,"children":1437},{"style":183},[1438],{"type":45,"value":1439}," bash",{"type":40,"tag":154,"props":1441,"children":1442},{"style":167},[1443],{"type":45,"value":1444}," scripts\u002Ffull_sample_tests.sh",{"type":40,"tag":154,"props":1446,"children":1447},{"style":167},[1448],{"type":45,"value":1449}," -P",{"type":40,"tag":154,"props":1451,"children":1452},{"style":173},[1453],{"type":45,"value":1454},"   # e2e preflight (no Slurm)\n",{"type":40,"tag":154,"props":1456,"children":1457},{"class":156,"line":222},[1458,1462,1467,1472,1477,1481,1486,1491,1495,1500,1505],{"type":40,"tag":154,"props":1459,"children":1460},{"style":183},[1461],{"type":45,"value":309},{"type":40,"tag":154,"props":1463,"children":1464},{"style":167},[1465],{"type":45,"value":1466}," run",{"type":40,"tag":154,"props":1468,"children":1469},{"style":167},[1470],{"type":45,"value":1471}," -f",{"type":40,"tag":154,"props":1473,"children":1474},{"style":167},[1475],{"type":45,"value":1476}," examples\u002F",{"type":40,"tag":154,"props":1478,"children":1479},{"style":1350},[1480],{"type":45,"value":1353},{"type":40,"tag":154,"props":1482,"children":1483},{"style":167},[1484],{"type":45,"value":1485},"changed_exampl",{"type":40,"tag":154,"props":1487,"children":1488},{"style":1361},[1489],{"type":45,"value":1490},"e",{"type":40,"tag":154,"props":1492,"children":1493},{"style":1350},[1494],{"type":45,"value":1369},{"type":40,"tag":154,"props":1496,"children":1497},{"style":167},[1498],{"type":45,"value":1499},".yaml",{"type":40,"tag":154,"props":1501,"children":1502},{"style":167},[1503],{"type":45,"value":1504}," --dry-run",{"type":40,"tag":154,"props":1506,"children":1507},{"style":173},[1508],{"type":45,"value":1509},"             # plan parity\n",{"type":40,"tag":48,"props":1511,"children":1512},{},[1513],{"type":45,"value":1514},"Report what you ran and the result. If you could not run something, say so explicitly.",{"type":40,"tag":54,"props":1516,"children":1518},{"id":1517},"reporting-format",[1519],{"type":45,"value":1520},"Reporting format",{"type":40,"tag":48,"props":1522,"children":1523},{},[1524],{"type":45,"value":1525},"Group findings by aspect, ordered by severity. Use file:line references.",{"type":40,"tag":92,"props":1527,"children":1530},{"className":1528,"code":1529,"language":45},[95],"## sflow code review — \u003Cscope>\n\n### Summary\n\u003C1-2 sentences: overall risk + headline issues>\n\n### Aspect 1 — Functional defects\n- 🔴 Critical: \u003Cfile>:\u003Cline> — \u003Cissue> → \u003Csuggested fix>\n- 🟡 Major: ...\n\n### Aspect 2 — Structure\n- 🟡 Major: ...\n\n### Aspect 3 — Duplication\n- 🟢 Minor: \u003Clocations> — consolidate into \u003Cmodule>, switch \u003Ccall sites>\n\n### Aspect 4 — Tests\n- 🔴 Critical: existing test \u003Cfile> weakened without declared breaking change\n- 🟡 Major: new behavior in \u003Cfile> lacks unit\u002Fe2e coverage\n\n### Verification\n- pytest ...: \u003Cpass\u002Ffail>\n- full_sample_tests.sh -P: \u003Cpass\u002Ffail\u002Fnot run + reason>\n",[1531],{"type":40,"tag":99,"props":1532,"children":1533},{"__ignoreMap":101},[1534],{"type":45,"value":1529},{"type":40,"tag":48,"props":1536,"children":1537},{},[1538],{"type":45,"value":1539},"Severity: 🔴 Critical (must fix — bug, broken caller, weakened test) · 🟡 Major (should\nfix — missing coverage, misplaced logic) · 🟢 Minor\u002FNit (optional improvement).",{"type":40,"tag":54,"props":1541,"children":1543},{"id":1542},"additional-resources",[1544],{"type":45,"value":1545},"Additional resources",{"type":40,"tag":61,"props":1547,"children":1548},{},[1549],{"type":40,"tag":65,"props":1550,"children":1551},{},[1552,1557],{"type":40,"tag":99,"props":1553,"children":1555},{"className":1554},[],[1556],{"type":45,"value":259},{"type":45,"value":1558}," — full source-layout responsibilities, test-file map, defect hotspots,\nand the command cheat-sheet.",{"type":40,"tag":1560,"props":1561,"children":1562},"style",{},[1563],{"type":45,"value":1564},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":1566,"total":1721},[1567,1585,1603,1614,1626,1640,1653,1667,1678,1689,1701,1710],{"slug":1568,"name":1568,"fn":1569,"description":1570,"org":1571,"tags":1572,"stars":1582,"repoUrl":1583,"updatedAt":1584},"nemoclaw-user-guide","retrieve NemoClaw documentation and configuration","Guides human users' AI agents to the NemoClaw docs MCP server and canonical Fern documentation in Markdown form. Use when users ask how to install, configure, operate, troubleshoot, secure, or learn NemoClaw with an AI coding assistant. Trigger keywords - nemoclaw docs, use nemoclaw with ai agent, nemoclaw mcp docs, nemoclaw install help, nemoclaw quickstart, nemoclaw markdown docs, llms.txt, agent skills.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1573,1576,1579],{"name":1574,"slug":1575,"type":15},"Documentation","documentation",{"name":1577,"slug":1578,"type":15},"MCP","mcp",{"name":1580,"slug":1581,"type":15},"Search","search",21777,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FNemoClaw","2026-07-20T06:00:01.461044",{"slug":1586,"name":1586,"fn":1587,"description":1588,"org":1589,"tags":1590,"stars":1600,"repoUrl":1601,"updatedAt":1602},"mcore-build-and-dependency","manage Megatron-LM development environments","Container-based dev environment setup and dependency management for Megatron-LM. Covers acquiring and launching the CI container, uv package management, and updating uv.lock.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1591,1594,1597],{"name":1592,"slug":1593,"type":15},"Containers","containers",{"name":1595,"slug":1596,"type":15},"Deployment","deployment",{"name":1598,"slug":1599,"type":15},"Python","python",17049,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FMegatron-LM","2026-07-27T06:06:11.249662",{"slug":1604,"name":1604,"fn":1605,"description":1606,"org":1607,"tags":1608,"stars":1600,"repoUrl":1601,"updatedAt":1613},"mcore-bump-base-image","update NVIDIA PyTorch base images","Bump the NVIDIA PyTorch base image (`nvcr.io\u002Fnvidia\u002Fpytorch:YY.MM-py3`) used by Megatron-LM CI. Covers the two pin sites (GitHub CI in `docker\u002F.ngc_version.dev` and GitLab CI in `.gitlab\u002Fstages\u002F01.build.yml`), the post-bump CI loop (re-run functional tests, refresh golden values, mark broken tests), and the gotchas that bit PRs",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1609,1612],{"name":1610,"slug":1611,"type":15},"CI\u002FCD","ci-cd",{"name":1595,"slug":1596,"type":15},"2026-07-14T05:25:59.97109",{"slug":1615,"name":1615,"fn":1616,"description":1617,"org":1618,"tags":1619,"stars":1600,"repoUrl":1601,"updatedAt":1625},"mcore-cicd","manage CI\u002FCD pipelines for Megatron-LM","CI\u002FCD reference for Megatron-LM. Covers CI pipeline structure, PR scope labels, triggering internal GitLab CI (which force-pushes the current branch to a pull-request\u002FBRANCH ref — always dry-run and verify the destination first; never run against shared or protected branches), and CI failure investigation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1620,1621,1622],{"name":1610,"slug":1611,"type":15},{"name":1595,"slug":1596,"type":15},{"name":1623,"slug":1624,"type":15},"GitHub","github","2026-07-27T06:06:12.278222",{"slug":1627,"name":1627,"fn":1628,"description":1629,"org":1630,"tags":1631,"stars":1600,"repoUrl":1601,"updatedAt":1639},"mcore-create-issue","investigate CI failures and create issues","Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1632,1635,1636],{"name":1633,"slug":1634,"type":15},"Debugging","debugging",{"name":1623,"slug":1624,"type":15},{"name":1637,"slug":1638,"type":15},"Triage","triage","2026-07-14T05:25:57.442089",{"slug":1641,"name":1641,"fn":1642,"description":1643,"org":1644,"tags":1645,"stars":1600,"repoUrl":1601,"updatedAt":1652},"mcore-linting-and-formatting","lint and format Megatron-LM code","Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1646,1649],{"name":1647,"slug":1648,"type":15},"Best Practices","best-practices",{"name":1650,"slug":1651,"type":15},"Code Analysis","code-analysis","2026-07-14T05:25:56.18433",{"slug":1654,"name":1654,"fn":1655,"description":1656,"org":1657,"tags":1658,"stars":1600,"repoUrl":1601,"updatedAt":1666},"mcore-migrate-gpt-to-hybrid","migrate Megatron-LM models to HybridModel","Migration guide for moving Megatron Core GPTModel checkpoints, model providers, training commands, and layer mappings to HybridModel.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1659,1662,1665],{"name":1660,"slug":1661,"type":15},"Machine Learning","machine-learning",{"name":1663,"slug":1664,"type":15},"Migration","migration",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:11.777011",{"slug":1668,"name":1668,"fn":1669,"description":1670,"org":1671,"tags":1672,"stars":1600,"repoUrl":1601,"updatedAt":1677},"mcore-onboard-gb200-1node-tests","onboard functional tests for GB200","Onboard 1-node GitHub MR functional tests for GB200 from existing mr-scoped 2-node tests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1673,1676],{"name":1674,"slug":1675,"type":15},"QA","qa",{"name":21,"slug":22,"type":15},"2026-07-14T05:25:53.673039",{"slug":1679,"name":1679,"fn":1680,"description":1681,"org":1682,"tags":1683,"stars":1600,"repoUrl":1601,"updatedAt":1688},"mcore-run-on-slurm","launch distributed training jobs on SLURM","How to launch distributed Megatron-LM training jobs on a SLURM cluster. Covers a minimal sbatch skeleton, environment-variable setup for torch.distributed.run, CUDA_DEVICE_MAX_CONNECTIONS rules across hardware and parallelism modes, container conventions, monitoring, and per-rank failure diagnosis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1684,1685],{"name":1595,"slug":1596,"type":15},{"name":1686,"slug":1687,"type":15},"Infrastructure","infrastructure","2026-07-14T05:25:49.362534",{"slug":1690,"name":1690,"fn":1691,"description":1692,"org":1693,"tags":1694,"stars":1600,"repoUrl":1601,"updatedAt":1700},"mcore-split-pr","split pull requests to reduce review load","Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1695,1696,1697],{"name":13,"slug":14,"type":15},{"name":1623,"slug":1624,"type":15},{"name":1698,"slug":1699,"type":15},"Pull Requests","pull-requests","2026-07-14T05:26:01.226578",{"slug":1702,"name":1702,"fn":1703,"description":1704,"org":1705,"tags":1706,"stars":1600,"repoUrl":1601,"updatedAt":1709},"mcore-testing","run and manage Megatron-LM tests","Test system for Megatron-LM. Covers test layout, recipe YAML structure, adding and running unit and functional tests, golden values, marker filters, and CI parity.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1707,1708],{"name":1674,"slug":1675,"type":15},{"name":21,"slug":22,"type":15},"2026-07-14T05:25:54.928983",{"slug":1711,"name":1711,"fn":1712,"description":1713,"org":1714,"tags":1715,"stars":1600,"repoUrl":1601,"updatedAt":1720},"nightly-sync","manage nightly main-to-dev sync workflows","Domain knowledge for the nightly main-to-dev sync workflow. Covers merge strategy, CI architecture, failure investigation, and known issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1716,1719],{"name":1717,"slug":1718,"type":15},"Automation","automation",{"name":1610,"slug":1611,"type":15},"2026-07-30T05:29:03.275638",496,{"items":1723,"total":194},[1724,1731,1746],{"slug":4,"name":4,"fn":5,"description":6,"org":1725,"tags":1726,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1727,1728,1729,1730],{"name":13,"slug":14,"type":15},{"name":18,"slug":19,"type":15},{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},{"slug":1732,"name":1732,"fn":1733,"description":1734,"org":1735,"tags":1736,"stars":23,"repoUrl":24,"updatedAt":1745},"sflow-error-analysis","troubleshoot sflow workflow errors","Diagnose and troubleshoot sflow workflow errors from log output, error messages, and task failures. Covers config validation errors, expression resolution failures, backend issues (Slurm, Docker, Kubernetes\u002Fkubectl\u002FRBAC), probe timeouts, task crashes, S3 storage\u002Fupload failures, and batch submission problems. Use when the user encounters an sflow error, pastes error output, asks to debug a failed workflow, or asks about sflow troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1737,1738,1741,1742],{"name":1633,"slug":1634,"type":15},{"name":1739,"slug":1740,"type":15},"Logs","logs",{"name":9,"slug":8,"type":15},{"name":1743,"slug":1744,"type":15},"Workflow Automation","workflow-automation","2026-07-23T05:43:45.493836",{"slug":1747,"name":1747,"fn":1748,"description":1749,"org":1750,"tags":1751,"stars":23,"repoUrl":24,"updatedAt":1760},"writing-sflow-yaml","configure sflow YAML workflows","Write, create, and modify sflow YAML workflow configuration files. Covers schema structure, variables, task DAGs, backends (local, slurm, docker, kubernetes), operators, probes, replicas, artifacts, result parsing, storage\u002Fuploads (S3), hardware monitoring, and modular composition. Use when the user asks to create an sflow YAML, configure a workflow, set up inference serving on Slurm or Kubernetes, or asks about sflow YAML syntax.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[1752,1755,1756,1757],{"name":1753,"slug":1754,"type":15},"Configuration","configuration",{"name":9,"slug":8,"type":15},{"name":1743,"slug":1744,"type":15},{"name":1758,"slug":1759,"type":15},"YAML","yaml","2026-07-23T05:43:46.500651"]