fix(counts): re-vendor counts.json and guard it against drift - #403
Merged
Merged
Conversation
The vendored artifact still carried the old overlap field. It was copied before the canonical rule changed from an invented dualRegistry flag to the real tier_pair one, so `nself plugin count --json` emitted a field no registry has ever used while plugins main emitted the correct one. The printed numbers were right; the schema was not. Re-vendors from plugins main, which also replaces the PENDING-SYNC source placeholders with the real registry blob SHAs, and updates the Go struct to match. Adds Counts Vendor Sync to stop this recurring. A vendored copy is a copy and copies drift; nothing was checking this one. nself-org/plugins is public so the check needs no token. It runs nightly as well as on change, because the canonical artifact lives in another repo and a push here is not the trigger that matters.
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.
The CLI's vendored
counts.jsonstill carriedoverlap.dualRegistry. It was vendored before the canonical rule changed to the realtier_pairfield, sonself plugin count --jsonemitted a field no registry has ever carried whilepluginsmain emittedtierPairs. The printed numbers were correct; the schema was not.What changed
counts.jsonfrompluginsmain. This also replaces thePENDING-SYNCsource placeholders with the real registry blob SHAs.Overlapstruct updated to match, with the rule documented: a shared slug is one two-tier product and counts once. There is no counted-twice case.Counts Vendor Syncworkflow.Why the workflow
A vendored copy is a copy, and copies drift. Nothing was checking this one, which is how it stayed wrong.
nself-org/pluginsis public so the check needs no token. It runs nightly as well as on change, because the canonical artifact lives in another repo and a push here is not the trigger that matters.Verified: build, vet, gofmt and
go test ./internal/plugin/count/...pass;nself plugin countprints advertised 171; the sync check passes against currentpluginsmain and fails when drift is injected.