test(shields): remove external status assertion - #8277
Conversation
📝 WalkthroughWalkthroughThe test now covers unchanged shield policy snapshots without managed MCP entries. It directly invokes ChangesShield snapshot restore
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit e5f62af in the TypeScript / code-coverage/cliThe overall coverage in commit e5f62af in the Show a code coverage summary of the most impacted files.
Updated |
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
5 terminology differences from the second opinionAdvisory only. These are normalized differences from the primary terminology receipt.
1 additional E2E selection from the second opinionAdvisory only. The primary lane did not select these E2E jobs or targets.
Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate. 1 semantic terminology decisionTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: None 1 optional E2E recommendation
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
|
Closing as superseded by merged #8293 (head bdf9d11; merge commit 5fe2319). #8293 covers the accepted outcome more directly: it removes the same invalid external OpenShell status and ESM-helper assertions, then tests empty managed-MCP snapshot reuse through buildDeadlineRuntimeManagedMcpPolicy while proving that temporary staging is not invoked. It also preserves Carlos Villela as author of the Shields commits and as a co-author of the squash result. No attribution from #8277 needs to be substituted for that contributor history. |
Summary
The Shields auto-restore unit test introduced by #8238 fails in CI because it asserts an external OpenShell process status. Its ESM helper mocks do not intercept the CommonJS coordinator. This change scopes the test to the deadline-restoration invariant that it can observe: an unchanged snapshot with no managed MCP entries does not require temporary staging.
Changes
ENOSPCtrap and verify thatfs.mkdtempSyncis not called.Type of Change
Quality Gates
e5f62afb4feb64dc29dd5a2dfdc7d1f21a17bf4fagainst base15b0c553d7cd56f5dd20298a4e9d1daa2a80efc1passed all nine required categories with no findings. The diff changes no runtime source, input boundary, credential flow, file operation, network behavior, permission, cryptography, or dependency. It retains theENOSPCnegative path and no-staging assertion.Documentation Writer Review
no-docs-neededsrc/lib/shields/index.test.tsat head SHAe5f62afb4feb64dc29dd5a2dfdc7d1f21a17bf4fagainst base SHA15b0c553d7cd56f5dd20298a4e9d1daa2a80efc1. The refreshed head is a merge-only update whose parents are the previously reviewed head and the exact current base. The effective diff is byte-identical to the previously reviewed change. It renames the test to describe the asserted staging invariant and removes invalid assertions against external process status and an ESM helper that the CommonJS coordinator does not consume. It retains the simulatedENOSPCtrap and verifies thatfs.mkdtempSyncis not called. This test-only correction does not change a user-visible API, CLI, configuration, workflow, default, error, or supported behavior.npm run build:policy-boundary, the 34-test focused CLI source-test run,npm run test:titles:check, commitlint, and the pre-push TypeScript checks passed.DGX Station Hardware Evidence
scripts/prepare-dgx-station-host.shis unchanged.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpm run build:policy-boundarypassed.npx vitest run --project cli src/lib/shields/index.test.tspassed 34/34 tests.npm run test:titles:checkpassed.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Prekshi Vyas prekshiv@nvidia.com