Repository navigation
fix(setup): normalize Gemini trust rules before selection - #10378
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The reviewed changes appear safe to merge; no blocking issue was found. SummaryGemini trust rules now use normalized keys before replacement and selection.
No actionable issues were found. This review checked source only; tests and an installed Gemini client were not run. Whether another PR supersedes this one could not be checked because GitHub access was unavailable. Reviews (2) · Last reviewed commit: "chore: merge main for Gemini trust valid..." · Reviewed by Greptile |
|
Coordination from the separate n13-1416 Rizin session: I inspected failed shard 1/8. The only failure is the unchanged |
|
The isolated common repair is now Ready for Review as #10384, commit |
Summary
Fixes #10373. Gemini setup and doctor could select an older trust rule because a trailing-slash or dot spelling was longer than the final key for the same directory. This could report a healthy registration despite an applicable workspace exclusion, or block setup unnecessarily.
Normalize trust-file keys at admission and retain the final value for each lexical key. Keep physical resolution separate for applicability and retain Gemini's key-length/TRUST_PARENT precedence. Use the existing JSON-map owner so a literal relative
__proto__rule reaches that normalization instead of disappearing.Expected behavior is grounded in released Gemini CLI 0.68.0's trust loader and path normalization. No installed Gemini runtime was exercised.
Verification
Executed on macOS arm64, Node 24.22.1/npm 11.16.0. Refreshed on
0bc1b4aafter merging maincdc4541ef7:4b26f38d6f: 5 failed, 7 passed. Four failures select the wrong normalized rule; the fifth drops the literal relative key. Ordinary relative-key and more-specific TRUST_PARENT controls pass.npm run check— passed, 0 typed-lint errors and 4,875 advisory warnings.npm run verify:package— passed, including itsnpm pack --dry-run --json, clean installation/update, setup/uninstall, skill and MCP verification.git diff --check— passed. Initial fix-headcheck:fastand test-discovery verification also passed; no test files were added.Hosted CI at updated head
0bc1b4a: all four required checks passed — Static checks, Conventional PR title, Portable tests and CI required (run). Automated code review completed without findings on this exact head. The original84eea3crun's unchanged fingerprint timeout remains documented in #10381; its independent repair is #10384.CodeQL alert 769 was narrowly dismissed as a false positive: the existing
realpathmetadata lookup uses caller-authorized local paths under SECURITY.md (assessment). Other host platforms, installed-client behavior and duplicate-spelling prevalence remain unverified.Scope and coordination
Existing read-only client-policy admission; no new provider, authority, configuration writer, advertised schema or generated-file change. The owner audit found one Gemini trust-file reader; the normalized map replaces raw-key selection there. Physical path resolution remains a separate fact used by the same consumers. No related cleanup remains in this owner.
Rechecked current main, issue claims, targeted open/closed PRs and all 876 open PR file inventories before submission; no overlapping owner or acceptance-test change was found.
Author readiness
Human owner: @kaoru0822-kitauji. This author is exempt from the declaration under CONTRIBUTING.md; no human review is attested here.