TLDR: "Any function that re-detects the tag invites race conditions. Resolve it in the CLI/MCP layer, thread { projectRoot, tag } everywhere else, and keep IO dumb."
"Boundary resolves, context carries, IO obeys."
| const feedbackMachine = Machine({ | |
| id: 'feedback', | |
| initial: 'question', | |
| states: { | |
| question: { | |
| on: { | |
| CLICK_GOOD: 'thanks', | |
| CLICK_BAD: 'form', | |
| CLOSE: 'closed', | |
| ESC: 'closed' |
| #!/bin/bash | |
| SERIAL="00000000" | |
| echo "Looking for device with serial $SERIAL..." | |
| for d in /sys/bus/usb/devices/*-*; do | |
| if [[ -f "$d/serial" ]]; then | |
| serial=$(<"$d/serial") | |
| if [[ "$serial" = "$SERIAL" ]]; then | |
| device="$(basename $d)" |
TLDR: "Any function that re-detects the tag invites race conditions. Resolve it in the CLI/MCP layer, thread { projectRoot, tag } everywhere else, and keep IO dumb."
"Boundary resolves, context carries, IO obeys."