Skip to content

Ggg - #3666

Closed
Hardonian wants to merge 324 commits into
NVIDIA:mainfrom
Hardonian:main
Closed

Ggg#3666
Hardonian wants to merge 324 commits into
NVIDIA:mainfrom
Hardonian:main

Conversation

@Hardonian

@Hardonian Hardonian commented May 17, 2026

Copy link
Copy Markdown

Summary

Related Issue

Changes

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Your Name your-email@example.com

Summary by CodeRabbit

  • New Features

    • Added Operator Console—a web-based dashboard for viewing execution plans, receipts, routing decisions, worker trust/attestation, degraded states, telemetry, and operational events.
    • Introduced comprehensive control-plane governance with deterministic policy evaluation, execution approvals, and worker trust validation.
    • Implemented device registry for tracking worker health and capabilities.
    • Added deterministic execution receipts and replay validation for audit and forensics.
  • Documentation

    • Expanded architecture documentation with security hardening, threat models, and governance invariants.
    • Added contribution guidelines and verification procedures.

Review Change Stack

Hardonian and others added 30 commits May 9, 2026 18:34
…rehensive test suites for operator console components
…ust gates and add UI snapshot tests for TrustInspector
… lifecycle tracking and add operator console TypeScript configuration
…tracking and operator console diagnostic fixtures
…icy tracing docs, and release readiness checklists
🎯 **What:** Removed unused `type ChildProcess` import from `node:child_process` in `src/lib/sandbox-create-stream.ts`.
💡 **Why:** Reduces noise in the file and makes it clear exactly what types are actually used. The code actually uses its own local `StreamableChildProcess` interface instead.
✅ **Verification:** Verified by checking that `ChildProcess` is not used elsewhere in the file and running the file through linting, as well as tests passing.
✨ **Result:** Cleaner imports with no change to the code's behavior.
🎯 **What:** Removed unused `type ChildProcess` import from `node:child_process` in `src/lib/sandbox-create-stream.ts`.
💡 **Why:** Reduces noise in the file and makes it clear exactly what types are actually used. The code actually uses its own local `StreamableChildProcess` interface instead.
✅ **Verification:** Verified by checking that `ChildProcess` is not used elsewhere in the file and running the file through linting, as well as tests passing.
✨ **Result:** Cleaner imports with no change to the code's behavior.
Replaced old 'With fix / Without fix' comments in test/repro-2201.test.ts
with clear statements of the expected behavior, now that the fix is in place.
Replaced old 'With fix / Without fix' comments in test/repro-2201.test.ts
with clear statements of the expected behavior, now that the fix is in place.
Replaced old 'With fix / Without fix' comments in test/repro-2201.test.ts
with clear statements of the expected behavior, now that the fix is in place.

Signed-off-by: Jules <jules@google.com>
Adds boundary value analysis tests for `isValidName` to ensure correct string validation regex usage, covering happy paths, edge cases, and invalid inputs. Added `isValidName` and `VALID_NAME_REGEX` export based on the problem statement as they were missing in the original source but needed for testing logic. Also covers `VALID_NAME_REGEX` directly, and includes coverage for the pre-existing `getNameValidationGuidance`.
…ions

🎯 **What:** The `planHostRemediation` function was overly long, making it hard to read and maintain. I extracted the logic for generating each specific remediation action into dedicated, clearly-named helper functions (e.g., `getDockerInstallAction`, `getDockerReachableAction`, etc.).
💡 **Why:** By extracting these complex conditional branches and object instantiations out into separate functions, we dramatically improve the readability and maintainability of `planHostRemediation`, which now acts as a clean orchestrator pushing actions to the array.
✅ **Verification:** I verified this by running `npx vitest run src/lib/onboard/preflight.test.ts` which tests this function extensively, along with `npm run lint` and the core test suite to ensure the refactor is a clean structural change that doesn't change behavior.
✨ **Result:** A more robust, readable, and modular `planHostRemediation`.
Hardonian and others added 26 commits May 15, 2026 18:06
…execution-path

proof: implement local governed execution proof path
…execution-spine

proof: implement local governed execution proof path
🚨 Severity: CRITICAL
💡 Vulnerability: Command injection in `defaultCommandPath` in `src/lib/actions/dev/npm-link-or-shim.ts`. The `command` variable was serialized with `JSON.stringify` and interpolated directly into a shell command. Double quotes allow for shell expansion (e.g. `$()`), allowing an attacker to inject and execute arbitrary shell commands.
🎯 Impact: Remote code execution if an attacker can control the input to `defaultCommandPath`.
🔧 Fix: Passed the `command` variable securely as a positional argument (`$1`) to the inline shell script, avoiding shell interpolation entirely.
✅ Verification: Ran `vitest run src/lib/actions/dev/npm-link-or-shim.test.ts` and verified all tests pass.

