Skip to content

cyberpunkunicorn-os: boot hello, setup and scans over the cable, CI releases - #10

Merged
hellofrequencylab merged 5 commits into
mainfrom
claude/cu-phase3
Oct 20, 2026
Merged

hellofrequencylab merged 5 commits into
mainfrom
claude/cu-phase3

Conversation

@hellofrequencylab

@hellofrequencylab hellofrequencylab commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Firmware half of the phased plan's Phases 0, 3, 5 and 6. The website side goes to frequency-web separately.

What changes

Phase Firmware
0, board answers @evt hello {proto, os, fw, commit, board} at the end of boot; system.caps lists every registered command; system.time {epoch} sets the clock from the computer; build.sh stamps the git commit (FW_COMMIT), which system.status and the hello report
3, setup over the cable frequency.config / frequency.provision {device_id, secret, base?} / frequency.unprovision (new apps/frequency/provision.cpp). The secret is never sent back. Patch 0014 now echoes COMMAND: rpc instead of the whole line, so passwords and secrets stay out of the serial log
5, scans through the cable With no Wi-Fi, a computer that sent rpc over USB in the last 30 s, and its clock set, the board signs a card tap (HMAC-SHA256 keyed by sha256(secret), the hash frequency-web already stores) and sends it as @evt frequency.scan_relay. The computer posts the exact body with X-Frequency-Device-Id + X-Frequency-Signature, then answers with frequency.relay_reply. The secret never leaves the board. rpc frequency.scan returns the signed scan in its reply instead
6, updates from the website build.sh writes build/manifest.json (version, commit, app.bin size and sha256, offset 0x10000). New path-filtered workflow .github/workflows/cyberpunkunicorn-os.yml builds on Linux and fails if app.bin outgrows the 0x3C0000 app partition. A cu5k-v<OS_VERSION> tag publishes a release with app.bin, full.bin and the manifest. build.sh's in-place sed now works on GNU sed too

Fixes found along the way: rpc frequency.scan said "queued" when offline but never queued the scan, and sensors.read ended its session twice.

The contract is in apps/remote/PROTOCOL.md, with new sections "Frequency tags", "Setup over the cable", "Scans through the cable", system.caps, system.time and the hello event. BACKEND.md and CLAUDE.md are updated to match.

Verified

  • Every changed C++ file passes a syntax check against patched Bruce 1.16.1 with no errors. That is a compile check only; nothing has been linked or run yet. The full patch chain 0001→0015 applies with the regenerated 0014.
  • Unlinked objects of the changed files grow by about 15.7 KB. The linked growth should be smaller, since ArduinoJson code is shared, but it hasn't been measured. After cyberpunkunicorn-os: Library for apps whose hardware isn't found yet #9 there is about 330 KB free.
  • The new CI workflow is the first full Linux build of this branch. Its result shows on this PR.
  • Not tested on hardware yet. That needs a board run: the hello after a reset, system.caps, frequency.provision, then a cable scan once the website accepts the signature headers.

Order

Merge after #9. Both touch apps/remote/app_handlers.cpp: this PR changes the frequency.scan handler, not the LED lines that #9 removes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AycPrTRVXqSDZhb2NNfyG6

…the cable

Firmware half of plan phases 0, 3 and 5:
- @evt hello at the end of boot; system.caps lists every command;
  system.time sets the clock from the computer; system.status and the
  hello carry the git commit build.sh stamps (FW_COMMIT).
- frequency.config / provision / unprovision set the board up as a
  Space's scanner over USB. The secret never comes back, and patch 0014
  no longer echoes rpc arguments to the serial log.
- With no Wi-Fi and a computer on the cable, a scan is signed on the
  board (HMAC-SHA256 keyed by sha256(secret), the hash the server stores)
  and forwarded by the computer (frequency.scan_relay /
  frequency.relay_reply), so the secret never leaves the board.
- rpc frequency.scan now really queues when offline; sensors.read no
  longer ends its session twice.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AycPrTRVXqSDZhb2NNfyG6
Plan Phase 6, firmware side: build.sh writes build/manifest.json (version,
commit, app.bin size and sha256, offset 0x10000) for the website's
updater. A path-filtered workflow builds every change on Linux, gates
app.bin on the app partition size, and a cu5k-v<version> tag publishes a
release with app.bin, full.bin and the manifest. build.sh's in-place sed
now works on GNU sed as well as macOS.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AycPrTRVXqSDZhb2NNfyG6
@hellofrequencylab hellofrequencylab changed the title cyberpunkunicorn-os: boot hello, setup over the cable, scans through the cable cyberpunkunicorn-os: boot hello, setup and scans over the cable, CI releases Oct 20, 2026
…formio

The lock's mkdir failed without its parent, so a fresh runner waited
forever. CI hit its 60-minute timeout on that.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AycPrTRVXqSDZhb2NNfyG6
@hellofrequencylab
hellofrequencylab marked this pull request as ready for review October 20, 2026 22:12
@hellofrequencylab
hellofrequencylab merged commit c39f4ef into main Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants