Display recorded trust state to the user - #6137
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6137 +/- ##
==========================================
- Coverage 72.84% 72.81% -0.03%
==========================================
Files 743 743
Lines 77649 77674 +25
==========================================
- Hits 56563 56558 -5
- Misses 17119 17146 +27
- Partials 3967 3970 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
baa3b8a to
7359ebd
Compare
7359ebd to
a1ed13c
Compare
a1ed13c to
e5e22bf
Compare
e5e22bf to
683b7df
Compare
d14b72f to
6a65d43
Compare
6a65d43 to
15cea4b
Compare
15cea4b to
c6569e6
Compare
RFC THV-0080 wants the identity pinned at trust-on-first-use displayed prominently, not discovered weeks later inside a signer-mismatch error. ProvenanceInfo becomes part of API responses: install results carry the provenance or unsigned exception that was just recorded (the CLI prints it — a deliberate exception to silent success, since a recorded trust anchor is security-relevant information, not progress chatter), and skill info surfaces the lock file's recorded trust state for project-scoped skills, provisional markers included. Part of #5899. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The CLI is a pure HTTP client, so a field the service records but the install response omits can never reach the user. Provenance and the unsigned exception were set on InstallResult server-side and dropped at the wire, leaving printInstallTrust to report every install as untracked regardless of what was verified. Add both to the install response and the client DTO, and map them back. The round-trip test fails without the mapping — a direct test of the printer passes either way, which is how the gap survived.
c6569e6 to
b391771
Compare
|
Rebased onto Conflict resolution. The conflict in A defect this PR shipped with, now fixed. The install half of this feature never worked. The Fixed by wiring both fields across all four hops, plus Worth noting the failure mode, since it is the same shape as the
|
Note
Stack 2 of RFC THV-0080 (tracking issue #5899) — part of stack #6128, on top of #6132. This is the display follow-up promised in #6129's review.
Summary
RFC THV-0080 requires the identity pinned at trust-on-first-use to be "displayed prominently" — today the user first meets it weeks later inside a
signer-mismatch403. This PR surfaces the recorded trust state everywhere it's decided or queried:ProvenanceInfobecomes API-visible (signer_identity,cert_issuer,repository_uri,sigstore_url,provisional) instead ofjson:"-"end to end.provenanceorunsigned, and the CLI prints it —Installed <name> (signed by <identity>), the provisional variant, or the explicit-unsigned variant.thv skill infoshows the lock file's recorded trust state for project-scoped, lock-managed skills (Signed by:/Cert issuer:/ unsigned-exception lines, JSON included).Type of change
Test plan
task lint-fix, 0 issues)installAndRegisternow surfaces it on the result);task docsregenerated (swagger for the new response fields).Does this introduce a user-facing change?
Yes, behind the experimental gate: successful project-scoped installs print the recorded trust state, and
thv skill infoshows the pinned signer identity.Special notes for reviewers
.claude/rules/cli-commands.md): a freshly pinned trust anchor is security-relevant information the RFC requires to be visible, not progress chatter. Happy to gate it differently if you disagree.Generated with Claude Code