fix(ai): harden chip mismatch fallback for unstable USB #12
Reference in New Issue
Block a user
Delete Branch "fix/guard-env-fallback-on-usb-instability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Le fallback automatique sur détection de mismatch de chip (ESP32/ESP32-S3) dans
zeroclaw_hw_firmware_loop.shpeut masquer des dégradations répétées de connexion USB.Quand le port USB est instable, on peut voir une erreur de mismatch ponctuelle puis passer en env alternatif, ce qui cache le vrai problème.
What changed
hwid|description|serial_number) échantillonnée plusieurs fois.ZEROCLAW_CHIP_MISMATCH_FALLBACK(défaut:1)ZEROCLAW_USB_STABILITY_SAMPLES(défaut:2)ZEROCLAW_USB_STABILITY_DELAY(défaut:1)Acceptance
bash -n tools/ai/zeroclaw_hw_firmware_loop.shScope
Scriptes d'orchestration only (
tools/ai/zeroclaw_hw_firmware_loop.sh).Codex review (manual): PASS. Scope is strictement , avec garde anti-flapping USB avant fallback env. Shellcheck fix intégré, checks GREEN. Changement utile pour éviter d'occulter des instabilités USB/port par fallback automatique. Je recommande merge squash.
Codex review manuel: PASS. Scope strictement le script zeroclaw_hw_firmware_loop.sh. Ajout d'un contrôle de stabilité port USB avant fallback, ce qui évite de masquer les instabilités série/chute de câble. Checks CI green. Recommandé pour merge (squash).
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
3ab3a6b5b2ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
@@ -106,0 +155,4 @@return 1fi((i++))if (( i < samples )); thenThe stability guard never detects a failed probe because
sig="$(serial_port_signature "$port" 2>/dev/null || true)"always exits successfully, so theif ! ...; then return 1branch is effectively dead. Whenpio device listcannot return the target port (the exact unstable-USB case this patch targets),sigbecomes empty for each sample and the function incorrectly reports the port as stable, allowing auto-fallback to proceed and masking link flapping.Useful? React with 👍 / 👎.