Skip to content

T5-P6-A11-WP1 Document Codex git_metadata_writable Sandbox Verification#4121

Merged
Trecek merged 2 commits into
developfrom
t5-p6-a11-wp1-establish-a-documented-evidence-backed-determi/4047
Jun 27, 2026
Merged

T5-P6-A11-WP1 Document Codex git_metadata_writable Sandbox Verification#4121
Trecek merged 2 commits into
developfrom
t5-p6-a11-wp1-establish-a-documented-evidence-backed-determi/4047

Conversation

@Trecek

@Trecek Trecek commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a documented, evidence-backed code comment above git_metadata_writable=False in CodexBackend.capabilities confirming that the Codex workspace-write sandbox protects .git/ from writes. This is Path A — the existing value is correct. The Codex CLI source code (codex-rs/protocol/src/permissions.rs) hardcodes .git in PROTECTED_METADATA_PATH_NAMES, and the default_read_only_subpaths_for_writable_root() function enforces read-only access for .git/ on all platforms (Seatbelt on macOS, bwrap/landlock on Linux). Add two tests: one asserting the capability field value, one asserting setup_session_dir does not create a .git subdirectory.

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/impl-20260627-010559-672793/.autoskillit/temp/make-plan/t5_p6_a11_wp1_codex_git_metadata_writable_plan_2026-06-27_013500.md

Closes #4047

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 46 5.8k 567.7k 70.6k 24 54.5k 4m 4s
verify* sonnet 1 84 6.3k 394.9k 47.0k 26 28.5k 2m 48s
implement* MiniMax-M3 1 72.9k 3.5k 863.5k 0 32 0 1m 35s
fix* sonnet 1 142 5.6k 780.1k 58.1k 41 39.6k 3m 12s
audit_impl* sonnet 1 60 10.3k 242.7k 44.5k 15 33.9k 4m 41s
prepare_pr* MiniMax-M3 1 40.7k 2.1k 109.0k 0 11 0 32s
compose_pr* MiniMax-M3 1 36.4k 1.6k 213.0k 0 14 0 47s
review_pr* sonnet 2 226 26.4k 1.2M 62.3k 64 79.6k 6m 43s
Total 150.6k 61.7k 4.4M 70.6k 236.1k 24m 24s

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 19 45446.7 0.0 184.5
fix 6 130022.5 6595.2 935.8
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
Total 25 174982.5 9442.7 2468.2

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 46 5.8k 567.7k 54.5k 4m 4s
sonnet 4 512 48.7k 2.6M 181.6k 17m 26s
MiniMax-M3 3 150.1k 7.3k 1.2M 0 2m 53s

Trecek added 2 commits June 27, 2026 01:14
The Codex workspace-write sandbox mounts .git/ read-only across all
platforms. Codex CLI source (codex-rs/protocol/src/permissions.rs)
hardcodes .git in PROTECTED_METADATA_PATH_NAMES, and
default_read_only_subpaths_for_writable_root() enforces this via
Seatbelt on macOS and bwrap/landlock on Linux.

Add a multi-line comment above git_metadata_writable=False in
CodexBackend.capabilities documenting:
- The behavioral finding (.git/ is read-only)
- The evidence basis (permissions.rs, PROTECTED_METADATA_PATH_NAMES)
- The enforcement mechanism (Seatbelt, bwrap/landlock)
- The consumer path (_auto_overrides.py, fleet/_api.py,
  rules_backend_compat.py) and gating behavior

Add two regression tests:
- test_git_metadata_writable asserts the capability field value
- test_no_git_subdir_created asserts setup_session_dir does not
  create a .git/ subdirectory

Refs: #3876
@Trecek Trecek added this pull request to the merge queue Jun 27, 2026
Merged via the queue into develop with commit e880352 Jun 27, 2026
3 checks passed
@Trecek Trecek deleted the t5-p6-a11-wp1-establish-a-documented-evidence-backed-determi/4047 branch June 27, 2026 08:44
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