feat(agents): let serialized repositories invert workspace isolation #1147

Merged
coilyco-ops merged 4 commits from feat/eco-serialized-checkouts into main 2026-08-20 06:44:11 +00:00
Member

The shadow, worktree, and temporary-clone rules all assume a second writable tree is isolation. For a Unity project and the game world its assets drive, it is not: both trees resolve the same editor lock and the same asset database, so the merge back is a corrupt scene rather than a conflict Git can show.

The rule

  • AGENTS.md gains "Serialized checkouts invert isolation", placed after the three rules it carves out of. It keys on a named set rather than on repository names, so the doctrine base stays host-generic per its own scope statement.
  • docs/native-agent-workspaces.md gains "Serialized repositories", which names the set (coilyco-gaming/eco-app, coilyco-gaming/eco-mods, coilyco-gaming/eco-ops), scopes it to the native Windows tower, and states what projection, the fleet pass, and unexpected-clone detection each skip.
  • pyproject.toml raises the AGENTS.md caps to 300 lines / 28150 chars.

The enforcement

Doctrine alone would not have stopped anything: the launcher still linked a session worktree for each of the three, and the fleet pass still switched and deleted their branches.

resolveExpectedRepositories is the single point both createNativeSession and runNativeWorkspaceSweep read, so the exemption lands there. Serialized identities drop out of the projected list, which removes the worktree, the branch switch, the fast-forward, and the branch deletion together.

They are seeded into the expected set in the same change. An unexpected clone is defined as one compiled residency omits, and projection no longer claims them, so without the seed the scan would delete the canonical checkout on its third pass. The exemption would have destroyed exactly the tree it exists to protect.

nativeSerializedGOOS is a variable rather than a direct runtime.GOOS read so the suite covers both the Windows and the non-Windows branch from either platform. Three tests: not projected, survives the unexpected-clone scan, and still projected off Windows.

On the cap bump

The existing comment asks that a new entry displace one rather than extend the file. This one cannot. It modifies three rules that live only here, and no role source or skill can hold it, because an agent has to know not to shadow before it takes its first action and every role source fires conditionally. The exemption is host-scoped rather than role-scoped, so no role meld is the right owner. The set itself stays in docs, which keeps the base's growth to the rule alone.

Scope

Host, not repository. The same three identities keep ordinary projection everywhere else, because the lock lives on the tower where the Unity editor and the Eco server run. eco-app holds no Unity assets and takes the exemption by sharing their release cycle, so one rule covers three repositories instead of splitting into a rule nobody recalls correctly under pressure.

The tower-side restatement, which names the three identities so the rule fires without a second source, landed in coilyco-bridge/agentic-os-kai@f58dfeb.

pre-commit run --all-files passes. just aos-test has seven failures on the Windows tower that predate this branch (macOS keyring projection, MCP catalogue hydration, path-identity fail-closed); the serialized tests and the rest of the native-shadow suite pass.

