feat: add Device::tka_log for the tailnet-lock AUM history#269
Conversation
Mirror Go LocalClient.NetworkLockLog: a pure local read of the locally-synced + verified TKA chain, returning the AUM update-chain history head-first up to a limit. No crypto, no RPC, no mutation. - ts_tka: AumKind::as_str returns the byte-exact Go AUMKind.String values (add-key/remove-key/update-key/checkpoint/no-op/invalid). - ts_runtime: new public TkaLogEntry type mirroring ipnstate NetworkLockUpdate plus a pure tka_log_entries mapping helper, a synchronous control_runner tka_log read message, and a Runtime delegator. - facade: Device::tka_log delegating to the runtime, with TkaLogEntry re-exported. Signed-off-by: GeiserX <9169332+GeiserX@users.noreply.github.com>
|
Warning Review limit reached
More reviews will be available in 32 minutes and 26 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
Engine ask #25 (slice PR-A):
Device::tka_log(limit) -> Vec<TkaLogEntry>, mirroring GoNetworkLockLog— the tailnet-lock AUM update-chain history, head-first, read locally from the already-synced + verifiedMemAumStore. The daemon consumes it astnet lock log(tsd-lq8).Lowest-risk TKA slice: a pure local read — no crypto, no control RPC, no mutation. The two write-ops slices (PR-B
tka_local_disable, PR-Ctka_add/tka_remove) are designed and tracked separately.How
AumKind::as_str()(ts_tka) — byte-exact GoAUMKind.String()strings (add-key/remove-key/checkpoint/update-key/no-op/invalid, cross-checked against Go v1.100.0tka/aum.go).TkaLogEntry { aum_hash, change, signer_key_ids, raw }— mirrors Goipnstate.NetworkLockUpdate(raw= Go's.Rawserialized AUM so the daemon can decode signers faithfully;signer_key_idsis an honest convenience extracted from the decoded AUM).tka_log_entries(store, oldest, limit)mapping helper:linear_chain_fromyields genesis→head,.rev()to match Go's head→genesis walk, then.take(limit). No lock synced → emptyVec.Runtime::tka_log+Device::tka_logdelegators (local read → coarseError, liketka_status).Tests (offline — no control)
AumKind::as_strstring vector;tka_log_entrieshead-first ordering + field correctness,limittruncation (keeps newest), signer-key-id extraction, and unwalkable/no-synced → empty. 4 new + the as_str test, all green.Gates (local, all green)
cargo test -p geiserx_ts_tka -p geiserx_ts_runtime -p geiserx_tailscale· clippy-D warnings(3 crates +tunlane) ·cargo fmt --check·cargo doc(broken_intra_doc_links=deny) ·cargo run -p checks.Signed-off-by: Sergio sergio@geiser.cloud
Created using Claude Code (Opus 4.8)