feat(diag): diag@vt agent extension + vt doctor CLI#5
Merged
Merged
Conversation
diag@vt is a read-only, VT_AUTH-gated agent extension (no Touch ID, never
cached, not audit-pushed, and it does not reset the idle clock so polling
cannot keep grants alive). It reports cache modes/TTLs, the caller's own
context classification with a basis tag, and live grants scoped to that
context only. Relayed over --forward-real-agent so a remote vt doctor can
diagnose its own connection.
vt doctor (cross-platform) prints config values with env-vs-config.toml
source attribution, the VT_BACKEND routing decision, the agent's diag@vt
report with human explanations per cache, and worker reachability.
resolve_cache_context is refactored into classify_cache_context returning
{context, basis}; behavior unchanged (thin wrapper preserved, precedence
order kept, no ?-early-returns so each fallible lookup names its basis).
Design + review record: docs/diag-design.md
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.
What
diag@vt— new read-only agent extension: reports cache modes/TTLs, how the agent classifies THIS connection (context basis), live grants scoped to the caller's own context, run@vt/audit-push status. No Touch ID, never cached, not audit-pushed, and it does not reset the idle clock (a polling loop can't keep grants alive). Relayed over--forward-real-agentso a remotevt doctorcan ask why its cache doesn't hit.vt doctor— config values with env-vs-config.toml source attribution + permission lint, VT_BACKEND routing decision, agent probe + diag@vt report with per-cache human explanations, worker reachability.resolve_cache_context→classify_cache_contextreturning{context, basis}(behavior unchanged; wrapper kept; no?early-returns so each fallible lookup names its basis).Why
Cache behavior (TTY gate, ssh narrowing, pwd keys, modes defaulting to none) is individually justified but compositionally opaque — the observable symptom is just "Touch ID prompted again". Design + codex-expert review record:
docs/diag-design.md.Verification
cargo test(167),just checkgreen;vt doctorexercised end-to-end on a configured host (config attribution, routing, no-agent probe, worker 404-reachable all correct).handle_diag, classify refactor, new unit tests) needs this CI run — it doesn't compile on Linux hosts.🤖 Generated with Claude Code