← Harness Engineering From First Principles

A Harness Behind Mission Control: Interfaces and Evidence

Define versioned initiation, observation, approval and outcome interfaces; validate duplicated and stale requests.

A person asks an application to investigate a maintenance issue, prepare a patch and show the evidence. The application sends a request, loses its connection and retries. Meanwhile the harness finishes the investigation, requests approval for an edit and discovers that another writer changed the target. The person sees a green completion badge from an old event. Which system owns the truth now?

Integration makes a harness useful and introduces another place where requests, authority, observations and conclusions can be confused. Mission Control can initiate work and present decisions without becoming a second agent loop. The harness can execute a task without assuming it owns all governance. The interface between them must carry identities and evidence, not just an imperative prompt in and a confident paragraph out.

Evidence status. Draft manuscript. The pinned Praxis responsibility record assigns Mission Control authoritative execution and governance (DOCUMENTED, R06-C11). R06 did not independently inspect server enforcement. The harness initiation and observation contract below is partially executed against the real Mission Control router: demonstration D29-MC-01 drives the actual mission_control.api.harness routes (catalogue, idempotent launch, jobs, executions, artifacts) in-process with Worker HTTP and Work Outcome services stubbed at Mission’s own test seams (examples/pi-harness-lab/src/mission-control.ts + src/mc_bridge.py; test/mission-control.test.ts, 15/15 pass offline). The stubbed Worker returns canned payloads, so launches are contract evidence, never live executions. No harness effect-approval endpoint was found in the router — approval decisions live in adjacent domains, not behind the harness contract — and outcome stays AWAITING_ACCEPTANCE by design, so the approval-binding and outcome-decision flows remain PROPOSED with the live operational study EXPERIMENT PENDING. Project 01 remains REJECTED; later mechanisms and security qualification are pending.

29.1 The application is a client of a contract, not another runtime

The simple baseline is a command-line host running one admitted task and returning a versioned evidence bundle. Adding an application should preserve that task contract, not replace it with an application-specific conversation state. A task started from a panel and the same task started from a CLI need comparable admission, authority and evaluation semantics.

The application may collect user intent, authenticate a requester, select an authorized workspace and display evidence. The host turns an admissible request into workflow states, context and bounded Pi episodes. Pi performs model/tool iteration. The broker enforces effects. Independent evaluators assess artifacts, execution and evidence. These are responsibilities, not a demand for one process or service per row.

Mission Control’s intended governance ownership must be respected through supported interfaces. It does not justify inventing an approval API or assuming a client-side button is server-side enforcement. R06-C11 records disabled approval/execution routes in one Praxis desk and client audit checks; that bounded source observation cannot establish every privileged path is absent or correctly mediated.

The first engineering step is therefore interface discovery with the owners: initiation identity, observation protocol, approval binding, effect execution and result access. Map what actually exists before implementing an adapter. A narrow missing field may require an adapter extension; it is not a reason to rebuild Mission Control, Writer, Worker, ECK or Pi inside the book project.

29.2 Four flows, four different meanings

Flow Producer → consumer Meaning It must not imply
Initiation Authorized application → host Request admission of a task under a bound contract That execution or an effect already occurred
Observation Host/recorder → application Versioned evidence of admitted progress and status That model prose is an independent outcome
Approval Authorized decision-maker → enforcing boundary Permission for an exact operation and preconditions That the operation succeeded or remains fresh forever
Outcome Evaluator/supervisor → application Scoped task/execution judgments with evidence That every component is qualified or the task grants new authority

Keep these flows logically separate even when one transport carries them. A progress event containing a model’s proposed patch is not an approval request computed by the broker. An approval receipt is not an execution receipt. A task PASS label is not a blanket statement that trace integrity, cleanup and effect settlement were accepted.

An application may show a concise combined status, but that projection must have a documented rule and retain access to the dimensions below it. Otherwise a correct partial artifact can become a green completed task merely because the UI has only success and failure states. The interface should make REVIEW, UNKNOWN and INCOMPLETE first-class states rather than exceptions hidden in a diagnostic log.

