Fix preview broker dogfood edge cases#20
Merged
Conversation
added 3 commits
June 19, 2026 07:47
Resolve relative harness cwd flags before forwarding runtime requests so snapshot previews copy the intended workspace. Default TCP heartbeats to the preview container target instead of broker localhost, and demux Docker log frames for preview and service logs. Add focused regression coverage for TCP heartbeat defaults, Docker log decoding, and harness cwd forwarding.
Scope host cwd resolution to lifecycle start commands where --cwd selects a source workspace. Keep preview exec and service exec --cwd values unchanged so callers can use in-container relative or absolute working directories. Replace the source-regex harness test with subprocess tests that capture the actual forwarded harness payload for lifecycle starts and exec calls.
Keep harness exec cwd values container-local, then normalize relative exec cwd values inside the runtime broker against the target container WorkingDir. Use the normalized absolute container path for Docker exec WorkingDir and shell-form cd behavior so preview and service exec calls support relative in-container paths without host-path leakage. Add focused regression coverage for preview and service container exec cwd resolution.
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.
Summary
manor-harness --cwdvalues before forwarding preview/stack/service/desktop lifecycle start requests.--cwdas an in-container path in the harness payload, then resolve relative exec cwd inside the runtime broker against the target containerConfig.WorkingDirso Docker receives an absoluteWorkingDir.Dogfood coverage
python:3.13-slimand HTTP heartbeat.webegress profile denied a fetch to a non-allowlisted domain.PONG.Follow-up review/fix loop
--cwdwas host-resolved too broadly. Fixed in3558e806by scoping host cwd resolution to lifecycle start commands and adding fake-registry subprocess tests for actual harness payloads.WorkingDirfor relative container cwd. Fixed inc6debc6by resolving relative exec cwd against the containerConfig.WorkingDirin the broker and adding focused broker tests.c6debc6a74b924a33928b61b7b222ee98e7f5599.Tests / build
npm ci, focused testsnpx tsx --test test/server/manor-harness-cli.test.ts test/server/runtime-broker-preview-isolation.test.ts(10 pass, 0 fail),npm run build.butler/dist/server/index.jsandbutler/dist/webexist.node --checkon changed.mjsfiles.npm install,npm test(222 pass, 0 fail), andnpm run build.Risk / rollout
.gitstderr because snapshots exclude.git.