Skip to content

Share proj across Serena agents - #47

Merged
xormania merged 1 commit into
devfrom
agent/serena-share-proj
Aug 3, 2026
Merged

Share proj across Serena agents#47
xormania merged 1 commit into
devfrom
agent/serena-share-proj

Conversation

@xormania

@xormania xormania commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • keep the Git-ignored proj/ planning tree on Serena's shared writable /workspace bind
  • retain masking for Git metadata, local environment files, secrets, runtime state, protected rails, and Serena cache state
  • fail closed before startup when proj/ is not a real directory or contains sensitive path names, hardlinked files, symlinks, FIFOs, Unix sockets, or other special objects
  • document the cooperating-host-writer boundary and the client restart required to replace a stale mount plan
  • add static, adversarial, and live Docker coverage for shared read/write behavior and containment regressions

Why

Serena's generated mount override treated proj/ as runtime state and replaced it with an empty read-only directory. Agents using the same checkout therefore could not see or update the user's shared planning and audit documents.

Impact

New Serena sessions see the same proj/ files as host-side agents and can write through to the checkout. Existing Serena sessions must reload or restart; activation alone cannot recreate container mounts.

The practical direct-bind design trusts cooperating concurrent host-side writers to preserve the ordinary-file contract. A hostile concurrent host writer remains outside the container-containment guarantee and would require brokered storage.

Validation

  • test-first RED for the old proj/ mask and missing activation guidance
  • adversarial RED/GREEN cases for masked-state and protected-rail hardlink aliases, sensitive names, nested symlinks, FIFOs, Unix sockets, and a symlinked proj/ root
  • bash tests/serena/config-cases.sh
  • bash tests/docker/serena-runtime.sh (Codex, Claude Code, and Grok; live host-visible write-through)
  • ./scripts/dev/lint-scripts
  • bash tests/agent/policy-verify.sh
  • ./tools/validate.sh
  • ./tools/containment-lint.sh
  • ./scripts/dev/check default quick
  • Serena symbol retrieval and file diagnostics for the changed Bash code

@xormania
xormania marked this pull request as ready for review August 3, 2026 05:08
@xormania
xormania merged commit 6427440 into dev Aug 3, 2026
6 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