Architect: remove host-mode infrastructure and local-FS file paths #1133
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/agent-hooks#1133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As the operator, I want all host-mode escape hatches and local-filesystem file-operation paths deleted so the codebase has no non-containerized code path and no surface that touches
process.cwd()from the architect stack.Depends on the chat relay being live and confirmed working in production.
Spec:
specs/architect-dockerize.mdAcceptance criteria
Remove HOST_MODE_TYPES / container.enabled: false
HOST_MODE_TYPESset is deleted fromwebhook-config.ts.container.enabled: falsein any agent type config now failsloadWebhookConfigat boot with a clear error message (the escape hatch is gone entirely, not just unused).hostModeConfigDir()helper deleted fromagent-runner.ts; all call sites removed.Remove local-FS file operation paths
architectFilesRoot()deleted.resolveAllowlistedFile()deleted.FILE_ALLOWLIST_DIRSandFILE_ALLOWLIST_EXACTconstants deleted.isLocal/repoParam === selfRepobranch is deleted from:handleArchitectFilesListhandleArchitectFileContenthandleArchitectSpecSavecreateForgeAdapterForRepowith thearchitectToken.node:fs/promisesimports (readdir,readFile,stat,writeFile,mkdir) removed fromhttp/handlers/architect.ts— no filesystem calls remain.Remove getSelfRepo
getSelfRepo()andresetSelfRepoCache()deleted fromdomain/agent/architect.ts.GET /architect/configderivesself_repofromctx.repos[0]or theCLAUDE_HOOKS_SELF_REPOenv var (nogit remote get-urlsubprocess).execSync("git remote get-url origin", ...)call is gone.Docs
docs/architect.md"Host-mode architect" heading updated to reflect containerized model; remove all references tocontainer.enabled: falseandcwd: process.cwd().Tests
handleArchitectFilesListunit test: noexistsSync/readdircall; mock forge adapter is called instead.handleArchitectSpecSaveunit test: callsforge.writeFile, notwriteFilefromnode:fs/promises.handleArchitectFileContentunit test: callsforge.readFile, notreadFilefromnode:fs/promises.resolveAllowlistedFileandarchitectFilesRootare deleted (functions gone).getSelfRepo/resetSelfRepoCachetests deleted.just qapasses.Out of scope
References
specs/architect-dockerize.md— "File operations", "Self-repo detection", "Remove host-mode infrastructure" sectionsapps/server/src/domain/agent/architect.ts—architectFilesRoot,resolveAllowlistedFile,getSelfRepoapps/server/src/http/handlers/architect.ts—handleArchitectFilesList,handleArchitectFileContent,handleArchitectSpecSaveapps/server/src/shared/config/webhook-config.ts—HOST_MODE_TYPESdocs/architect.md🦵 @charles kicked the queue — re-running implement on @code-lead.