feat: TAM-6867: Canopy enrolment and status reporting channel#116
Open
dannash100 wants to merge 7 commits into
Open
feat: TAM-6867: Canopy enrolment and status reporting channel#116dannash100 wants to merge 7 commits into
dannash100 wants to merge 7 commits into
Conversation
Contributor
Code Coverage OverviewLanguages: TypeScript, Rust TypeScript / code-coverage/vitestThe overall coverage in the branch is 66%. The coverage in the branch is 65%. Show a code coverage summary of the most impacted files.
Rust / code-coverage/rustThe overall coverage in the branch remains at 55%, unchanged from the branch. Show a code coverage summary of the most impacted files.
Updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TAM-6867. The seedling side of the Seedling x Canopy connection channel: enrolment, a periodic status push over
bestool-canopy(the transport library from the card), response logging, and the operator surfaces for it.Spec
New tracey rules, all covered and verified:
i[canopy.enrol],i[canopy.enrol.single],i[canopy.status],i[canopy.deregister](interface.md) — the OI surface, plus analready_enrollederror code.r[canopy.registration],r[canopy.push],r[canopy.push.response],r[canopy.push.fault](runtime.md) — enrolment claims a pre-created Canopy server record; while enrolled, a report goes up every minute; the response is logged and retained; failures escalate log level after five consecutive misses.w[routes.canopy](web.md) — the web page.Implementation
CanopyProvider(crates/core/src/runtime/canopy.rs, modelled onTailscaleProvider): decrypts the operator's enrolment ticket, mints a P-256 device key, claims the server record via thebegin/completeproof-of-possession handshake (over the canopy tailnet when reachable, public mTLS otherwise), and persists the registration withbestool-canopy's machine-bound encrypted store at<data-dir>/canopy/. The push loop reportssource: "seedling", version/host/uptime, and health checks for the proxy, resolver, and apps; Canopy's response is logged and surfaced on/canopy/status./canopy/enroland/canopy/deregister(async arms inserver.rs),/canopy/status(sync dispatch).seedling-ctl canopy enrol|status|deregister./canopypage — status display, enrolment form (masked passphrase, fields cleared after submission), confirmed deregister..cargo/config.tomlpinsCANOPY_OPENAPI_OFFLINE=1so builds use bestool-canopy's committed OpenAPI snapshot instead of fetching it live.Notes
source: "seedling", which is forward-compatible with the new contract.bestool canopy unregistersemantics.Testing
runtime::canopy,oi::handler::canopy) covering ticket validation, wrong-passphrase, single-registration refusal, status shape, deregistration round-trip, and the payload contract.Canopy.test.tsx); full frontend suite 308/308.cargo test --workspace,cargo clippy,cargo fmt, andtracey query status(all four specs at 100% coverage) clean.