feat(npm): record virtual resolution at the seams, part 3/8 (S31 plan: 18/19)
Summary
Adds the wrappers that forward lookup, probe, fetch, outage-cache, and merge-leg calls to the per-position recorder, plus health-status and exclusion-audit recorders. Assemble attaches a recorder observer to each position, and the root composition in cmd/artifact-registry/wire_npm_virtual.go passes the recorder-aware seams through. The wrappers pass calls through unchanged when the request context carries no recorder. This is part 3 of an 8-part stack for the npm virtual observability step.
Governing ADRs
None. I checked docs/adr for a decision on observability, metric families, or virtual-repository resolution events; the only mentions are the technology-stack choice of LabKit for metrics and logging (ADR 006), which this change follows without deviating, and no ADR constrains these metric names, labels, or events.
Testing
Ships tests that the wrappers forward unchanged and pass through without a recorder, that the health and exclusion recorders forward every verdict and event (and fail closed or record nothing as zero values), that non-contiguous stored positions render as the stored column, and the updated root composition test in cmd/artifact-registry. The part builds and passes vet, lint, and tests on its own tree. No e2e row is added or affected: the families and the event are internal observability, not visible from outside the service.
Size
This part is 774 reviewable lines: about 342 lines of production code and 432 lines of tests. Each part is already a function-granularity slice shipped with the tests that cover it, so splitting further would separate a function from its tests without making either easier to review.
Stacked MRs (review/merge bottom-up)
- feat(npm): add virtual resolution metric famili... (!3197 - merged) • David Fernandez • 19.5
- feat(npm): record virtual per-position outcomes... (!3198 - merged) • David Fernandez • 19.5
- feat(npm): record virtual resolution at the sea... (!3199 - merged) • David Fernandez • 19.5
👈 - feat(npm): classify virtual tarball resolve out... (!3200 - merged) • David Fernandez • 19.5
- feat(npm): emit the virtual tarball resolve eve... (!3201 - merged) • David Fernandez • 19.5
- feat(npm): book tarball body faults on the reso... (!3202 - merged) • David Fernandez • 19.5
- feat(npm): record virtual metadata merge outcom... (!3203 - merged) • David Fernandez • 19.5
- feat(npm): emit the virtual resolve event on me... (!3204 - merged) • David Fernandez • 19.5
Related to #899 (closed)