lab service --start --ephemeral leaks PATH_VAR/PATH_BUILD/PATH_CODE into the child + acquire chatter pollutes --json stdout #299
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_skills#299
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?
Context
lab service <name> --start --ephemeral --jsonoverridesPATH_ROOTon the spawned child (sohero_var_dir()→ scratch) but leavesPATH_VAR/PATH_BUILD/PATH_CODEinherited from the parent.herolib_core::base::path_var()checksPATH_VARfirst and only falls back to$PATH_ROOT/var, soresolve_socket_dir()resolves to$HOME/hero/var/sockets— the shared path — even though OSIS storage correctly lands under scratch.Result: the child happily binds
$HOME/hero/var/sockets/<svc>/rpc.sockwhile lab waits for<scratch>/var/sockets/<svc>/rpc.sock, hits the 5s deadline, and bails withstderr tail: <empty>(the banner that would reveal the mismatch only ever lands instdout.log, which lab doesn't surface).Reproducible by following the post-#138 / hero_service#12 E2E flow on a contributor box that exports
PATH_VAR=$HOME/hero/var(the canonicallab user initsetup):Each test panics with
ephemeral socket <scratch>/var/sockets/hero_service/rpc.sock did not come up within 5s.A second, smaller bug compounds the first:
acquire_binarywrites itsusing installed …/installed from Forge → …progress lines to stdout, so even when the spawn succeeds the JSON envelopelab --jsonemits is preceded by chatter —serde_json::from_sliceon the test driver side rejects it.Goals
crates/lab/src/service/ephemeral.rs::spawn_innerclearsPATH_VAR/PATH_BUILD/PATH_CODE(alongside the existingHERO_SOCKET_DIR/INTEGRATIONTESTremoval) so the child's path resolvers honour the singlePATH_ROOTpivot.stdout.logandstderr.log(the startup banner that fingerprints env-pivot bugs lives in stdout).acquire_binary's progress chatter (using installed,installed from Forge) routes to stderr so--jsonstdout stays a single line.cargo test --workspace --test greeter_e2e(hero_service @fe8c78ad) goes 5/5 green on a stock contributor environment.