# Harbor House automation runbook

Use this after the manual workflow passes its checks. The exercise keeps all outputs local and all messages unsent. A schedule is not evidence that a successful run occurred.

## Run contract

**Input:** selected fixture files, an explicit as-of date and the approved data rules.

**Work:** select current records, validate, classify active requests, assign priorities, write an audit, then produce the chosen track's reviewed outputs.

**Success:** expected IDs and counts match; outputs open correctly; the brief does not invent facts; the run log names the files and checks.

**Failure:** missing source, invalid schema, a failed validation or an unavailable required tool. Record the cause, preserve the previous good output and request the smallest missing input. Do not publish a partially generated result as successful.

**Stop:** the requested run completes, a required check fails, or the operator stops it. End any supervised test schedule after its intended test.

## Before each run

1. Confirm which source files and clock apply. Week 2 requires both CSVs.
2. Confirm the project and output location. Avoid relying on a file from another chat's temporary folder.
3. Check that required tools are available and read the exact run command or app action from the project's tested README.
4. Preserve the prior successful output and create a separate candidate location for the new run.
5. Record the input identity. A hash is useful when implemented; filenames alone cannot prove that content stayed unchanged.

## Execute and verify

Run the workflow. Inspect the resulting files directly. Check canonical and active counts, quarantine IDs, priorities, known budgets and unknown counts. For Track B, validate the untouched baseline before demonstrating local edits.

Mark the run successful only when those checks pass. Promote or identify the successful output explicitly. Record its input files, as-of date, output paths, checks, result and next action in `templates/run-log.csv` or the project's equivalent log.

## The three-run rehearsal

| Run | Action | Expected behavior |
| --- | --- | --- |
| A | Run Week 1 normally | Valid outputs match the oracle |
| B | Run the identical input again | No duplicate queue rows or appended duplicate drafts; run metadata may differ |
| C | Supply malformed-intake.csv | Clear schema failure; Run A/B's good output remains available |

Then run Week 2 with both input files and the second clock. Verify the changed records, not just the new total. A repeatable process must handle updates as well as first creation.

## One supervised scheduled test

In Session 9, agree one exact run time and timezone with the learner. Choose a time within the supervised practice block. Show the saved task's prompt, input location, output location, execution mode and stop plan before enabling it.

When the run begins, inspect its actual task record. After it finishes, open the output and check the run log. Confirm the schedule is stopped or removed after the single test. Record the final state; do not leave a practice task running indefinitely.

If scheduling is unavailable or the machine cannot remain online, save the specification with status **UNEXECUTED** and complete the manual rehearsal. Never report that a schedule ran because its configuration was accepted.

## Local, cloud and event caveats

Local desktop tasks need the computer on, the app running and the project available. A worktree isolates files; it does not move execution off the computer. Codex Cloud uses a prepared hosted environment. Remote access controls a connected computer. These are different operating arrangements.

Current event-triggered ChatGPT tasks are a separate web/mobile capability; do not assume the desktop scheduler can subscribe to every Gmail or Slack event. Choose capabilities actually available in the learner's account.

## Recovery

- **Missing file:** restore or select the intended source, then rerun; do not substitute a similarly named file without checking.
- **Wrong count:** inspect source-version selection and quarantine before changing presentation code.
- **Interrupted run:** inspect existing output and log state before retrying; avoid duplicating work.
- **Bad new input:** preserve the previous successful output and make the error visible.
- **Changed business rule:** record the decision, update the governing source and tests, then rebuild outputs. Do not change the oracle merely to hide a defect.

The operator should be able to explain what ran, what it used, what it produced and whether it succeeded without reading a long chat transcript.