In this proposed deployment, the authenticated application client submits human intent to the host; Mission Control may host that client and a separate governance authority if supported interfaces permit. Distinguish initiating principal, executing host/worker, effect-authorizing principal and evaluator identity even when one product hosts several roles. A display name is not authentication, and documented ownership is not proof that the current server enforces this mapping.

29.3 Initiation needs identity before work starts

A proposed initiation envelope binds protocol version, authenticated principal, request ID, task contract digest, fixture/workspace identity, policy catalogue, budget envelope and allowed effect class. The host validates that the requester may ask for that scope. Client-supplied names are not proof of identity; authentication and server-side policy establish the principal and its allowed resources.

Assign an idempotency key for the initiation operation. A duplicate request with the same key and same canonical payload resolves to the same admission result. Reusing the key with different work is rejected. Scope keys by principal and operation domain, and declare retention. After retention expires, the client must not assume an old key prevents duplicate work; it needs a supported lookup or renewed human decision.

The host records admission before dispatch. If the response is lost, the application queries by the bound request/operation identity rather than starting another task with a new key automatically. A refusal is a durable outcome of admission, not an invitation to rewrite the prompt until the host accidentally accepts broader scope.

Separate a user-facing task ID from attempt and effect IDs. One task can have several bounded attempts; one attempt can request several effects. The application must not treat retrying an observation request as authorizing another effect attempt. Correlation supports auditing, but only the enforcing operation identity supplies the corresponding deduplication or reconciliation semantics.

29.4 Observation is a resumable evidence projection

The host emits stable event IDs and a cursor or sequence within a declared stream scope. A client can reconnect and ask for observations after its last acknowledged cursor. The design must state whether the transport may duplicate deliveries, how gaps are reported and where a complete authoritative snapshot can be obtained. Do not promise exactly-once delivery merely because the UI suppresses duplicate cards.

Preserve raw runtime observations separately from normalized host events and evaluator judgments. The application usually consumes a bounded projection, not raw provider payloads or arbitrary environment dumps. Each projected event identifies its source record and schema. A model’s message remains labelled model-authored; a supervisor’s cleanup status remains a supervisor observation; an evaluator’s outcome identifies its procedure and evidence.

Out-of-order arrival cannot move a task backward or overwrite a newer terminal state. Deduplicate by stable event identity and reconcile with the authoritative task snapshot. Late worker messages remain anomalies, not a new completed result after terminal refusal. A missing event range is unknown observation completeness, not evidence that nothing happened during the gap.

The UI can display fast provisional progress and slower verified status if it labels them differently. A live token stream is useful for interaction, but its final sentence cannot settle effects or replace the host’s terminal record. The application should keep the last known authoritative state visible when the stream disconnects, with the observation age and unresolved status explicit.

29.5 Approval binds the operation the broker will actually perform

An approval request is constructed from the enforcing boundary’s normalized operation, not from the model’s persuasive description. Show target identity, proposed change, base/precondition digest, scope, expected effects and expiry. The authorized decision-maker approves that operation under a policy revision and maximum use count, following Chapter 12.

If the target changes before execution, the old approval cannot become permission for the changed operation. Refuse the stale precondition, obtain a new proposal and seek a new decision when required. The application must not silently substitute the newest patch into an old approval card. Binding by a display title or conversation ID is too weak to distinguish those operations.

Delegation does not transfer approvals. A child can propose an effect within its admitted task, but the broker still checks principal, delegation chain, operation digest and shared consumable allowance. If one use was approved, two parallel children cannot each spend a copied one-use token. The application observes the broker’s receipt; it does not independently declare both authorized because both cards look similar.

Revocation prevents new operations after its enforcement point. It cannot retract an effect already committed at an external service. On a race between cancellation and execution, record the actual broker state and reconcile. A UI label saying cancelled is not proof that no file changed or no external request was billed.

29.6 Worked example: a stale approval and a lost response

