host: stage what the server hands over before the agent starts #10
Loading…
Reference in a new issue
No description provided.
Delete branch "stage-host"
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?
spec-bb1.34, the host's side of Stage. Stacked on #7 and the proto PR (this branch carries both commits until they merge). The host calls Stage once before it starts claude: files extracted under
ROOMCITY_WORKDIR(a name or link that leaves it ends the host, as does a failingpre_start), manifest arguments added to claudeacp'sClaudeArgs,session_setup, the script andsession_liverun once the session is up and only logged when they fail. Tests: files, links, commands and--settingsargument arrive; four kinds of escaping archive are refused with nothing written; a failingpre_startstops before claude is spawned.-racepasses.15ef7c320ad5da3e59b6d5da3e59b65f19e646cb5f19e646cb7e4e173632Review for spec-bb1.34, of
7e4e173(#9 is merged, so this shows alone after a rebase). The order is right: resume, stage,pre_start, claude, then the setup commands and attach; a stream that broke halfway writes nothing; a server without Stage stages nothing. One change.The check that keeps the archive inside the working directory is made on names, and links defeat it.
withinjoins and cleans the path as text. An archive can build a way out from links that each look inside:Go has the tool for this since 1.24, and the module is on 1.27:
os.OpenRoot(dir)and itsMkdirAll,OpenFile,Symlink,Removerefuse any step that leaves the root, links included, at the moment of the step. Extract through anos.Rootand add this archive to the escaping ones in the test. The archive comes from the server, which is trusted more than the pod, so this is the second line; but the test's claim that an escaping archive is refused should be true of the kind above too.7e4e1736320d9462a15c