bug(policy): stabilize endpoint conflict diagnostics in policy lint
還沒有人認領這個 Issue。
評估
研究方向
The payload names no source files, so start from the openshell policy lint command and the endpoint conflict check that the gateway also uses. Run the 20-iteration loop on the YAML from the reproduction steps to confirm that rule and conflict order changes between runs. Done means repeated runs give the same order, and an integration test shows offline lint and gateway CreateSandbox reject the same YAML with the same details and return FailedPrecondition.
由索引模型根據 Issue 內容生成。
描述
User Story
I use openshell policy lint to check sandbox policy files locally. While reviewing #5358, I ran the command several times on the same YAML to check how it reported a conflict between two network rules.
Problem Statement
The two rules below match the same host and port. One uses the default TLS mode and the other sets tls: skip. Lint rejects the file every time. Some runs list alpha first and others list zeta first. The TLS values swap with the rule names. If the policy has several conflicts, the order of the pairs can change too. The gateway uses the same endpoint conflict check.
This follows up on the offline lint work in #4035. Review on #5358
Impact / Why This Matters
The same conflict can show up as a change when comparing lint output from two CI runs of the same policy.
Acceptance Criteria
- Repeated lint and gateway checks of the same policy keep the order of conflicts and the order of the rules within each conflict stable.
- An integration test checks that offline lint and gateway
CreateSandboxwithout providers reject the same YAML and report the same conflict details. The gateway returnsFailedPrecondition.
Reproduction Steps
-
Save this as
policy.yaml.version: 1 network_policies: zeta: endpoints: - {host: example.com, port: 443, tls: skip} alpha: endpoints: - {host: example.com, port: 443} -
Run the offline check 20 times.
for i in $(seq 1 20); do openshell policy lint policy.yaml; done -
Compare the rule names and TLS values across runs.
Environment
- OpenShell built from
mainat38c47412dd7e94b8efc44b128940e097590b7582, macOS 26.6.2 on arm64. - The reproduction runs entirely in the offline CLI.
Logs
All 20 runs exited with status 1.
9 runs 'alpha' … 'zeta' … tls=0 vs 1
11 runs 'zeta' … 'alpha' … tls=1 vs 0
- 主要語言
- Rust
- 星號
- 21.5k
- 分支
- 2.1k
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NVIDIA/OpenShell 的其他 Issue
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 86/100
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 78/100
-
bug: Ready=False/PodTerminating is treated as a terminal sandbox failure可能已有人在做 @TaylorMutch 於 9 天前認領。 未關閉state:accepted state:pr-opened
難度 2/5 1-3 小時 新手友好度 78/100
-
state:triage-needed
難度 1/5 1-3 小時 新手友好度 78/100
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 62/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆
-
autofixer: follow-up
難度 2/5 1-3 小時 新手友好度 78/100
tursodatabase/turso#12531 ·
維護者通常 1 天內回覆
-
bug help wanted ui
難度 2/5 1-3 小時 新手友好度 82/100
userFRM/egui-charts#4292 ·
維護者通常 1 天內回覆
-
Issue-Bug Need-Review
難度 1/5 1-3 小時 新手友好度 85/100
PowerShell/DSC#1832 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