You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ui-server: Git mask-target preparation refuses maintenance on an unwritable .git that has no adapter #4469
Part of #4426 (follow-ups from #4278). Deferred from the final review of PR #4444.
Context
prepareMaintenanceGitTargets (packages/ui-server/src/brain/maintenance-git.ts:124-151) runs before every maintenance checkpoint:
run and launch (packages/ui-server/src/brain/host-boundary.ts:687, :786);
both sync paths (packages/ui-server/src/brain/sync-mirror.ts:209, :245).
It creates hooks, info and modules whenever .git is a server-owned directory.
A .git with no config gets no adapter (prepareMaintenanceGit, maintenance-git.ts:58), so the installer never needs those targets. But if that directory isn't writable by its owner, mkdir throws EACCES and every maintenance operation is refused. Before the epic, the same failure only produced a strict-profile fallback in status, and maintenance ran without an adapter.
Normal use can't produce this: git init and git clone always write config. It takes a hand-made or damaged .git.
The test at packages/ui-server/tests/maintenance-git-targets.test.ts:16-54 also hand-builds an installer manifest for a checkout with no config, which production would skip. Related: #4466.
Scope
Decide whether preparation applies when no adapter will be installed. Either skip it, or treat a failed mkdir there as "nothing to prepare".
Give the fixture a config, so it models a checkout that gets an adapter.
Acceptance criteria
A test with a server-owned, unwritable .git that has no config and lacks a target asserts the decided outcome. If the decision is to skip, maintenance reaches checkpoint acquisition.
A .git with config and a target that can't be prepared still refuses the operation, naming the target.
The run, launch and sync fixtures use a checkout for which production installs the adapter.
The PR answers the guard checklist in docs/decisions/proportionate-containment.md for the changed behaviour.
Activity