Skip to content

fix(counts): re-vendor counts.json and guard it against drift - #403

Merged
acamarata merged 1 commit into
mainfrom
fix/counts-vendor-tierpairs
Sep 11, 2026
Merged

acamarata merged 1 commit into
mainfrom
fix/counts-vendor-tierpairs

Conversation

@acamarata

Copy link
Copy Markdown
Collaborator

The CLI's vendored counts.json still carried overlap.dualRegistry. It was vendored before the canonical rule changed to the real tier_pair field, so nself plugin count --json emitted a field no registry has ever carried while plugins main emitted tierPairs. The printed numbers were correct; the schema was not.

What changed

  • Re-vendored counts.json from plugins main. This also replaces the PENDING-SYNC source placeholders with the real registry blob SHAs.
  • Overlap struct updated to match, with the rule documented: a shared slug is one two-tier product and counts once. There is no counted-twice case.
  • New Counts Vendor Sync workflow.

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/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.

Verified: build, vet, gofmt and go test ./internal/plugin/count/... pass; nself plugin count prints advertised 171; the sync check passes against current plugins main and fails when drift is injected.

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.
@acamarata
acamarata merged commit 43afe2b into main Sep 11, 2026
32 checks passed
@acamarata
acamarata deleted the fix/counts-vendor-tierpairs branch September 11, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant