instar 1.3.1030 → 1.3.1031
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-07-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-07-28T13:03:59.365Z",
|
|
5
|
+
"instarVersion": "1.3.1031",
|
|
6
6
|
"entryCount": 202,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
**Two** fixtures retried a contended lock on a **flat cadence**. `feedback-performance-concurrent-ingest.mjs`
|
|
9
|
+
did 200 attempts at 5ms — a ~1 second budget per append. Several such workers run concurrently by design,
|
|
10
|
+
so a flat cadence is a thundering herd: every contender wakes on the same tick and they keep colliding
|
|
11
|
+
on the same slots. On a loaded runner that budget expired with nobody making progress, and main went
|
|
12
|
+
red on 2026-07-28 with `feedback source generation is busy; retry later`.
|
|
13
|
+
|
|
14
|
+
Now exponential backoff with jitter, capped at 40ms — roughly 6× the patience, de-synchronised, and
|
|
15
|
+
still bounded so a genuinely stuck lock fails promptly rather than stalling a 100-iteration loop.
|
|
16
|
+
|
|
17
|
+
**The production lock is unchanged and needs no change.** It was working correctly: `openSync(path,
|
|
18
|
+
'wx')` failing `EEXIST` means the lock is held, and it already checks whether the owning pid is alive
|
|
19
|
+
before declaring it live.
|
|
20
|
+
|
|
21
|
+
### The sibling, found by sweeping rather than assumed unique
|
|
22
|
+
|
|
23
|
+
`tests/fixtures/feedback-source-generation-worker.mjs` has the **same defect with a smaller budget** —
|
|
24
|
+
100 attempts × 5ms ≈ 500ms — and is spawned *concurrently* by `feedback-source-generation-multiprocess.test.ts`,
|
|
25
|
+
so it contends by design too. Fixed identically (~2.9s mean, jittered).
|
|
26
|
+
|
|
27
|
+
Found by asking whether the first instance was unique instead of assuming it was: a sweep for flat
|
|
28
|
+
constant-sleep retries under `tests/` returned 70 sites, of which this was the one that genuinely shares
|
|
29
|
+
the shape — same lock, same `busy` signal, concurrent contenders.
|
|
30
|
+
|
|
31
|
+
## What to Tell Your User
|
|
32
|
+
|
|
33
|
+
Nothing — a test fixture.
|
|
34
|
+
|
|
35
|
+
## Summary of New Capabilities
|
|
36
|
+
|
|
37
|
+
None.
|
|
38
|
+
|
|
39
|
+
## Evidence
|
|
40
|
+
|
|
41
|
+
- The fixture is 15 lines and was read in full before the fix. Two earlier diagnoses of this same
|
|
42
|
+
failure were written from the stack trace and were wrong — one dangerously so, proposing to treat the
|
|
43
|
+
lock's `EEXIST` as success, which would have removed mutual exclusion to make a test green.
|
|
44
|
+
- Budget measured rather than asserted: flat `200 × 5ms` ≈ 1.0s per append; jittered ≈ 5.9s mean,
|
|
45
|
+
bounded by the 40ms cap.
|
|
46
|
+
- This does **not** prove the flake is closed — no retry budget can be proven sufficient under
|
|
47
|
+
arbitrary load. It removes the thundering-herd synchronisation, which is the part that made the old
|
|
48
|
+
budget fail *systematically* rather than occasionally.
|