[codex] add zeroclaw preflight loop for RTC hardware #19

Merged
electron-rare merged 1 commits from codex/rtc-zeroclaw-orchestration-issue-18 into main 2026-02-21 00:24:35 +00:00
electron-rare commented 2026-02-21 00:22:01 +00:00 (Migrated from github.com)

Context

RTC issue #18 asks for a stable ZeroClaw-assisted hardware loop with clear preflight checks before any upload/flash action.

Current risk was operational: hardware commands could run without explicit USB verification, and local ZeroClaw runtime artifacts were polluting git status.

Root Cause

The repository had no dedicated ZeroClaw preflight script and no focused operator guide for RTC-side orchestration.

Changes

  • Added scripts/zeroclaw_hw_preflight.py
    • runs zeroclaw hardware discover
    • auto-detects common serial ports (SLAB, usbserial, usbmodem)
    • introspects each port and fails when requested (--require-port)
  • Added docs/zeroclaw_orchestration.md
    • documents RTC flow: preflight -> targeted agent session -> patch/test/PR loop
    • includes provider fallback guidance (openai-codex / openrouter)
  • Updated README.md with a dedicated ZeroClaw orchestration section.
  • Updated .gitignore to ignore local ZeroClaw runtime files:
    • /.zeroclaw/, /config.toml, /workspace/

Validation

  • python3 -m py_compile scripts/zeroclaw_hw_preflight.py
  • python3 scripts/zeroclaw_hw_preflight.py --help
  • python3 scripts/zeroclaw_hw_preflight.py --zeroclaw-bin /Users/cils/Documents/Lelectron_rare/Kill_LIFE/zeroclaw/target/release/zeroclaw
    • verified USB discovery and introspection on connected adapters

User impact

Operators now have a deterministic preflight gate before hardware actions, reducing wrong-port and no-device mistakes during RTC runs.

Closes #18.

## Context RTC issue #18 asks for a stable ZeroClaw-assisted hardware loop with clear preflight checks before any upload/flash action. Current risk was operational: hardware commands could run without explicit USB verification, and local ZeroClaw runtime artifacts were polluting git status. ## Root Cause The repository had no dedicated ZeroClaw preflight script and no focused operator guide for RTC-side orchestration. ## Changes - Added `scripts/zeroclaw_hw_preflight.py` - runs `zeroclaw hardware discover` - auto-detects common serial ports (`SLAB`, `usbserial`, `usbmodem`) - introspects each port and fails when requested (`--require-port`) - Added `docs/zeroclaw_orchestration.md` - documents RTC flow: preflight -> targeted agent session -> patch/test/PR loop - includes provider fallback guidance (`openai-codex` / `openrouter`) - Updated `README.md` with a dedicated ZeroClaw orchestration section. - Updated `.gitignore` to ignore local ZeroClaw runtime files: - `/.zeroclaw/`, `/config.toml`, `/workspace/` ## Validation - `python3 -m py_compile scripts/zeroclaw_hw_preflight.py` - `python3 scripts/zeroclaw_hw_preflight.py --help` - `python3 scripts/zeroclaw_hw_preflight.py --zeroclaw-bin /Users/cils/Documents/Lelectron_rare/Kill_LIFE/zeroclaw/target/release/zeroclaw` - verified USB discovery and introspection on connected adapters ## User impact Operators now have a deterministic preflight gate before hardware actions, reducing wrong-port and no-device mistakes during RTC runs. Closes #18.
electron-rare commented 2026-02-21 00:22:17 +00:00 (Migrated from github.com)

Codex review summary:

  • Preflight script validated locally (python3 -m py_compile, --help, real USB discover/introspect).
  • Scope intentionally limited to issue #18 (orchestration + hardware guardrails).
  • No firmware runtime behavior changes in this PR.
Codex review summary: - Preflight script validated locally (`python3 -m py_compile`, `--help`, real USB discover/introspect). - Scope intentionally limited to issue #18 (orchestration + hardware guardrails). - No firmware runtime behavior changes in this PR.
chatgpt-codex-connector[bot] (Migrated from github.com) reviewed 2026-02-21 00:25:49 +00:00
chatgpt-codex-connector[bot] (Migrated from github.com) left a comment

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3016ffb504

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `3016ffb504` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](http://chatgpt.com/codex/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details>
@@ -0,0 +39,4 @@
def run_command(cmd: list[str]) -> int:
print(f"$ {' '.join(cmd)}")
proc = subprocess.run(cmd, check=False)
chatgpt-codex-connector[bot] (Migrated from github.com) commented 2026-02-21 00:25:50 +00:00

P2 Badge Handle non-executable zeroclaw path gracefully

If --zeroclaw-bin points to an existing file that is not executable (for example /etc/hosts or a stale build artifact), subprocess.run raises PermissionError here and the script exits with a traceback instead of returning a controlled preflight failure code. This breaks the intended "deterministic gate" behavior for automation because callers cannot rely on the documented exit-code flow when the binary path is invalid-but-existing.

Useful? React with 👍 / 👎.

**<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Handle non-executable zeroclaw path gracefully** If `--zeroclaw-bin` points to an existing file that is not executable (for example `/etc/hosts` or a stale build artifact), `subprocess.run` raises `PermissionError` here and the script exits with a traceback instead of returning a controlled preflight failure code. This breaks the intended "deterministic gate" behavior for automation because callers cannot rely on the documented exit-code flow when the binary path is invalid-but-existing. Useful? React with 👍 / 👎.
Sign in to join this conversation.