Loading
feat(npm): packument GET inline-build singleflight (S11 Step 11 part 4/4)
📦 Summary
Part 4 of 4 of the npm hosted packument GET handler (S11 Step 11). Adds the read-side singleflight so concurrent inline builds for the same package collapse to one:
singleflight.Groupkeyed on(namespace_id, npm_package_id, kind), wrapping the inline buildbeforeSingleflightDotest seam (exported for tests viaexport_test.go) enabling a deterministic concurrency test- Plan housekeeping: the Step 11
Files/Testsentries are reconciled to the shipped files, and the prose note referencing a non-existentnpm_metadata_files.updated_atcolumn is corrected (the packument supportsETag/If-None-Matchonly)
🧪 Tests
Unit: 10 concurrent inline-build requests collapse to exactly one build and return byte-identical 200s (deterministic via the seam barrier).
🗂️ Stack
Part 4/4, targets 10io/npm-hosted-step11-part3of4 (part 3/4). This is the final slice; the four parts together reproduce the validated, reviewed Step 11 change exactly.
Related to #129 (closed)
🔗 Stacked MRs (review/merge bottom-up)
- feat(npm): packument GET core serve (S11 Step 1... (!630 - merged) • David Fernandez • 19.2
- feat(npm): packument GET cache-hit serve (S11 S... (!631 - merged) • David Fernandez • 19.2
- feat(npm): packument GET conditional GET + cach... (!632 - merged) • David Fernandez • 19.2
- feat(npm): packument GET inline-build singlefli... (!633 - merged) • David Fernandez • 19.2
👈
Edited by David Fernandez