Repository navigation
Share JSON-object validation helper - #10062
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The extraction preserves all three guards’ behavior, and the remaining suggestions are optional.
1 open finding
What changed in this PR
Centralizes JSON-object validation across manifest and NVX persistence parsers, addressing #10040 without changing validation behavior or error messages.
Changes:
- Extracts
requireObjectand replaces three local copies. - Adds focused tests for accepted objects and rejected values.
| File | Description |
|---|---|
| src/nvx/outcome.ts | Uses the shared validator. |
| src/json-validation.ts | Defines the shared object guard. |
| src/json-validation.test.ts | Tests accepted and rejected inputs. |
| src/cloud-hypervisor/enclave-artifact-manifest.ts | Replaces its local guard with an import. |
| src/cloud-hypervisor/artifact-manifest.ts | Replaces its local guard with an import. |
🧠 Review effort: Max
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 93.18% | 93.20% | 📈 +0.02% |
| Statements | 91.76% | 91.78% | 📈 +0.02% |
| Functions | 90.68% | 90.67% | 📉 -0.01% |
| Branches | 85.62% | 85.64% | 📈 +0.02% |
📁 Per-file Coverage Changes (4 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/nvx/one-shot-adapter.ts |
82.9% → 83.4% (+0.56%) | 80.2% → 80.7% (+0.52%) |
src/cloud-hypervisor/artifact-manifest.ts |
87.3% → 88.5% (+1.22%) | 87.3% → 88.5% (+1.22%) |
src/nvx/outcome.ts |
84.0% → 85.4% (+1.41%) | 84.3% → 85.7% (+1.40%) |
src/log-directory-setup.ts |
96.8% → 100.0% (+3.18%) | 96.9% → 100.0% (+3.13%) |
✨ New Files (1 files)
src/json-validation.ts: 100.0% lines
Coverage comparison generated by scripts/ci/compare-coverage.ts
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
🚀 Security Guard has started processing this pull request |
|
✅ Smoke Claude passed
|
|
Smoke Cloud Hypervisor reports failed. Cloud Hypervisor + Copilot failed.
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
✅ Build Test Suite completed successfully!
|
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
Services smoke test: ✅ Redis PONG, ✅ pg_isready accepting connections, ✅ SELECT 1 = 1. PASS
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS —
|
|
Smoke Copilot — PR "Share JSON-object validation helper"
Overall: PASS — cc
|
|
✅ smoke-copilot-byok
Status: PASS — Running in direct BYOK mode via api-proxy sidecar.
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
OTEL smoke test
|
Smoke Test
|
Chroot Version Comparison
Not all tests passed (Node.js version mismatch), so the
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Notes: the Bun/Deno install scripts and the default
|

Duplicate
requireObjectguards in manifest and NVX persistence parsers could drift, including their validation error messages.src/json-validation.tshelper.