Repository navigation
fix(policy): classify DCode's observability preset by provenance - #12635
Conversation
classifyPresetProvenance() only recognized agentName values "openclaw"
and "hermes"; every other agent fell through to { source: "user" }.
The canonical per-agent preset map, setupPolicyPresetAppliesToAgent()
(src/lib/onboard/agent-policy-presets.ts), has covered a third agent —
DCode (langchain-deepagents-code), via DCODE_ONLY_POLICY_PRESETS — since
#6340, a week after preset-provenance.ts was added in #5797. Nothing
since then wired DCode into the provenance classifier, so `policy list`
on a DCode sandbox with observability enabled labels its own auto-added
observability-otlp-local preset "[user-added]" instead of
"[from dcode agent]", understating what NemoClaw itself put there.
Signed-off-by: Udaya Tejas <udayatejas2004@gmail.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe preset provenance classifier now identifies ChangesDCode preset provenance
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to DCode’s preset attribution changes in policy listing only. No material policy-application or merge risk is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
🧰 Additional context used📚 Code guidelines (1)Comment |
|
/ok to test 63e4739 |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall line coverage in commit 63e4739 in the Show a line coverage summary of the most impacted files.
TypeScript / code-coverage/cliThe overall line coverage in commit 63e4739 in the Show a line coverage summary of the most impacted files.
Updated |
|
PR Review Advisor finished for commit Request review only when Require no Advisor blockers is green. |
|
Approved for merge under the maintainer's instruction to land this owner replacement once CodeRabbit succeeds and regression risk is low. Reviewed commit:
GitHub does not permit this account to submit a formal approval of the replacement PR it opened. This comment records the maintainer-authorized merge decision; the admin merge is for that owner-replacement approval constraint, with no CI waiver. |
Outcome
nemoclaw policy listlabels DCode's automatically addedobservability-otlp-localpreset[from dcode agent]instead of[user-added].Reason
The provenance classifier already recognizes OpenClaw and Hermes presets but omits DCode. This changes the displayed attribution only; it does not change sandbox permissions or preset application.
This is the authorized NVIDIA-owned replacement for #11869 by @udsy19 (Udaya Tejas), preserving the contributor's commit and implementation. A signed follow-up commit only applies the required import formatting. The required reviewed OpenShell SDK CI job accepts only same-repository pull requests. The original PR will remain open until this replacement lands.
Related issues
Fixes #11868
Supersedes #11869.
Changes
classifyPresetProvenance().Verification
npx --no-install vitest run --project cli src/lib/policy/preset-provenance.test.ts— 3 tests passed after the formatting correction in63e47399cd.63e47399cdbce8def6ff1715e61f03af0629a7d0— passed, including all 12 CLI shards and coverage aggregation, plugin coverage, installer integration, npm audit, OpenShell SDK verification, OpenClaw distribution checks, typechecks, and static compatibility checks.Review notes
Sensitive paths:
src/lib/policy/preset-provenance.tsand its existing test. Maintainer-assisted source inspection of NVIDIA/NemoClaw candidate087c9d9c3fd788579042e03e8df10d90b2071420and the import-only formatting correction in63e47399cdfound no actionable defect; the classifier feeds policy-list display. CodeRabbit reported no actionable findings on the original contributor commit in #11869. No approval of this replacement is claimed.Signed-off-by: Udaya Tejas udayatejas2004@gmail.com
Signed-off-by: Aaron Erickson aerickson@nvidia.com
Co-authored-by: Udaya Tejas udayatejas2004@gmail.com
Summary by CodeRabbit
langchain-deepagents-codeagent are now correctly recognized as agent-provided, improving their provenance identification.