The following sequence is hypothetical. The user requests investigation and preparation of a patch for a synthetic package; publishing remains outside scope. The application submits initiation key K with contract digest T. The host admits task J and returns its identity, but the response is lost. Retrying K with the same T returns J’s admission, not another independent task. A changed contract under K is refused.

The host runs an investigation episode and a reproduction gate, retaining source and test receipts. It proposes patch P against base D0. The broker computes approval request O(P,D0), and the application shows that exact operation. A human approves one use. Before execution, another authorized writer changes the target to D1. The broker’s precondition check refuses the stale operation. No model confidence, prior task PASS or application retry overrides that refusal.

The host records the refusal and asks for a fresh source snapshot. A new patch P2 against D1 becomes a new operation O2. Its approval is a new decision, not a continuation of the old token. Suppose O2 executes but its acknowledgment is lost. The host journals unresolved completion and queries the broker by O2. It does not reapply the patch blindly because the application still shows a spinner.

When independent checks establish the final artifact and lifecycle, the evaluator appends scoped task and execution judgments. If required evidence persistence fails, the application can show that a patch artifact exists while accepted completion remains unavailable. A green badge from the investigation phase cannot stand in for this later decision. The final evidence link includes the two refused/uncertain operations and all incurred costs, not just the successful patch.

Now the user cancels while the broker query is unresolved. The host closes new admissions and reconciles existing work. If the effect had already occurred, cancellation cannot honestly report untouched state. Any compensation is a new authorized operation with its own preconditions. The task record says what is known and unknown rather than choosing the most reassuring application status.

29.7 Integration contracts should fail visibly

The displayed status needs a source and an age

Consider the application projection as a small read model, rebuilt from authoritative events and snapshots. It can cache data for responsiveness, but every important state has a source identity and a last-confirmed revision. When the connection drops, the application knows what it last observed; it does not know that the task stopped changing.

Authoritative-source mapping: the harness initiation/observation rows below are mapped to the executed mission_control.api.harness router (D29-MC-01); approval and outcome-decision rows remain proposed — no harness effect-approval endpoint was found, and outcome stays AWAITING_ACCEPTANCE by router design.

Displayed item Authoritative source Possible stale interpretation
Task admitted Host admission receipt Work may not yet have started
Investigation finished Workflow state receipt Effects and final evaluation may still be pending
Approval granted Authorized bound decision Expiry, revocation or changed target can make it unusable
Cancel requested Host request acknowledgment Worker/effect completion may remain unknown
Task PASS Scoped evaluator judgment Execution can still be rejected or incomplete
Accepted completion Host/evaluator terminal contract Later adverse review can change current reliance on its claims

A concise status can link to these sources without displaying raw logs by default. Show the operation and the property that remain unresolved, not only a generic error. For example, task artifact verified; effect acknowledgment unresolved tells the user what further evidence is needed. It does not require exposing implementation stack traces or asking the user to infer state from streaming model commentary.

After reconnect, reconcile the snapshot revision with the stream cursor before applying queued events. An event already reflected in the snapshot must not increment a completed-task counter twice. A terminal record for another attempt must not overwrite the task’s selected accepted attempt. These are projection rules to qualify, not assumptions supplied by the transport protocol.

An application outage must not create a new authority path

If the application disappears while the worker is running, the host continues or stops under the admitted deadline and policy. It does not gain permission to approve its own pending effects because the human interface is unavailable. A task requiring fresh approval remains blocked at that boundary, with held resources handled under its declared waiting/cancellation budget.

If the user revokes approval in another session, the broker checks the current grant state at dispatch. The first application session cannot revive the approval by replaying an older event. If dispatch already occurred, the revocation receipt must not be displayed as proof that the effect was prevented. Reconciliation determines the actual effect state, and any compensation needs separate authorization.

Observation access also needs scope. A principal permitted to view one task’s public result may not be permitted to inspect raw provider requests, private source or another project’s approval history. The proposed adapter supplies bounded evidence projections and enforces principal/task binding on every read, including resumed streams and download references. An unguessable URL is not a substitute for the declared access boundary.

