feat: ORCH-057-bug-follow-up-orch-040-normali #113

Merged
admin merged 9 commits from feature/ORCH-057-bug-follow-up-orch-040-normali into main 2026-06-10 03:09:07 +03:00
Owner

Auto-created by orchestrator merge-verify for feature/ORCH-057-bug-follow-up-orch-040-normali

Auto-created by orchestrator merge-verify for feature/ORCH-057-bug-follow-up-orch-040-normali
admin added 8 commits 2026-06-10 03:03:36 +03:00
Follow-up ORCH-040: legacy root:root files in /repos broke worktree creation
under uid 1000 with a raw "Permission denied" (agent never started, no diagnosis).
Three additive, kill-switch-reversible layers; STAGE_TRANSITIONS / QG_CHECKS /
check_* / machine-verdict keys / DB schema are byte-for-byte unchanged.

- D1: ensure_worktree classifies the permission class and raises an actionable
  RuntimeError (cause + chown command + INFRA.md ref); non-permission errors keep
  the prior raw-stderr contract; kill-switch off -> contract 1:1 as before ORCH-057.
- D2: new never-raise leaf src/fs_normalize.py — scan_ownership (TTL-cached,
  early-exit per root), applies()-first scope (empty CSV -> self-hosting only),
  opt-in normalize() that chowns ONLY when privileged (no-op under uid 1000).
- D3: best-effort startup detect in main.lifespan (WARNING + Telegram on mismatch,
  never-fatal); read-only fs_ownership block in GET /queue; POST /fs-normalize/check.
  Claim is NOT blocked — the clear early outcome is delivered by D1 at launch.
- Docs/config: .env.example flags + CHANGELOG (architecture README / adr-0031 /
  INFRA.md procedure already landed on the branch).
- Tests: test_fs_normalize.py, test_git_worktree_perm.py,
  test_fs_normalize_startup.py, test_api_queue.py (TC-01..TC-12). Full suite green.

Refs: ORCH-057
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tester(ET): auto-commit from tester run_id=555
All checks were successful
CI / test (push) Successful in 51s
CI / test (pull_request) Successful in 48s
6d8b7fb934
admin force-pushed feature/ORCH-057-bug-follow-up-orch-040-normali from 45a61f8ff8 to 6d8b7fb934 2026-06-10 03:03:36 +03:00 Compare
admin merged commit e2c0b2ba9b into main 2026-06-10 03:09:07 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/orchestrator#113