Repository navigation
Stop promising project files live in APPX_DATA - #10
Merged
Merged
Conversation
In container mode the agent owns /workspace *inside* the outer container,
backed by the builder-workspace Docker volume. APPX_DATA holds only the
SQLite DB and TLS certs, but bootstrap's prompt said it "stores the DB, TLS
certs, and project files" — so an operator mounting a volume there for
project growth got ~720K of DB and certs while 300M+ of real project data
stayed on the root disk.
Make the code and the docs agree with where the bytes actually are:
- bootstrap.sh: the prompt and the APPX_DATA comment now say the directory
holds the DB and certs only, and name the two Docker volumes that do grow.
- main.go: hostProjectRoot() returns "" in container mode, so appx no longer
derives, creates, or requires $APPX_DATA/projects. Co-located host mode
(local dev, where the dir is bind-mounted into agent-server) is unchanged.
- project.Manager: an empty ProjectRoot is preserved rather than run through
filepath.Abs("") (which yields appx's cwd), and ProjectDir reports "" so
the API omits projectDir instead of returning a path on a filesystem appx
cannot see.
- system-setup.sh: drop the permanently-empty $DATA_DIR/projects and the
shared `projects` group. Both existed so a *host* agent user could share
project dirs; that user is gone. teardown.sh still removes the group so
upgrades clean it up.
- verify-installation.sh: assert the host projects dir and group are absent
rather than asserting their permissions, and drop the setgid section.
The broken project terminal and --purge-data leaving projects behind are the
other two halves of #7 and are not addressed here.
Refs #7
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 3 of #7. Fixes the misleading bootstrap prompt that is the root cause of the other two halves, and removes the host artifacts that only existed for the old host-mode deploy.
The problem
Bootstrap tells the operator the data directory "stores the DB, TLS certs, and project files". The first two are true. Project files live in the
builder-workspaceDocker volume, under Docker's data-root — so an operator who mounts a volume atAPPX_DATAfor project growth gets none of it:main.goderivedprojectRootfrom the data dir regardless of mode, soManager.ProjectDir()returned a host path that cannot exist in container mode (WORKSPACE_DIRis/workspaceinside the container).Changes
deploy/bootstrap.shAPPX_DATAcomment now say DB + certs only, and name the volumes that actually growcmd/appx/main.gohostProjectRoot()returns""in container mode — appx no longer derives, creates, or requires$APPX_DATA/projectsinternal/project/manager.goProjectRootis preserved instead of resolved (filepath.Abs("")yields appx's cwd);ProjectDirreturns""so the API omitsprojectDirdeploy/system-setup.sh$DATA_DIR/projectsand the sharedprojectsgroupdeploy/verify-installation.shdeploy/appx.serviceUMaskjustification (value left alone so an upgrade does not change existing file perms)CLAUDE.md,self-hosting.md,storage-and-isolation.mdget sizing guidance that points at Docker's data-rootCo-located host mode (local dev, where
$APPX_DATA/projectsis bind-mounted into agent-server) is deliberately unchanged.Why the
projectsgroup goes tooIt existed so a host agent user and
appxcould share project directories through a setgid dir. That user is gone — the agent runs as an unprivileged uid inside the container — so the group guarded a directory that no longer exists.teardown.shstill removes it, so upgrades from a host-mode install clean up.Testing
New tests:
TestHostProjectRoot_ContainerModeHasNoHostPath/..._CoLocatedDerivesFromDataDir— pins the mode split.TestManagerProjectDir_EmptyRootReportsNoPath— guards thefilepath.Abs("")trap.TestGetProject_OmitsProjectDirInContainerMode— asserts the API omits the field rather than reporting a bogus path.Manual verification — container mode no longer creates a host projects dir:
Co-located host mode still reports and uses a real path:
task build,task test,task lintall pass;bash -nclean on the four changed deploy scripts.Not in this PR
The other two halves of #7 — the broken project Terminal tab and
--purge-dataleaving project volumes behind — follow as separate PRs. The terminal fix builds on thehostProjectRootplumbing here.🤖 Generated with Claude Code