These cases connect usability to correctness. A user who sees a stale approved badge may reasonably believe the next action is authorized. The broker must still enforce independently, while the application should explain the refusal in terms of the changed operation. Correct backend refusal and clear presentation are complementary deliverables; neither excuses omitting the other from integration qualification.

Unknown schema versions need an explicit compatibility response. A host must not ignore a new field that changes authority or cost semantics while returning success under an old interpretation. Optional observation fields may be safely ignored under a declared compatibility policy; required initiation/approval constraints cannot be treated that way.

Authentication failure, admission refusal, unavailable evidence, stale approval, rate limit and unresolved effect are different recoveries. Give them stable bounded codes. Include correlation and permitted diagnostic references, not stack traces or secrets. A client retry policy must be defined per code and operation; blindly retrying every non-success response can duplicate effects or create an approval flood.

Backpressure also belongs in the contract. Bound pending tasks, event buffers and result projections. If the application stops consuming observations, preserve authoritative records within the declared retention policy and report a gap rather than silently discard evidence while pretending the stream is complete. A proposed owner-supported read-only snapshot query, subject to the §29.8 interface audit, could let the client reconcile state. The audit is performed for the harness router in D29-MC-01: the existing endpoints are GET /api/harness/catalogue, POST /api/harness/executions, GET /api/harness/executions, GET /api/harness/executions/{request_id}, GET /api/harness/executions/{request_id}/artifacts and GET /api/harness/jobs. No harness effect-approval endpoint was found; adjacent approval routes govern other domains, not harness effects.

Neither transport success nor a verified hash establishes semantic truth. The application must verify that the receipt belongs to this principal, task, attempt, artifact and operation, and that the named evaluator had authority to judge the claimed aspect. A perfectly hashed bundle for another workspace is not this task’s result.

29.8 Existing-system reuse and questions for the owners

Keep credential placement explicit in the adapter review. The application may hold permission to request a run without possessing the worker’s provider credentials or the broker’s effect credentials. The worker may read an admitted fixture without reading the application’s approval store. The evaluator may access protected evidence without being able to activate a policy. Combining these roles in one deployment requires an enforcement argument, not merely separate class names.

A compromised observation client must not turn an event acknowledgment into an effect authorization. A forged outcome upload must not become trusted evaluator evidence because its schema is valid. Authenticate writers at the sink and validate operation/run/subject binding. Where the existing application offers a broader capability than this book needs, use the narrow supported projection and retain the broader boundary as an explicit untested dependency.

This review is most useful as a field-by-field mapping with owners. For each proposed field, identify the real producer, consumer and failure response. Mark unavailable fields UNKNOWN instead of filling them with plausible defaults. That mapping is the concrete prerequisite for implementation, and can often reveal that a small adapter is sufficient before any new service is designed.

The proposed producer/consumer map is deliberately narrow. Mission Control or its authorized application initiates tasks and presents governance decisions. The harness owns the admitted run and state transitions. Pi executes each configured episode. Writer/ECK may supply bounded strategy advice through an owner-supported adapter. Worker may provide execution capacity if its identity, isolation and receipts fit the contract. Independent evaluation consumes artifacts and protected observations, not whichever system’s summary is most convenient.

These are intended roles, not verified implementation capabilities. Before connecting any existing component, inspect its real versioned interface, authentication, state ownership, failure behavior and evidence contract. Ask who reconciles ambiguous operations, who persists approvals, how policy changes are authorized and whether event replay preserves raw identities. Record unsupported seams explicitly rather than fill them with a model-written adapter that invents success fields.

R06’s pinned ownership record says not to duplicate Writer’s learning engine or import its whole verification stack into cross-domain Praxis work. That principle guides scope, while current compatibility still needs source-backed review and tests. A stable read-only advice interface may be enough. Database migrations or hidden process dependencies should not become incidental side effects of opening an application panel.

