0173: Offline application workers and owned environments
Status: Accepted — M18.14 / AT-02c
Context
Applications need separate native/interpreter observations under one deadline. Compiler diagnostics, interpreter tool failures and app exits share numeric statuses today. Interpreter operations also read or inherit ambient environment and lazily compile FFI/platform bridges. Fixture settings must not choose those compilers, loaders or control paths. Moving preparation into fixture scratch would change import/package context and source filenames.
Decision
Use dedicated killable private workers for original-source offline preparation. Load project-relative entries from project cwd, retain their checked/lowered context and compile with captured trusted invocation settings. Prepare required FFI/platform helpers before application execution. Run each backend in its own workspace from the validated fixture snapshot. No fetch, generation or dev mode.
Keep one retained ownership broker alive through the suite and recovery. Bound prerequisite/bootstrap preparation independently before broker activation; reject nested coordinator startup under an inherited scope. Every case then shares one absolute deadline across preparation, execution and pipe completion.
An owned interpreter environment supplies application lookups and all execution child processes, while ordinary CLI calls keep inherited behavior. Rust never mutates the coordinator's global cwd/environment or replaces inherited descriptors. Dedicated workers may change their own cwd and safely redirect preparation-only stdio before interpreter threads start. Required helper compilation retains trusted settings; helper execution receives the application environment.
The private worker contract uses bounded frames
and runner-owned control files outside fixture paths. Preserve
typed exits, traps, depth/output failures and tool errors before
the legacy CLI's numeric conversion. Reuse its
buffering/flush/trap formatting. Never infer interpreter status
from stderr. Optional opaque bounded trap bytes reserve a future
TR seam without implementing stack capture or value printing.
Consequences
Public dispatch/reporting stays in AT-03. Current producers/consumers update together; no persisted compatibility format or runtime values cross the seam. Cancellation discards partial observations and waits for checked group cleanup. Uncertain ownership stops the suite. Tests must prove both real backends, offline context, phase/deadline boundaries, clean environment routes and failure classification, retaining legacy output and security regressions.