Signed-off-by: Jules <jules@example.com>
🚨 Severity: CRITICAL
💡 Vulnerability: Command injection in `defaultCommandPath` in `src/lib/actions/dev/npm-link-or-shim.ts`. The `command` variable was serialized with `JSON.stringify` and interpolated directly into a shell command. Double quotes allow for shell expansion (e.g. `$()`), allowing an attacker to inject and execute arbitrary shell commands.
🎯 Impact: Remote code execution if an attacker can control the input to `defaultCommandPath`.
🔧 Fix: Passed the `command` variable securely as a positional argument (`$1`) to the inline shell script, avoiding shell interpolation entirely.
✅ Verification: Ran `vitest run src/lib/actions/dev/npm-link-or-shim.test.ts` and verified all tests pass.

Signed-off-by: Jules <jules@example.com>
🚨 Severity: CRITICAL
💡 Vulnerability: Command injection in `defaultCommandPath` in `src/lib/actions/dev/npm-link-or-shim.ts`. The `command` variable was serialized with `JSON.stringify` and interpolated directly into a shell command. Double quotes allow for shell expansion (e.g. `$()`), allowing an attacker to inject and execute arbitrary shell commands.
🎯 Impact: Remote code execution if an attacker can control the input to `defaultCommandPath`.
🔧 Fix: Passed the `command` variable securely as a positional argument (`$1`) to the inline shell script, avoiding shell interpolation entirely.
✅ Verification: Ran `vitest run src/lib/actions/dev/npm-link-or-shim.test.ts` and verified all tests pass.

Signed-off-by: Jules <jules@example.com>
The planHostRemediation function was overly long, making it hard to read
and maintain. Extracted the logic for generating each specific
remediation action into dedicated, clearly-named helper functions.

Also fixed typescript errors in tests and control plane.
Fixed local-bootstrap-docs test assertions to match updated
documentation. Added missing authorizationSource to
ExecutionReceiptLineage type.

Signed-off-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
The planHostRemediation function was overly long, making it hard to read
and maintain. Extracted the logic for generating each specific
remediation action into dedicated, clearly-named helper functions.

Also fixed typescript errors in tests and control plane.
Fixed local-bootstrap-docs test assertions to match updated
documentation. Added missing authorizationSource to
ExecutionReceiptLineage type.

Signed-off-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
…4129077122

🧹 Refactor planHostRemediation to extract actions into separate functions
…639923651774

⚡ [performance] Unblock event loop in waitForSandboxReady
🧪 Add tests for error handling in stale-dist-check
⚡ [Performance] Make waitForSandboxReady async to unblock event loop
…13187909365546303251

⚡ optimize: replace synchronous sleep with awaited timeout in gateway recovery
…-14187732998443831686

⚡ fix: prevent synchronous sleep during port-forward cleanup
…7240011211980739

🧹 chore: extract runSandboxSnapshot logic into smaller functions
…re-state-dirs-5872757422889708951

🧹 [Code Health] Extract overly long restoreStateDirs function in sandbox state
…13546712981471453776

🛡️ Sentinel: [CRITICAL] Fix command injection
…5898645822387383

fix: 🛡️ Sentinel: [CRITICAL] Fix SSH command injection
@copy-pr-bot

copy-pr-bot Bot commented May 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7a06b51d-e1d2-4640-b783-a9683a4587aa

📥 Commits

Reviewing files that changed from the base of the PR and between 259b89f and c67e314.

