Recovery controller for halted runs
harbor run -t valenlabs/workcell-c7harbor download valenlabs/workcell-c7recover.py, a recovery controller for halted runsWrite recover.py with def main(session, notes) -> None. Once deployed, it runs unattended once on each of 40 halted production cells, each a fresh cell. It drives the cell through the client session. notes is a store with read() -> bytes and write(data: bytes), at most 1,048,576 bytes; it is the only thing that survives a controller restart.
advance(until_ms, wake_on=[job ids]).
until_ms must be a finite time.until_ms, the completion of a named job, an alarm, or the timer reaching zero.timer reports the time, the time remaining, the phase and the budgets left.freeze, or done. Jobs in flight are then cancelled without credit, and value, charges and the report are read at that instant.status, journal, timer, report and done, from a reserve of 200 requests. done is rejected while no report is on file.limits). Overrunning it fails that cell.A local staging cell loads 8 sample halted states, with the restart where those states have one. It can be restarted as often as you like.
Deliver /logs/artifacts/recover.py (kind recovery). Entry points: main.
It will run unattended across production shifts, one fresh workcell per shift (MANUAL section 15).
Performance is measured by net shift value V in µpt (higher is better): earned value from finished plates, incident refunds, and diagnosis credits, minus all operating costs of section 9 and charges of section 11. A compliance failure disqualifies that shift; other shifts are unaffected. Fleet compliance threshold: if at least 2 shifts suffer a compliance failure and they exceed 2% of shifts, the deployment fails.
You have 6 hours (21600000 ms) of wall-clock time. The cell freezes control 10 minutes (600000 ms) before that limit; call session.timer() to see the wall time left.
/workspace/MANUAL.md: the operations manual, with every rule and parameter of this workcell./workspace/task_public.task: the workcell specification file./workspace/harness/: the production harness source for this deliverable.from workcell.client_v2 import connect.This manual, the shift briefing, and the task file task_public.task are the authoritative specification for this workcell and are true. Files under logs/ are records left by earlier operators; they may not hold for this shift.
No run log is shipped with this workcell.