← Inside orch contents

Chapter 33 worked answers

These answers use baseline cbfc94ade5b57e449d6b73bf1485b1c5b1647022 and the chapter's linked execution records. Procedures remain scoped to disposable resources.

1. Existing composition determines capability

The local secret envelope is runtime-integrated: cmd/orch-server/main.go142–147 constructs it and supplies WithSecretEnvelope to MemoryService. The autoscaler MetricsProvider is an implemented interface, but main does not construct its controller. A seam's declaration alone cannot establish an active loop. Notification dispatch is another integrated boundary because main installs the dispatcher.

2. Reject an incomplete handshake

Copy adapter_contract_test.go to .book-labs/ch33 in the disposable module and run go test ./.book-labs/ch33 -count=1 -v. The recorded command passed replay, cancellation, cleanup, wrong-key rejection and four handshake cases. Removing task-idempotency from the compatible fixture must make validation fail before any runtime call; the separate handshake validator performs no effects. The exercise is a proposed contract, not an upstream RPC protocol or supervisor. The runtime fixture uses FakeRuntime and therefore creates no engine containers.

3. Unknown completion needs inspection

Use a stable logical task-create key across retries, with a specification fingerprint or conflict rule. The first request might have created the remote container before its response was lost. After process restart, query the underlying engine's managed association for that task before creating again. A new transport request ID is acceptable; a new logical operation key would defeat deduplication. The current fake replay test covers one fake instance and cannot prove this durable cross-process behavior.

4. Isolation does not remove storage authority

The unsafe assumption is that an external process ceases to be trusted merely because it is separate. Storage access can expose or destroy workload data. Acceptance must verify filesystem/volume scope, authenticated instance identity and socket ownership, and bounded calls/cancellation with recoverable uncertain completion. Add artifact provenance and redacted errors to the deployment review. A sandbox allowing unrestricted host paths cannot claim storage isolation; a crash-containment boundary is narrower than an authorization boundary.

See the corresponding chapter claim ledger for exact immutable source anchors and limitations.

Return to Chapter 33.