instar 1.3.247 → 1.3.248

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,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.247",
3
+ "version": "1.3.248",
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-06-04T20:50:10.151Z",
5
- "instarVersion": "1.3.247",
4
+ "generatedAt": "2026-06-04T21:08:49.274Z",
5
+ "instarVersion": "1.3.248",
6
6
  "entryCount": 198,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -0,0 +1,46 @@
1
+ # Upgrade Guide — vNEXT
2
+
3
+ <!-- assembled-by: assemble-next-md -->
4
+ <!-- bump: patch -->
5
+
6
+ ## What Changed
7
+
8
+ The Telegraph publishing end-to-end test (`tests/e2e/telegraph-publish.test.ts`)
9
+ makes real calls to the live Telegraph API, which occasionally returns transient
10
+ errors (`PAGE_SAVE_FAILED`, network blips, 5xx, rate-limit) through no fault of
11
+ ours. Because the suite runs in the standard CI lane (it only skips when
12
+ `SKIP_E2E=1`), one such hiccup failed the entire build on an unrelated PR — a
13
+ Gemini quota change (#756) that touches zero Telegraph code got a red build
14
+ purely because the Telegraph service blinked at the wrong moment.
15
+
16
+ This change adds a test-local `withTransientRetry` helper wrapping the six
17
+ live-API call sites (`ensureAccount` / `publishPage` / `editPage` /
18
+ `getPageViews`): a transient / network / 5xx / 429 error is retried up to 4× with
19
+ short backoff; a real failure — an assertion-worthy bug, or a persistent outage
20
+ after retries are exhausted — still fails immediately and loudly.
21
+
22
+ ## What to Tell Your User
23
+
24
+ Nothing user-facing — this is an internal CI-reliability fix. No shipped behavior
25
+ changes; agent-only.
26
+
27
+ ## Summary of New Capabilities
28
+
29
+ None — internal test-suite robustness improvement (flaky external-API e2e no
30
+ longer fails CI on unrelated PRs).
31
+
32
+ ## Evidence
33
+
34
+ - **Reproduction:** Codey PR #756 (a Gemini quota-state change touching zero
35
+ Telegraph code) got a red CI build when the live Telegraph API returned a
36
+ transient `PAGE_SAVE_FAILED` during the Unit-Tests node-22 shard. Confirmed via
37
+ `instar dev:ci-failures 756`:
38
+ `✗ src/publishing/TelegraphService.ts:298 Telegraph API error: PAGE_SAVE_FAILED`
39
+ surfacing at `tests/e2e/telegraph-publish.test.ts:102`.
40
+ - **Before:** any transient Telegraph hiccup failed the whole build on unrelated
41
+ PRs — a false failure that blocks merges and sends people chasing a non-bug.
42
+ - **After:** the six live-API calls retry transient errors up to 4×; real
43
+ failures still fail immediately. Verified locally: `tsc --noEmit` clean and all
44
+ 5 e2e tests pass against the live API
45
+ (`npx vitest run tests/e2e/telegraph-publish.test.ts --config vitest.e2e.config.ts`
46
+ → `Tests 5 passed (5)`).
@@ -0,0 +1,58 @@
1
+ # Side-Effects Review — Telegraph e2e tolerant of transient external-API errors
2
+
3
+ **Version / slug:** `telegraph-e2e-flake-tolerant`
4
+ **Date:** `2026-06-04`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not required`
7
+
8
+ ## Summary of the change
9
+
10
+ `tests/e2e/telegraph-publish.test.ts` makes REAL calls to the public Telegraph
11
+ API. That API intermittently returns transient errors (`PAGE_SAVE_FAILED`,
12
+ network blips, 5xx, rate-limit) under no fault of ours. Because the suite runs
13
+ in the standard CI lane (it only skips when `SKIP_E2E=1`), a transient hiccup
14
+ fails the whole build on UNRELATED PRs — it just failed the Unit-Tests shard on
15
+ Codey PR #756 (a Gemini quota change touching zero Telegraph code).
16
+
17
+ The fix adds a test-local `withTransientRetry(label, fn)` helper and wraps the
18
+ six live-API call sites (`ensureAccount` ×2, `publishPage` ×2, `editPage`,
19
+ `getPageViews`). On a transient/network error it retries up to 4× with linear
20
+ backoff; a non-transient error (real bug / assertion-worthy failure) throws
21
+ immediately; if all retries are exhausted it throws (genuinely-down → fail).
22
+
23
+ ## Decision-point inventory
24
+
25
+ One decision point: `withTransientRetry` classifies a caught error as transient
26
+ (via the `TRANSIENT_API_ERROR` regex) or not. Transient → retry/eventually-fail;
27
+ non-transient → rethrow immediately.
28
+
29
+ ## 1. Over-block
30
+
31
+ **What legitimate failures does this now hide?** None that matter. The regex
32
+ matches only transient external-service signatures (`PAGE_SAVE_FAILED`,
33
+ `ENOTFOUND`/`ECONNRESET`/`ETIMEDOUT`/`EAI_AGAIN`, `socket hang up`,
34
+ `fetch failed`, 5xx, 429). Assertion failures (`expect(...)`) are NOT thrown by
35
+ the wrapped service calls, so real test-logic regressions still fail. A genuine
36
+ persistent API outage still fails the test after the retries are exhausted.
37
+
38
+ ## 2. Under-block
39
+
40
+ **What does it still catch?** Any non-transient error from the service (bad
41
+ auth, a real TelegraphService bug, a 4xx other than 429) rethrows on the first
42
+ attempt — no masking. The retry is scoped to the e2e file only; no production
43
+ code path retries (so the publish-idempotency concern — a retry creating a
44
+ duplicate page — is irrelevant: duplicate test pages are harmless, Telegraph
45
+ pages are free + don't expire, and the assertions check `>= 1`, not an exact
46
+ count).
47
+
48
+ ## 3. Blast radius
49
+
50
+ Test-only: one file, `tests/e2e/telegraph-publish.test.ts`. No `src/` change, no
51
+ production behavior change, no API/schema/config change. The helper is local to
52
+ the file (not exported / not shared).
53
+
54
+ ## 4. Reversibility
55
+
56
+ Fully reversible: revert the one file. No state, no migration, no persisted
57
+ format. Verified locally: `tsc --noEmit` clean and all 5 e2e tests pass against
58
+ the live API.