Repository navigation
fix(grants): make git config grant tests hermetic and restore green main - #57
Conversation
Add a new grant that exposes a curated git configuration to the jailed environment, letting sandboxed processes read the settings they need without access to the host's full config. Tests cover the new grant and its registration alongside the existing ones. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00. Or wait 55 minutes for your next included review. View limit details
Comment |
Codex Review SummaryThis 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. |
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Ready for maintainer review Review snapshot
Completeness: Complete FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before mergeNone. How this fits togetherflowchart LR
n0["...xdg_config_home_replaces_home_config_root<br/>changed"]:::changed
n1["resolve_local_jail_grants<br/>changed"]:::changed
n2["...s_preserve_logical_parent_component_pairs<br/>changed"]:::changed
n3["..._be_promoted_through_writable_descendants<br/>changed"]:::changed
n4["...ocations_under_aliased_parent_directories<br/>changed"]:::changed
n5["tempdir"]:::impacted
n6["resolve_hermetic"]:::impacted
n7["Result"]:::impacted
n8["Error"]:::impacted
n9["error"]:::impacted
n10["LocalGrantConfig"]:::impacted
n0 -->|calls| n5
n0 -->|tests| n5
n0 -->|uses| n7
n0 -->|uses| n8
n0 -->|uses| n9
n1 -->|uses| n7
n2 -->|calls| n5
n2 -->|tests| n5
n2 -->|uses| n7
n2 -->|uses| n8
n2 -->|uses| n9
n2 -->|uses| n10
n3 -->|calls| n5
n3 -->|tests| n5
n3 -->|calls| n6
n3 -->|tests| n6
n3 -->|uses| n7
n3 -->|uses| n8
n3 -->|uses| n9
n3 -->|uses| n10
n4 -->|calls| n5
n4 -->|tests| n5
n4 -->|calls| n6
n4 -->|tests| n6
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0027 · 306,210 in / 19,746 out · 37,888 cached (12%) · ladder/vectors-oai3, deepseek-v4.1-flash · 328 embedded
critique: $0.0007 · 98,850 in / 9,515 out · 22,784 cached (23%) · deepseek-v4.1-flash
security: $0.0009 · 122,459 in / 3,285 out · 7,552 cached (6%) · deepseek-v4.1-flash
tests: $0.0004 · 40,815 in / 2,782 out · 2,944 cached (7%) · deepseek-v4.1-flash
description: $0.0006 · 36,735 in / 3,244 out · 4,608 cached (13%) · deepseek-v4.1-flash
mainhas been red since #51 merged (CI runs on 3da6fc3 and 171b244). That merge brought in three separate defects:resolve_local_jail_grantsread the process'sXDG_CONFIG_HOME, and GitHub's Ubuntu image sets it. Sodiscovered_git_config_links_cannot_be_replaced_through_writable_parents,duplicate_git_config_targets_keep_each_discovered_alias_read_onlyandgit_ignore_patterns_cannot_add_config_include_grantslooked for git config outside the temp home. The resolver body now lives in a crate-privateresolve_local_jail_grants_in(home, xdg_config_home, cfg, protected). The publicresolve_local_jail_grantsreads the environment once and delegates to it. The grant tests call it through aresolve_hermetichelper with XDG unset.absolute_xdg_config_home_replaces_home_config_rootcompared granted (canonicalized) paths against the raw temp path (/varvs/private/var,\\?\on Windows). It now canonicalizes the expected path.map(..).unwrap_or_else(..)on anOptionatgit_config.rs:25is nowmap_or_else.No behaviour change: the public resolver still honours
XDG_CONFIG_HOMEexactly as #51 intended.Verification
XDG_CONFIG_HOME=/tmp/nonexistent-xdg cargo test -p tinybox-jail --all-features --lib: 3 failed before the fix, 171 pass after, and they also pass with XDG unset.cargo clippy --all-targets --all-features -- -D warningsandcargo fmt --all --checkare clean.