Skip to content

docs: Update enforcement table for phase file restrictions [doc-updater]#804

Merged
jwbron merged 2 commits intomainfrom
egg/doc-update-phase-enforcement
Feb 17, 2026
Merged

docs: Update enforcement table for phase file restrictions [doc-updater]#804
jwbron merged 2 commits intomainfrom
egg/doc-update-phase-enforcement

Conversation

@james-in-a-box
Copy link
Contributor

Update the 'What's Enforced' table in README.md to reflect the defense-in-depth enforcement added in PR #800 (commit 42a8d2f).

The 'Agent tampers with contracts' row previously only described push-time file restriction enforcement. PR #800 added two additional enforcement layers:

  • Readonly filesystem mounts: .egg-state/ subdirectories (drafts, contracts, pipelines, reviews) are now bind-mounted readonly during the implement phase via phase_readonly_mounts() in shared/egg_container/__init__.py
  • Commit-time validation: staged files are checked against phase restrictions at git commit time (in addition to existing push-time validation)

The updated row reflects all three enforcement layers in order (OS mount → commit-time → push-time), matching the architecture/README.md description.

The gateway/README.md already had comprehensive coverage of all three layers from the PR itself; this update brings the main README in sync.

Triggered by: #800

Test plan:

  • Read the updated table row and verify it accurately describes readonly mounts, commit-time validation, and push-time validation
  • Confirm gateway/README.md sections on "Commit-Time Validation" and "Phase-Based Readonly Mounts" are consistent with the updated description

Authored-by: egg

Update the 'What's Enforced' table in README.md to reflect the
defense-in-depth enforcement added in PR #800:
- Readonly filesystem mounts on .egg-state/ dirs during implement phase
- Commit-time validation for staged restricted files
- Push-time validation (existing, now framed as one of three layers)

Triggered by: #800

Authored-by: egg
Copy link
Contributor

@egg-reviewer egg-reviewer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation-only change (1 line in README.md). Verified all three claims against the codebase:

  1. Readonly mountsphase_readonly_mounts() in shared/egg_container/__init__.py bind-mounts .egg-state/{drafts,contracts,pipelines,reviews} as readonly during the implement phase. Correct.
  2. Commit-time validationgateway/gateway.py checks staged files against phase restrictions on git commit operations (lines ~1165-1210), returning HTTP 403 on violation. Correct.
  3. Push-time validationgateway/gateway.py checks changed files against both role-based and phase-based restrictions on git push. Correct.

Minor note: the text says ".egg-state/ dirs" which is slightly imprecise — it's four specific subdirectories, not all of .egg-state/. This is a reasonable simplification for a summary table, so not blocking on it. If you want to be precise, you could say ".egg-state/ subdirs" instead, but it's fine either way.

Consistent with gateway/README.md Design Decision #7 which already lists all three enforcement layers.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

Copy link
Contributor Author

@james-in-a-box james-in-a-box bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Changed "dirs" → "subdirs" for precision (b37c971).

— Authored by egg

@james-in-a-box

This comment has been minimized.

Copy link
Contributor

@egg-reviewer egg-reviewer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed at b37c971. The only change since the previous review (fb3c6ae) is dirssubdirs in the enforcement table row, addressing the precision suggestion from the initial review.

Verification:

  • "subdirs" is accurate: _IMPLEMENT_READONLY_DIRS in shared/egg_container/__init__.py lists four specific subdirectories (drafts, contracts, pipelines, reviews), not all of .egg-state/.
  • The three enforcement layers described (readonly mounts → commit-time → push-time) remain correct per gateway/README.md and source code.
  • Consistent with gateway/README.md Design Decision #7.

No issues found. Previous feedback fully addressed.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box
Copy link
Contributor Author

egg is addressing review feedback...

@james-in-a-box
Copy link
Contributor Author

egg feedback addressed. View run logs

4 previous review(s) hidden.

@jwbron jwbron merged commit ec841c0 into main Feb 17, 2026
16 checks passed
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