craigm26 / craigm26/OpenCastor
Capability surface auto-refresh: the QR becomes an introduction, not a subscription
- Dominant language
- Python
- Stars
- 28
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
## Why (bench evidence, 2026-08-14)
The phone's picture of a robot is frozen at scan time. Two real failures in one day:
1. The fleet showed TWO robots named bob-spec-b-pick-place — the rover paired surface-less and wore the bundled Bob manifest (fixed in app build 50 with an honest minimal fallback + re-scan card, but the STALENESS class remains).
2. The rover gained `sensor.battery` (first gap-rail skill) and no already-paired phone will ever see it without a re-scan.
## What
- Console endpoint serving the CURRENT capability surface (same projection castor pair puts in the QR — `capability_surface_from_manifest`)
- App refreshes the stored surface on connect (and on a pull-to-refresh), updating KnownRobotStore in place — keyed on RRN, credentials untouched
- Surface changes surfaced in UI: "This robot learned sensor.battery" style note is a bonus, silent refresh is the baseline
## Acceptance
- Declare a capability with `castor capability add` → restart gateway → app shows it on next connect with NO re-scan
- A surface-less pairing self-heals into the real identity on first successful connect
## Pointers
- castor/pairing.py `capability_surface_from_manifest` (the projection, with QR byte-budget trimming that a console endpoint does NOT need)
- iOS: KnownRobotStore.remember() updates in place; AppModel.registerPairedRobot builds the manifest from the surface
- NOTE: opencastor-ios repo is LOCAL-ONLY (fixtures embed live bearers — scrub before it ever gets a remote)
Contributor guide
Research direction
Start with castor/pairing.py and capability_surface_from_manifest to understand the QR projection, then trace the console endpoint and the iOS KnownRobotStore.remember() and AppModel.registerPairedRobot paths. Verify that a newly added capability appears on the next connection without a re-scan and that a surface-less pairing resolves to the real identity; scrub live bearers from local iOS fixtures before any remote publication.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, python
- Domain
- api, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100