⛔ Files ignored due to path filters (5)
  • operator-console/package-lock.json is excluded by !**/package-lock.json
  • operator-console/test/snapshots/__snapshots__/snapshot-degraded.test.tsx.snap is excluded by !**/*.snap
  • operator-console/test/snapshots/__snapshots__/snapshot-receipt.test.tsx.snap is excluded by !**/*.snap
  • operator-console/test/snapshots/__snapshots__/snapshot-trust.test.tsx.snap is excluded by !**/*.snap
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (235)
  • .github/workflows/verify.yml
  • .jules/sentinel.md
  • .submit.json
  • .vscode/settings.json
  • CHANGELOG.md
  • README.md
  • commit_message.txt
  • dco.txt
  • docs/adr/0001-fork-purpose.md
  • docs/adr/0002-control-plane-separation.md
  • docs/adr/0003-deterministic-routing.md
  • docs/adr/0004-supervised-policy-promotion.md
  • docs/adr/0005-receipts-and-degraded-state-truth.md
  • docs/adr/0006-device-registry-before-scheduler.md
  • docs/adr/0007-policy-outside-prompts.md
  • docs/architecture/capability-attestation.md
  • docs/architecture/command-execution-safety.md
  • docs/architecture/command-safety.md
  • docs/architecture/control-plane.md
  • docs/architecture/current-state.md
  • docs/architecture/device-registry.md
  • docs/architecture/diagnostics.md
  • docs/architecture/failure-semantics.md
  • docs/architecture/governance-invariants.md
  • docs/architecture/governance-threat-model.md
  • docs/architecture/governed-fallbacks.md
  • docs/architecture/gpu-telemetry.md
  • docs/architecture/heterogeneous-routing.md
  • docs/architecture/local-probes.md
  • docs/architecture/local-stack-security-profiles.md
  • docs/architecture/network-policy.md
  • docs/architecture/observability.md
  • docs/architecture/operational-memory.md
  • docs/architecture/policy-engine.md
  • docs/architecture/policy-inheritance.md
  • docs/architecture/policy-promotion.md
  • docs/architecture/policy-tracing.md
  • docs/architecture/provider-routing-integration.md
  • docs/architecture/receipts-and-degraded-states.md
  • docs/architecture/registry-synchronization.md
  • docs/architecture/registry-telemetry-policy.md
  • docs/architecture/remote-execution-adapters.md
  • docs/architecture/remote-probe-security.md
  • docs/architecture/replayability.md
  • docs/architecture/runtime-capabilities.md
  • docs/architecture/runtime-dispatch-integration.md
  • docs/architecture/runtime-integration.md
  • docs/architecture/runtime-telemetry-parsers.md
  • docs/architecture/scheduler-provider-bridge.md
  • docs/architecture/scheduler.md
  • docs/architecture/secret-redaction-doctrine.md
  • docs/architecture/secret-redaction.md
  • docs/architecture/security-policy-model.md
  • docs/architecture/security-policy.md
  • docs/architecture/security-threat-model.md
  • docs/architecture/status-matrix.md
  • docs/architecture/target-state.md
  • docs/architecture/task-classification.md
  • docs/architecture/telemetry-adapters.md
  • docs/architecture/transport-security.md
  • docs/architecture/worker-adapters.md
  • docs/architecture/worker-identity-trust.md
  • docs/architecture/worker-probes.md
  • docs/contributing/branch-strategy.md
  • docs/contributing/control-plane-rules.md
  • docs/contributing/local-bootstrap.md
  • docs/contributing/pr-template-guide.md
  • docs/contributing/verification.md
  • docs/fork-rationale.md
  • docs/index.md
  • docs/replay-inspector.md
  • docs/roadmap.md
  • docs/verification/degraded-state-chaos.md
  • docs/verification/policy-verification.md
  • docs/verification/release-checklist.md
  • docs/verification/release-readiness.md
  • docs/verification/security-hardening.md
  • docs/verification/security-verification-matrix.md
  • docs/verification/verification-matrix.md
  • operator-console/index.html
  • operator-console/package.json
  • operator-console/src/App.tsx
  • operator-console/src/components/layout/header.module.css
  • operator-console/src/components/layout/header.tsx
  • operator-console/src/components/layout/nav.module.css
  • operator-console/src/components/layout/nav.tsx
  • operator-console/src/components/layout/shell.module.css
  • operator-console/src/components/layout/shell.tsx
  • operator-console/src/components/panels/approval-lineage.module.css
  • operator-console/src/components/panels/approval-lineage.tsx
  • operator-console/src/components/panels/diagnostics-summary.module.css
  • operator-console/src/components/panels/diagnostics-summary.tsx
  • operator-console/src/components/panels/observability-summary.module.css
  • operator-console/src/components/panels/observability-summary.tsx
  • operator-console/src/components/primitives/card.module.css
  • operator-console/src/components/primitives/card.tsx
  • operator-console/src/components/primitives/code-block.module.css
  • operator-console/src/components/primitives/code-block.tsx
  • operator-console/src/components/primitives/data-table.module.css
  • operator-console/src/components/primitives/data-table.tsx
  • operator-console/src/components/primitives/empty-state.module.css
  • operator-console/src/components/primitives/empty-state.tsx
  • operator-console/src/components/primitives/key-value-table.module.css
  • operator-console/src/components/primitives/key-value-table.tsx
  • operator-console/src/components/primitives/state-label.module.css
  • operator-console/src/components/primitives/state-label.tsx
  • operator-console/src/components/primitives/status-badge.module.css
  • operator-console/src/components/primitives/status-badge.tsx
  • operator-console/src/components/primitives/timeline.module.css
  • operator-console/src/components/primitives/timeline.tsx
  • operator-console/src/components/primitives/timestamp.tsx
  • operator-console/src/components/viewers/degraded-inspector.module.css
  • operator-console/src/components/viewers/degraded-inspector.tsx
  • operator-console/src/components/viewers/execution-plan-viewer.module.css
  • operator-console/src/components/viewers/execution-plan-viewer.tsx
  • operator-console/src/components/viewers/receipt-viewer.module.css
  • operator-console/src/components/viewers/receipt-viewer.tsx
  • operator-console/src/components/viewers/replay-viewer.module.css
  • operator-console/src/components/viewers/replay-viewer.tsx
  • operator-console/src/components/viewers/trust-inspector.module.css
  • operator-console/src/components/viewers/trust-inspector.tsx
  • operator-console/src/data/control-plane-runtime.ts
  • operator-console/src/data/control-plane-types.d.ts
  • operator-console/src/data/fixtures.ts
  • operator-console/src/data/types.ts
  • operator-console/src/hooks/use-snapshot.ts
  • operator-console/src/main.tsx
  • operator-console/src/routes/degraded-states.tsx
  • operator-console/src/routes/diagnostics.tsx
  • operator-console/src/routes/events.tsx
  • operator-console/src/routes/execution-plans.tsx
  • operator-console/src/routes/index.module.css
  • operator-console/src/routes/index.tsx
  • operator-console/src/routes/overview.module.css
  • operator-console/src/routes/receipts.tsx
  • operator-console/src/routes/replay-validation.tsx
  • operator-console/src/routes/routing-decisions.module.css
  • operator-console/src/routes/routing-decisions.tsx
  • operator-console/src/routes/telemetry.module.css
  • operator-console/src/routes/telemetry.tsx
  • operator-console/src/routes/trust-attestation.tsx
  • operator-console/src/styles/index.css
  • operator-console/src/vite-env.d.ts
  • operator-console/test/components/degraded-inspector.test.tsx
  • operator-console/test/components/degraded-state-rendering.test.tsx
  • operator-console/test/components/empty-state.test.tsx
  • operator-console/test/components/receipt-viewer.test.tsx
  • operator-console/test/components/replay-viewer.test.tsx
  • operator-console/test/components/state-label.test.tsx
  • operator-console/test/components/status-badge.test.tsx
  • operator-console/test/components/timeline.test.tsx
  • operator-console/test/components/unknown-unavailable-rendering.test.tsx
  • operator-console/test/setup.ts
  • operator-console/test/snapshots/snapshot-degraded.test.tsx
  • operator-console/test/snapshots/snapshot-receipt.test.tsx
  • operator-console/test/snapshots/snapshot-trust.test.tsx
  • operator-console/tsconfig.json
  • operator-console/vite.config.ts
  • package.json
  • scripts/verify-changelog-hygiene.js
  • scripts/verify-core.js
  • src/lib/actions/dev/npm-link-or-shim.ts
  • src/lib/actions/sandbox/snapshot.ts
  • src/lib/control-plane/control-plane.test.ts
  • src/lib/control-plane/degraded-state-chaos.test.ts
  • src/lib/control-plane/device-registry.ts
  • src/lib/control-plane/dry-run-diagnostics.ts
  • src/lib/control-plane/evidence-export.test.ts
  • src/lib/control-plane/evidence-export.ts
  • src/lib/control-plane/evidence-types.ts
  • src/lib/control-plane/execution-plans.test.ts
  • src/lib/control-plane/execution-plans.ts
  • src/lib/control-plane/governance.ts
  • src/lib/control-plane/governed-provider-routing.test.ts
  • src/lib/control-plane/governed-provider-routing.ts
  • src/lib/control-plane/heterogeneous-routing.test.ts
  • src/lib/control-plane/heterogeneous-routing.ts
  • src/lib/control-plane/local-diagnostics.ts
  • src/lib/control-plane/local-provider-capability-adapter.ts
  • src/lib/control-plane/local-runtime-probes.test.ts
  • src/lib/control-plane/local-runtime-probes.ts
  • src/lib/control-plane/observability.ts
  • src/lib/control-plane/operational-intelligence.test.ts
  • src/lib/control-plane/operational-memory.ts
  • src/lib/control-plane/policy-engine.test.ts
  • src/lib/control-plane/policy-engine.ts
  • src/lib/control-plane/policy-promotion.ts
  • src/lib/control-plane/remote-execution.test.ts
  • src/lib/control-plane/remote-execution.ts
  • src/lib/control-plane/remote-runtime-probes.test.ts
  • src/lib/control-plane/remote-runtime-probes.ts
  • src/lib/control-plane/replay.ts
  • src/lib/control-plane/runtime-dispatch-integration.test.ts
  • src/lib/control-plane/runtime-dispatch-integration.ts
  • src/lib/control-plane/runtime-seams.test.ts
  • src/lib/control-plane/runtime-seams.ts
  • src/lib/control-plane/scheduler-dry-run-bridge.ts
  • src/lib/control-plane/scheduler.ts
  • src/lib/control-plane/serde.ts
  • src/lib/control-plane/task-classification.ts
  • src/lib/control-plane/types.ts
  • src/lib/control-plane/validation.ts
  • src/lib/control-plane/worker-adapters.ts
  • src/lib/control-plane/worker-dry-run.test.ts
  • src/lib/control-plane/worker-probes.test.ts
  • src/lib/control-plane/worker-probes.ts
  • src/lib/control-plane/worker-trust.test.ts
  • src/lib/control-plane/worker-trust.ts
  • src/lib/execution/cancellation.test.ts
  • src/lib/execution/cancellation.ts
  • src/lib/execution/governance.test.ts
  • src/lib/execution/governance.ts
  • src/lib/execution/idempotency.test.ts
  • src/lib/execution/idempotency.ts
  • src/lib/execution/index.ts
  • src/lib/execution/lease.test.ts
  • src/lib/execution/lease.ts
  • src/lib/execution/queue-decision.ts
  • src/lib/execution/queue.test.ts
  • src/lib/execution/queue.ts
  • src/lib/execution/reason-codes.ts
  • src/lib/execution/receipts.test.ts
  • src/lib/execution/receipts.ts
  • src/lib/execution/types.ts
  • src/lib/onboard.ts
  • src/lib/onboard/preflight.ts
  • src/lib/security/redact.ts
  • src/lib/security/security-policy.test.ts
  • src/lib/security/security-policy.ts
  • src/lib/shields/index.test.ts
  • src/lib/state/sandbox.ts
  • test/changelog-hygiene.test.ts
  • test/local-bootstrap-docs.test.ts
  • test/stale-dist-check.test.ts
  • test/verify-core.test.ts

📝 Walkthrough

Walkthrough

This PR adds repository governance and verification docs, security and control-plane modules, execution queue primitives, sandbox runtime wait and restore changes, CI verification wiring, and a new fixture-backed operator console React app with tests.

Changes

Governance foundation and console

Layer / File(s) Summary
Repository docs and verification baseline
.github/workflows/verify.yml, README.md, CHANGELOG.md, docs/adr/*, docs/architecture/*, docs/contributing/*, docs/verification/*, docs/index.md, docs/roadmap.md, scripts/verify-*.js, test/*, package.json
Adds ADRs, architecture and verification documentation, updates repository positioning and changelog content, and wires CI and local verification commands and checks.
Security policy and redaction contracts
src/lib/security/*, .jules/sentinel.md
Adds security policy helpers for URL, command, payload, and proofpack validation, updates URL redaction behavior, and adds matching security tests.
Control-plane foundations and governed flows
src/lib/control-plane/*
Adds control-plane types, serialization, validation, registry, policy evaluation, scheduling, probes, routing, remote execution, replay, evidence export, operational memory, execution plans, and related tests.
Execution queue governance and receipts
src/lib/execution/*
Adds execution queue data models and managers for governance, leases, idempotency, cancellation, receipts, queue decisions, and their tests.
Sandbox and runtime operational fixes
src/lib/onboard.ts, src/lib/onboard/preflight.ts, src/lib/actions/sandbox/snapshot.ts, src/lib/state/sandbox.ts, src/lib/shields/index.test.ts, src/lib/actions/dev/npm-link-or-shim.ts
Refactors sandbox snapshot and restore paths, converts onboarding wait loops to async delays, extracts remediation helpers, and updates restore-related regression tests.
Operator console application
operator-console/*
Adds a read-only Vite and React operator console with shared primitives, fixture-backed routes, runtime summary helpers, styling, and component and snapshot tests.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Suggested labels

documentation, security

Suggested reviewers

  • cv
  • jyaunches

Poem

A rabbit tapped the changelog bright,
then lined up proofs in moonlit light.
With routes and receipts in tidy rows,
the console garden softly grows.
No hidden hops, no secret burrow—
just careful tracks for each tomorrow.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch main

Warning

⚠️ This pull request might be slop. It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@Hardonian Hardonian closed this May 17, 2026
@Hardonian

Copy link
Copy Markdown
Author

Disregard. Pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant