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.Group keyed on (namespace_id, npm_package_id, kind), wrapping the inline build
  • beforeSingleflightDo test seam (exported for tests via export_test.go) enabling a deterministic concurrency test
  • Plan housekeeping: the Step 11 Files / Tests entries are reconciled to the shipped files, and the prose note referencing a non-existent npm_metadata_files.updated_at column is corrected (the packument supports ETag / If-None-Match only)

🧪 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)

Edited by David Fernandez

Merge request reports

Loading
Loading