NVIDIA / NVIDIA/OpenShell

feat(policy): revalidate pending policy proposals when effective policy changes

Open
#1,636 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

state:stale
Dominant language
Rust
Stars
8.7k
Forks
1.3k
Avg merge
2d 11h
Merged PRs (30d)
253

Description

Problem Statement

Pending policy proposal chunks store validation_result from the effective policy and credential/provider state at proposal submission time. If the effective policy, provider/credential composition, or relevant approval settings change before a pending chunk is approved, the stored prover verdict can become stale. Reviewers may see prover: no new findings or older findings that no longer match the policy that will actually receive the merge.

Proposed Design

Track enough validation baseline context to identify stale pending chunks, such as the policy hash/revision and a provider or credential composition fingerprint used for validation. When those inputs change, re-evaluate pending chunks or mark their validation_result stale until revalidated. Approval paths should not silently rely on stale validation; they should refresh the verdict or surface a clear stale-validation state before approval.

Alternatives Considered

Re-running the prover only at submit time is enough for the MVP and common single-proposal flow, but it does not cover long-lived pending chunks or concurrent policy/provider updates. Re-running only during human approval is smaller, but still leaves stale reviewer inbox state and does not help reviewer agents that reason before approval.

Agent Investigation

PR #1528 validates each proposal against a snapshot from current_effective_policy_for_sandbox inside handle_submit_policy_analysis. validation_result is persisted on the draft chunk. handle_approve_draft_chunk and handle_approve_all_draft_chunks merge pending chunks without recomputing the prover verdict against the latest effective policy and provider state.

Related: #1528, #1062, #1434.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with handle_submit_policy_analysis, handle_approve_draft_chunk, and handle_approve_all_draft_chunks, then trace how validation_result is persisted on draft chunks. Done means pending validation can be identified as stale when policy, provider or credential inputs change, and approval refreshes the verdict or clearly surfaces the stale state.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.