The shadow, worktree, and temporary-clone rules all assume a second writable tree is isolation. For a Unity project and the game world its assets drive, it is not: both trees resolve the same editor lock and the same asset database, so the merge back is a corrupt scene rather than a conflict Git can show. ## The rule - `AGENTS.md` gains "Serialized checkouts invert isolation", placed after the three rules it carves out of. It keys on a named set rather than on repository names, so the doctrine base stays host-generic per its own scope statement. - `docs/native-agent-workspaces.md` gains "Serialized repositories", which names the set (`coilyco-gaming/eco-app`, `coilyco-gaming/eco-mods`, `coilyco-gaming/eco-ops`), scopes it to the native Windows tower, and states what projection, the fleet pass, and unexpected-clone detection each skip. - `pyproject.toml` raises the `AGENTS.md` caps to 300 lines / 28150 chars. ## The enforcement Doctrine alone would not have stopped anything: the launcher still linked a session worktree for each of the three, and the fleet pass still switched and deleted their branches. `resolveExpectedRepositories` is the single point both `createNativeSession` and `runNativeWorkspaceSweep` read, so the exemption lands there. Serialized identities drop out of the projected list, which removes the worktree, the branch switch, the fast-forward, and the branch deletion together. They are seeded into the expected set in the same change. An unexpected clone is defined as one compiled residency omits, and projection no longer claims them, so without the seed the scan would delete the canonical checkout on its third pass. The exemption would have destroyed exactly the tree it exists to protect. `nativeSerializedGOOS` is a variable rather than a direct `runtime.GOOS` read so the suite covers both the Windows and the non-Windows branch from either platform. Three tests: not projected, survives the unexpected-clone scan, and still projected off Windows. ## On the cap bump The existing comment asks that a new entry displace one rather than extend the file. This one cannot. It modifies three rules that live only here, and no role source or skill can hold it, because an agent has to know not to shadow before it takes its first action and every role source fires conditionally. The exemption is host-scoped rather than role-scoped, so no role meld is the right owner. The set itself stays in docs, which keeps the base's growth to the rule alone. ## Scope Host, not repository. The same three identities keep ordinary projection everywhere else, because the lock lives on the tower where the Unity editor and the Eco server run. `eco-app` holds no Unity assets and takes the exemption by sharing their release cycle, so one rule covers three repositories instead of splitting into a rule nobody recalls correctly under pressure. The tower-side restatement, which names the three identities so the rule fires without a second source, landed in `coilyco-bridge/agentic-os-kai@f58dfeb`. `pre-commit run --all-files` passes. `just aos-test` has seven failures on the Windows tower that predate this branch (macOS keyring projection, MCP catalogue hydration, path-identity fail-closed); the serialized tests and the rest of the native-shadow suite pass.
feat(agents): let serialized repositories invert workspace isolation
All checks were successful
ci / aos-eval-tests (pull_request) Successful in 7s
ci / ward-doctor (pull_request) Successful in 12s
ci / aos-cli-tests (pull_request) Successful in 20s
ci / gate (pull_request) Successful in 56s
0915751618
The shadow, worktree, and temporary-clone rules all assume a second
writable tree is isolation. For a Unity project and the game world its
assets drive, it is not: both trees resolve the same editor lock and the
same asset database, so the merge back is a corrupt scene rather than a
conflict Git can show.

Add "Serialized checkouts invert isolation" to the doctrine base, keyed
on a named set rather than on repository names, so the base stays
host-generic. The set itself, its Windows-tower scope, and the reasoning
live in docs/native-agent-workspaces.md beside the projection, fleet
pass, and unexpected-clone machinery that must skip it.

Raise the AGENTS.md caps for the new section. It cannot displace one of
the three rules it modifies, and no role source can hold it, because an
agent has to know not to shadow before it takes its first action.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
feat(aos): stop projecting the serialized checkouts on Windows
All checks were successful
ci / aos-eval-tests (pull_request) Successful in 6s
ci / ward-doctor (pull_request) Successful in 13s
ci / aos-cli-tests (pull_request) Successful in 20s
ci / gate (pull_request) Successful in 49s
194f2c425d
The doctrine said an agent must work these three in place. Nothing
enforced it, so the launcher still linked a session worktree for each
one and the fleet pass still switched and deleted their branches.

resolveExpectedRepositories is the single point both paths read, so the
exemption lands there. Serialized identities drop out of the projected
list, which removes the worktree, the branch switch, the fast-forward,
and the branch deletion together.

They are seeded into the expected set at the same time. Projection no
longer claims them, and an unexpected clone is defined as one compiled
residency omits, so without the seed the scan would delete the canonical
checkout on its third pass. The exemption would have destroyed exactly
the tree it exists to protect.

nativeSerializedGOOS is a variable rather than a direct runtime.GOOS
read so the suite covers the Windows and non-Windows branches from
either platform.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into feat/eco-serialized-checkouts
Some checks failed
ci / aos-eval-tests (pull_request) Successful in 5s
ci / ward-doctor (pull_request) Successful in 13s
ci / gate (pull_request) Successful in 54s
ci / aos-cli-tests (pull_request) Failing after 2m18s
057b071dd3
Merge remote-tracking branch 'origin/main' into feat/eco-serialized-checkouts
All checks were successful
ci / aos-eval-tests (pull_request) Successful in 5s
ci / ward-doctor (pull_request) Successful in 14s
ci / aos-cli-tests (pull_request) Successful in 22s
ci / gate (pull_request) Successful in 55s
683a158c57
coilyco-ops deleted branch feat/eco-serialized-checkouts 2026-08-20 06:44:11 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/agentic-os!1147
No description provided.