Review of the plugin found five defects; each is reproduced by a new test.
- A read that finished after its Agent was disposed registered the grant
again, owned by the plugin until unload. A read now registers nothing once
`agent/disposed` was seen, a registration the unloading fiber refuses is
contained instead of rejecting a committed move, and the unload cancels and
awaits reads in flight.
- During a Host move the policy combined the entered directory with the Git
directory of the one left until the read ended. A grant now records the
directory it was read for and ends in the step that commits the move,
through a prepended `session/event` listener; a Session that publishes no
events loses it when the read of the entered directory starts.
- Matching pointer files were enough to grant their grandparent directory.
The layout now requires `HEAD`, `objects`, and `refs` in that directory,
and the plugin refuses an administration directory that lies inside a
directory the Session's policy already lets it write, unless the result is
the directory it already granted. A writable `<X>/worktrees/<name>` no
longer yields `<X>`, a configured grant of one administration directory is
no longer widened to the whole Git directory, and a bare repository under a
directory named `worktrees` cannot use its grant to obtain the parent.
- Reads take the caller's cancellation, merged with the plugin's own; a
cancelled read changes nothing and warns of nothing.
- Pointer files are read through `readBytes` with an 8192-byte cap.
Pointer files planted while a Session could write more still pass; the README
and the Agent Note state that limit.