The authority boundary must survive an untrusted worker. If the same worker can edit its evaluator, receipt sink or effect credentials, moving the control button to Mission Control adds no isolation. Chapter 11’s enforcement map and Chapter 12’s qualification remain prerequisites. UI integration cannot promote a pending security gate into an accepted one.

29.9 E29: initiation, observation, approval and outcome conformance

The research question is whether the application adapter preserves the host contract under duplicate, stale, missing and adversarial messages. The primary hypothesis is exact agreement with a pre-authored finite conformance catalogue: no duplicate admitted task for one valid key, no stale or unauthorized effect, no false accepted completion and successful handling of legitimate positive controls. The alternative is semantic loss at a transport or UI boundary.

Arms are the direct host contract baseline, the proposed application adapter and a diagnostic weakened adapter that omits identity/precondition bindings. Independent variables are fault class and adapter condition. Dependent variables are admissions, actual broker effects, receipt and cursor reconciliation, visible state projection and independent verdicts. Use scripted workers, synthetic fixtures and a separately observed fake effect service; no live model calls or real external effects are required for this first phase.

Faults include duplicate initiation, same key/different payload, lost admission response, out-of-order events, cursor gaps, cross-workspace receipts, expired approval, changed base, cancellation after effect, unknown billing, callback failure and unsupported required schema fields. The fixture pins all manifests and expected identities. Register finite case counts, time/message budgets and per-class expected refusals and false alarms before implementation qualification.

One forbidden effect or falsely accepted terminal state fails its stated deterministic predicate. A refuse-everything adapter fails the positive controls. Passing qualifies only those cases and configuration, not arbitrary Mission Control deployment. The deterministic half is executed (D29-MC-01): duplicate/stale/cross-scope/unknown/unavailable/remote-URL faults plus positive controls against the real router, with the Worker stubbed. A later usability/operations study would separately register tasks, reviewers, independent analysis units, human effort, uncertainty and matched-resource controls. It cannot be inferred from transport conformance. That study, and the approval-binding conformance, remain EXPERIMENT PENDING.

29.10 The integration deliverable is evidence-preserving continuity

Version migration is another contract boundary. A newer application may understand additional observation fields while an older host still executes the previous task schema. Negotiate supported versions or refuse required unsupported semantics before admission. Never drop a new restriction, execute an older interpretation and return a receipt that appears to certify the newer request.

For a compatible upgrade, preserve old record readers and projection versions so existing evidence links remain interpretable. A display change may improve wording, but it cannot rewrite raw events or turn an earlier UNKNOWN into a historical success. A newly computed judgment is a new evaluator record with its own procedure and availability.

The conformance fixture should include an older client reconnecting after an upgrade, an unsupported required approval field and a cursor from another stream scope. Each has a predeclared response. Test both legitimate backward compatibility and correct refusal; rejecting every older message would be safe only by abandoning a promised compatibility contract, which must be an explicit version decision.

The engineering design is one task contract exposed through four distinct flows. The implementation specification is a small versioned adapter with idempotent initiation, resumable observation, exact approval binding and scoped result access; initiation, observation and scoped access are executed against the real harness router (D29-MC-01), while harness effect-approval binding has no router endpoint and stays proposed. The experimental qualification is the conformance/fault record and later measured operational comparison. None requires duplicating the agent loop inside the application.

Unresolved work includes owner-supported deployment of the adapter, server authority enforcement, Worker isolation/receipt compatibility, harness effect-approval binding and Writer adapter support. This chapter supplies no fictional endpoint names: the named harness routes above are the executed ones. Before connecting any remaining seam, inspect, pin and independently qualify it against the proposed contract. A diagram of compatible boxes would establish less.

All the earlier strands now meet: durable execution, context/evidence, teams, costs and governed adaptation. Their integration may create new failure modes as well as useful composition. The final chapter decides what the completed draft can honestly conclude, which negative results would be valuable, and what research and engineering evidence is still required before this proposed system earns acceptance.

Previous: Chapter 28: The Economics of Reliability.

Next: Chapter 30: Lessons, Negative Results, and an Open Research Agenda.