instar 1.3.1071 → 1.3.1072

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.
@@ -2,5 +2,5 @@
2
2
  "sha256": "b75c147afd1f5a9843ca4eac372159f3623f24731fe63b2f59e48043ae488af9",
3
3
  "articleCount": 82,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1071"
5
+ "packageVersion": "1.3.1072"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.1071",
3
+ "version": "1.3.1072",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-07-30T11:46:31.561Z",
5
- "instarVersion": "1.3.1071",
4
+ "generatedAt": "2026-07-30T13:07:00.920Z",
5
+ "instarVersion": "1.3.1072",
6
6
  "entryCount": 202,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -2,5 +2,5 @@
2
2
  "sha256": "b75c147afd1f5a9843ca4eac372159f3623f24731fe63b2f59e48043ae488af9",
3
3
  "articleCount": 82,
4
4
  "generatedFrom": "docs/STANDARDS-REGISTRY.md",
5
- "packageVersion": "1.3.1071"
5
+ "packageVersion": "1.3.1072"
6
6
  }
@@ -0,0 +1,27 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ `tests/e2e/throughput-series-live.test.ts` stubbed a merged PR with literal dates (`createdAt: '2026-07-22T12:00:00Z'`, `mergedAt: '2026-07-23T12:00:00Z'`). The throughput route keeps only PRs where `cutoff <= mergedAt <= now` with `cutoff = now - days` (`src/server/throughputRoutes.ts:114-117`), so at `2026-07-30T12:00:00Z` the stub fell out of the rolling 7-day window, `rows` became `[]`, and the assertion failed. CI went red on every open PR within the hour, for a reason unrelated to any change in them.
9
+
10
+ The stub's dates are now derived from `Date.now()` — merged 24h ago, created 48h ago — so the test cannot expire. The 24h created-to-merged gap is preserved deliberately: `team.index` is derived from median latency, so changing the gap would move the expected value and force an assertion edit that was never wrong.
11
+
12
+ Diagnosis note worth keeping: a test that passes for a week then fails on a date is worse than one that simply breaks, because the failure arrives detached from any change, so the natural assumption is that your own work caused it. This fixture supplies its own data and reads no real repository state, which is what made the clock the only possible variable.
13
+
14
+ ## What to Tell Your User
15
+
16
+ None — internal change (no user-facing surface).
17
+
18
+ ## Summary of New Capabilities
19
+
20
+ None — internal change (no user-facing surface).
21
+
22
+ ## Evidence
23
+
24
+ - Reproduced on a branch off freshly-fetched `origin/main`, confirming it is pre-existing and not caused by any in-flight PR: `rows: []` against expected `rows: [{ authors: { codey: { merges: 1 } }, team: { index: 80 } }]`.
25
+ - Boundary identified precisely: the literal `mergedAt` sat exactly 7 days before `2026-07-30T12:00:00Z`, which is when the failures began.
26
+ - After the fix: `npx vitest run tests/e2e/throughput-series-live.test.ts` gives 3/3 pass, with the `index: 80` assertion unchanged, proving the preserved 24h gap keeps the derived score identical.
27
+ - `safe-merge` independently refused to merge PR #1753 while these checks were red, so the merge guard behaved correctly throughout.
@@ -0,0 +1,76 @@
1
+ # Side-Effects Review — Stop the throughput fixture expiring on a calendar date
2
+
3
+ **Version / slug:** `fix-expiring-throughput-fixture`
4
+ **Date:** `2026-07-30`
5
+ **Author:** `echo (instar-dev agent)`
6
+ **Second-pass reviewer:** `not required — test-only change, no decision-point surface`
7
+
8
+ ## Summary of the change
9
+
10
+ `tests/e2e/throughput-series-live.test.ts` fed the throughput route a stub PR with literal dates (`createdAt: '2026-07-22T12:00:00Z'`, `mergedAt: '2026-07-23T12:00:00Z'`). The route keeps only PRs where `cutoff <= mergedAt <= now` with `cutoff = now - days` (`src/server/throughputRoutes.ts:114-117`), so at `2026-07-30T12:00:00Z` the stub fell out of the rolling 7-day window, `rows` became `[]`, and the assertion failed. Every open PR went red within the hour — reproduced locally on a branch off `origin/main`, so it is not caused by any in-flight change.
11
+
12
+ The stub's dates are now derived from `Date.now()` (merged −24h, created −48h). Files touched: `tests/e2e/throughput-series-live.test.ts` only. No `src/` change.
13
+
14
+ ## Decision-point inventory
15
+
16
+ No decision point. This is a test fixture; it gates nothing, blocks nothing, and constrains no agent behavior.
17
+
18
+ - `tests/e2e/throughput-series-live.test.ts` — **modify** — stub dates made relative to now instead of literal.
19
+
20
+ ---
21
+
22
+ ## 1. Over-block
23
+
24
+ **What legitimate inputs does this change reject that it shouldn't?**
25
+
26
+ No block/allow surface — over-block not applicable.
27
+
28
+ ---
29
+
30
+ ## 2. Under-block
31
+
32
+ **What failure modes does this still miss?**
33
+
34
+ - **Other hardcoded dates elsewhere.** This fixes the one fixture that expired. A repo-wide sweep for literal dates inside time-windowed assertions is not attempted here, so a sibling time bomb could exist and would surface the same way — red on a date, with no code change to blame. Recording this rather than silently scoping it out. <!-- tracked: ACT-1613 -->
35
+ - **No structural guard against reintroduction.** Nothing prevents a future author typing a literal date into a windowed test. The mitigation is a comment naming the exact failure at the exact site, which is weaker than a lint. A lint would need to distinguish a date used as a window input from a date used as inert data, which is not obviously decidable — so a comment is the honest level of protection here rather than a guard I would be overstating. <!-- tracked: ACT-1613 -->
36
+
37
+ ---
38
+
39
+ ## 3. Level-of-abstraction fit
40
+
41
+ Correct layer. The bug is in the test's own fixture data, and that is where it is fixed. The route's windowing behavior is right and is deliberately untouched — the test was wrong about time, not the code.
42
+
43
+ The alternative was freezing the clock (`vi.setSystemTime`). Rejected: it would make this test's passing depend on fake-timer setup interacting with the route's real `Date.now()` calls, which is more machinery and more coupling than deriving two dates.
44
+
45
+ ---
46
+
47
+ ## 4. Signal vs authority compliance
48
+
49
+ Not applicable — no authority and no signal. Per `docs/signal-vs-authority.md` the principle governs decision points; a test fixture is neither.
50
+
51
+ ---
52
+
53
+ ## 5. Interactions
54
+
55
+ - **The 24h created→merged gap is preserved on purpose.** `metrics()` derives `medianLatencyH` from `mergedAt - createdAt`, and `team.index` is computed from latency alongside merges and LOC. Changing the gap would move the expected `index: 80` and force an assertion edit that was never wrong. Verified by running the file: 3/3 pass with the assertion untouched.
56
+ - **Day bucketing** (`pacificDay`) now buckets to "yesterday in Pacific time" rather than a fixed calendar day. The test asserts on `rows[0]` and not on a specific date, so this is immaterial.
57
+ - **No shadowing or double-firing** — nothing else consumes this fixture.
58
+ - **Does not mask the Vercel check failure** also present on PR #1753; that is a separate, unrelated red and is not addressed here.
59
+
60
+ ---
61
+
62
+ ## 6. External surfaces
63
+
64
+ None. Test-only: no route, hook, template, scaffold, migration, or runtime behavior changes. Nothing visible to any user, agent, or external system. The only externally-visible effect is that CI can go green again.
65
+
66
+ ---
67
+
68
+ ## 7. Multi-machine posture (Cross-Machine Coherence)
69
+
70
+ **Machine-local BY DESIGN** — and not meaningfully a posture question: this is a test file executed by whichever runner checks out the repo. There is no agent state, no replication path, no merged read, no user-facing notice, no durable state that could strand on topic transfer, and no generated URL. Stated explicitly rather than omitted, because the question exists to catch silent single-machine assumptions in features, and this is not a feature.
71
+
72
+ ---
73
+
74
+ ## 8. Rollback cost
75
+
76
+ Zero. `git revert` restores the previous literals — which would immediately re-red CI, so the revert is only meaningful alongside a different fix. No migration, no state repair, no release coupling.