plugin add <url> holds the id AND the source URL but offers no [update] stanza — the one moment "easy update" is free, and it is dropped #257
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#257
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The seam
code-index plugin add <URL> --sha256 <digest>is the moment the tool knows both halves of an[update]entry: the package id (it just parsed the manifest) and the source URL (the operator just typed it). It writes neither, and says nothing about them. The operator must afterwards discover that updates exist, learn the TOML shape, and hand-edit.code-index.toml.Measured, shipped binaries at
ee39fd1:Then
plugin update:That disclosure is correct and good — it refuses to imply the project is current. The gap is that nothing anywhere tells the operator what to write, at the one point where the tool could have written it.
Why this is the payload's job, not prose's
The repo's standing rule is that a disclosure belongs in the payload.
plugin addalready prints twenty-odd disclosure lines built from the verified bytes, includingnotelines about what approving does. Given a URL it could print the stanza verbatim:Copy-pasteable, derived from values already in hand, and it costs the operator nothing to ignore. A
--configure-updateflag that writes the stanza (the waylinkedits[[links]]without hand-editing TOML, preserving comments and writing atomically) would be the natural next step, but the disclosure alone closes the discovery gap.Note
plugin add <FILE>should not print a source, because there is no URL to put in it — the stanza offer is specifically the URL arm. That asymmetry is the point: the URL arm is the one where the information is free.Second, smaller finding in the same area:
plugin doctorloses its remediation after the first checkcrates/cli/src/plugin_doctor.rshas two arms for "no updates configured", and only the earlier one tells the operator what to do:UpdateRecordState::Absent(:1112-1117) —Finding::okwhose text ends "Configure[update."<package id>"]in.code-index.tomland runcode-index plugin update --check". Good.found.packages.is_empty()(:1130-1135) — reached once a check has run and found nothing configured —Finding::okreading only "a check ran and this project configures no[update."<package id>"]entry, so ZERO packages were checked. A measurement, not a clean bill". Accurate, and with no remediation at all.Measured:
So the operator who runs
plugin updatefirst (the natural order — the doctor line told them to) and thenplugin doctoris the one who gets less help.Finding::okcarries nofixfield, so this is a small design question rather than a one-line change: either fold the configure hint into the message, or give the ok-with-advice case a constructor.Scope note
The URL form (#236,
4b02fb5) andplugin update(#237,eddaa08) both post-date thev0.27.1tag (f9ddfaf), so no published release contains either yet. Fixing this before the next release is what makes the owner's "easy install&update mechanism" true on first contact rather than after a source read.Found by Lane C walking the operator path against the published v0.27.1 release and then against
master.