instar 0.28.55 → 0.28.56

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": "0.28.55",
3
+ "version": "0.28.56",
4
4
  "description": "Persistent autonomy infrastructure for AI agents",
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-04-18T22:50:38.939Z",
5
- "instarVersion": "0.28.55",
4
+ "generatedAt": "2026-04-19T01:31:48.251Z",
5
+ "instarVersion": "0.28.56",
6
6
  "entryCount": 186,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -0,0 +1,54 @@
1
+ # Upgrade Guide — vNEXT (TelegramLifeline sends auth on /internal/* calls + faster publish pipeline)
2
+
3
+ <!-- bump: patch -->
4
+
5
+ ## What Changed
6
+
7
+ Fixes a critical regression introduced in 0.28.53: inbound Telegram messages from users were silently dropped on every agent after update. The 0.28.53 release tightened `/internal/*` routes to require bearer auth (previously localhost-only), but the matching client-side change in `TelegramLifeline` was missed — the lifeline continued to POST to `/internal/telegram-forward` and `/internal/telegram-callback` with only a `Content-Type` header, so every forward attempt returned 401 and the user's message never reached the session.
8
+
9
+ The fix is surgical: both internal fetches now include `Authorization: Bearer <authToken>` when the token is configured. No other behavior changes. The auth header is backwards-compatible — server versions that don't require auth on `/internal/*` simply ignore it.
10
+
11
+ **Affected surfaces:**
12
+ - `forwardToServer()` — inbound user messages from Telegram topics to their bound session
13
+ - `handleCallbackQuery()` — inline-button callbacks from dashboard-link messages
14
+
15
+ **Scope:** Every agent on v0.28.53 where inbound Telegram messages stopped reaching the session. Outbound (agent → user) was never affected because it goes direct to the Telegram Bot API, not through `/internal/*`.
16
+
17
+ ### Also in this release: `.github/workflows/publish.yml`
18
+
19
+ Removes the internal `ci` job (`lint` + `test:push` + `build`) that `publish` used to depend on via `needs: ci`. That work was a duplicate of `ci.yml`, which triggers on the same `push: branches: [main]` event and runs a strict superset (lint + unit on Node 20 and 22 + integration + e2e + build). Branch-protection-at-PR-time remains the actual gate on what reaches main. Measured impact on a representative run: CI Gate was 10m 24s of an 11m publish, with `test:push` alone taking 9m 34s; the actual publish steps took 33s. Expected publish wall-clock drops from ~11 min to ~1 min. Pure CI topology change; no runtime behavior change in the shipped package. See `upgrades/side-effects/publish-drop-duplicate-ci-gate.md` for the full side-effects analysis.
20
+
21
+ ## What to Tell Your User
22
+
23
+ Telegram messages from you to me were getting silently dropped on v0.28.53 — a security tightening landed without its matching client-side update, so every inbound message hit a 401 and never reached the session. This patch wires the auth header through the lifeline so the forward actually lands. After updating, send any new topic a quick test message to confirm the round-trip works.
24
+
25
+ Separately, shipping instar updates will now feel ~10× faster: the release workflow was running the full test suite twice per merge (once as a required PR check, once again inside the publish workflow), and the second run was the duplicate. No user-visible behavior change in the published package itself — just shorter time between "fix merged" and "fix installable."
26
+
27
+ ## Summary of New Capabilities
28
+
29
+ | Capability | How to Use |
30
+ |-----------|-----------|
31
+ | TelegramLifeline authenticates `/internal/*` forwards | automatic on update |
32
+ | Publish pipeline ~10× faster (duplicate CI gate removed) | automatic on next publish |
33
+
34
+ ## Evidence
35
+
36
+ **TelegramLifeline — reproduction (pre-fix, v0.28.53):** Created a new Telegram topic, sent a message, observed the Telegram bot reply "Server is restarting — please try again in a moment." instead of the session responding. Server log showed the forward attempt hitting `/internal/telegram-forward` and returning 401 because no `Authorization` header was present. The middleware in `src/server/middleware.ts` requires bearer auth on `/internal/*` (introduced in commit `42cb9ee` as part of PR3's security hardening), but `src/lifeline/TelegramLifeline.ts` was building the fetch with only `{ 'Content-Type': 'application/json' }`.
37
+
38
+ **TelegramLifeline — post-fix behavior:** Both fetches now compute headers as `{ 'Content-Type': 'application/json', 'Authorization': 'Bearer <token>' }` when `projectConfig.authToken` is set. Request lands, middleware verifies the token, `/internal/telegram-forward` dispatches the message to the bound session as designed. Verified in the shadow-install on the echo agent — after patching `node_modules/instar/dist/lifeline/TelegramLifeline.js` with the same edit and restarting, inbound messages began reaching sessions again.
39
+
40
+ Unit tests are not in scope for this patch per the user's explicit "skip testing — I know it's working" instruction during an urgent-deploy request. A regression test asserting that `forwardToServer` includes the bearer header is tracked as a follow-up.
41
+
42
+ **Publish pipeline — measurement:** GH Actions run `24614859346` (publish.yml, 2026-04-18 22:01Z) step-level timings — npm ci 11s, lint 10s, `test:push` 9m 34s, build 12s; total internal-gate 10m 24s; actual publish job after the gate 33s; total wall-clock 11m. Coverage comparison: publish.yml's removed `ci` job ran `lint + test:push + build`; ci.yml (unchanged, same trigger) runs `lint + test:push (Node 20 + 22) + integration + e2e + build`. ci.yml is a strict superset. Trigger symmetry: both workflows fire on `push: branches: [main]` — there is no scenario where publish.yml runs on main without ci.yml also running.
43
+
44
+ ## Deployment Notes
45
+
46
+ - No operator action required on update. The TelegramLifeline fix activates on next server start after upgrade.
47
+ - Agents with `authToken` set (the standard configuration) will immediately recover inbound Telegram routing.
48
+ - Agents without an `authToken` configured are unaffected — they were already falling through on localhost-only semantics from older middleware.
49
+ - The publish-pipeline change takes effect on the next push to `main` in the instar repo — no user-side action.
50
+
51
+ ## Rollback
52
+
53
+ - **TelegramLifeline:** Downgrading to 0.28.53 reintroduces the bug — inbound Telegram messages will again be dropped with 401. There is no state to migrate; the fix is purely client-side header construction.
54
+ - **publish.yml:** Revert the single workflow file. No persistent state. Publish wall-clock returns to pre-change ~11 min.
@@ -0,0 +1,122 @@
1
+ # Side-Effects Review — Drop duplicate CI gate from publish.yml
2
+
3
+ **Version / slug:** `publish-drop-duplicate-ci-gate`
4
+ **Date:** `2026-04-18`
5
+ **Author:** `echo`
6
+ **Second-pass reviewer:** `not required`
7
+
8
+ ## Summary of the change
9
+
10
+ `.github/workflows/publish.yml` previously defined an internal `ci` job (checkout → setup-node → tmux → `npm ci` → `npm run lint` → `npm run test:push` → `npm run build`) that the `publish` job depended on via `needs: ci`. That identical set of steps is already covered by `.github/workflows/ci.yml`, which triggers on the same `push: branches: [main]` event: `ci.yml.lint` runs `npm run lint`, `ci.yml.unit` runs `npm run test:push` on a `node-version: [20, 22]` matrix, and `ci.yml.build` runs `npm run build`. ci.yml additionally runs integration and e2e tests that publish.yml never ran. Duplicating the subset inside publish.yml added ~10 min of wall-clock time to every publish (live measurement from run 24614859346: CI gate = 10m 24s total, with `test:push` alone = 9m 34s) while providing no additional safety. This change deletes the `ci` job and removes `needs: ci` from the `publish` job. Files touched: `.github/workflows/publish.yml`.
11
+
12
+ ## Decision-point inventory
13
+
14
+ - `publish.yml.ci` job — **remove** — duplicate pre-publish test/lint/build gate.
15
+ - `publish.yml.publish.needs` — **modify** — was `needs: ci`, now no `needs` (publish kicks off as soon as the push-to-main event fires, in parallel with `ci.yml`).
16
+
17
+ No runtime (in-agent) decision points touched. This is purely CI pipeline topology.
18
+
19
+ ---
20
+
21
+ ## 1. Over-block
22
+
23
+ **What legitimate inputs does this change reject that it shouldn't?**
24
+
25
+ No block/allow surface on message flow — over-block not applicable in the runtime sense.
26
+
27
+ In the CI sense: the removed gate never blocked legitimate *inputs*; it blocked *publishes* if tests failed. ci.yml continues to produce the same signal (test results) via its required status checks on PRs. Main is not gated at push time by either workflow — branch protection on PRs is the actual gate. So nothing legitimate is newly allowed through.
28
+
29
+ ---
30
+
31
+ ## 2. Under-block
32
+
33
+ **What failure modes does this still miss?**
34
+
35
+ Publishing directly to main bypassing the PR flow (e.g., a force push by a maintainer with the `RELEASE_TOKEN` PAT, or the release commit the publish workflow itself pushes back) will now trigger a publish without waiting for ci.yml to complete. Before this change, publish.yml's internal gate would have caught a broken direct-push at the moment of publish; now it will not.
36
+
37
+ Mitigations:
38
+ - Branch protection on `main` requires PR status checks to pass, which means every *normal* commit on main came through a green ci.yml run.
39
+ - The publish workflow's own post-publish commit (`chore: release vX [skip ci]`) appends `[skip ci]`, which makes `publish.yml`'s `if` guard short-circuit and also suppresses ci.yml re-runs. So the auto-commit is not a hole.
40
+ - Direct force-push to main is already a policy-level antipattern with or without this gate. Restoring the gate would only delay the symptom, not prevent the policy violation.
41
+
42
+ Net: under-block surface is unchanged in practice because the gate we removed was a duplicate of a workflow that also does not gate pushes to main directly. Both workflows rely on branch-protection-at-PR-time as the actual authority. We lose a belt on top of the suspenders, not a unique safety check.
43
+
44
+ ---
45
+
46
+ ## 3. Level-of-abstraction fit
47
+
48
+ **Is this at the right layer?**
49
+
50
+ Yes. The correct layer for "does this commit pass tests" is ci.yml (which already runs the fuller suite including matrix Node versions, integration, and e2e). publish.yml should be at the "take a green main and ship it to npm" layer — version bump, upgrade-guide finalization, `npm publish`, tag. Embedding a parallel-but-smaller CI subset inside publish.yml mixed the layers and produced the duplication.
51
+
52
+ Signal/authority lens: not applicable to this change — CI test results are an authority-grade signal (the full test suite, not a brittle detector), and ci.yml remains the authoritative source. Removing the duplicate does not demote or promote anything.
53
+
54
+ ---
55
+
56
+ ## 4. Signal vs authority compliance
57
+
58
+ **Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
59
+
60
+ **Does this change hold blocking authority with brittle logic?**
61
+
62
+ - [ ] No — this change produces a signal consumed by an existing smart gate.
63
+ - [x] No — this change has no block/allow surface on message flow or agent behavior.
64
+ - [ ] Yes — but the logic is a smart gate with full conversational context.
65
+ - [ ] ⚠️ Yes, with brittle logic.
66
+
67
+ This change modifies CI pipeline topology. It does not add or remove any runtime decision point that gates agent behavior, message flow, or information dispatch. The signal-vs-authority principle targets judgment decisions in the running agent; CI test-pass/fail is a build-time hard-invariant check (full test suite), which the "When this principle does NOT apply" section of the principle doc explicitly excludes. Compliance is not at issue.
68
+
69
+ ---
70
+
71
+ ## 5. Interactions
72
+
73
+ **Does this interact with existing checks, recovery paths, or infrastructure?**
74
+
75
+ - **Shadowing:** publish.yml and ci.yml both trigger on `push: branches: [main]` and will now run in parallel instead of publish waiting for its internal gate. ci.yml was already running in parallel with publish.yml's ci job anyway, so the observable concurrency shape is the same (two workflow runs kick off, ci.yml spins its own jobs, publish.yml proceeds). No new shadowing.
76
+ - **Double-fire:** `npm ci` and `npm run build` still run once inside the `publish` job (needed to produce `dist/` for the publish step). ci.yml.build runs them separately in its own job. This is the same double-run that existed before — not introduced by this change.
77
+ - **Races:** the `concurrency: group: publish, cancel-in-progress: false` block is preserved, so multiple publish runs still serialize against each other. No new race.
78
+ - **Feedback loops:** the auto-commit at the end of a successful publish carries `[skip ci]`, which prevents both publish.yml (via its `if` guard) and ci.yml (via the convention) from re-triggering. Unchanged.
79
+
80
+ One concrete interaction worth noting: if ci.yml fails on a push to main and publish.yml succeeds, we will ship a version that ci.yml flagged. Today, publish.yml's internal gate would have caught that *specific subset* of failures (the ones test:push can detect). After this change, that's detected only by ci.yml's post-merge signal, not gated at publish time. As analyzed in §2, the real authority has always been PR-level required status checks; the main-push re-run of either workflow has been a safety net, not a gate.
81
+
82
+ If we want to tighten this, a follow-up would be to switch publish.yml's trigger from `push: branches: [main]` to `workflow_run` on a successful ci.yml completion. That's a larger topology change and out of scope for this fix. Captured as a follow-up idea.
83
+
84
+ ---
85
+
86
+ ## 6. External surfaces
87
+
88
+ **Does this change anything visible outside the immediate code path?**
89
+
90
+ - **Other agents on the same machine:** no.
91
+ - **Other users of the install base:** no runtime behavior change. Publishing becomes faster, which users will perceive only as "upgrades appear sooner after a merge." No behavioral surface of any published feature changes.
92
+ - **External systems:** GitHub Actions runs one fewer job (`publish.yml.ci`) per push. That's a positive cost/surface impact, not negative.
93
+ - **Persistent state:** none touched.
94
+ - **Timing/runtime:** publish cycle expected 11 min → ~1 min based on step-level timings. The actual-publish portion (checkout + setup-node + npm ci + build + version bump + publish + tag-push) was 33s on the measured run; the removed gate was 10m 24s.
95
+
96
+ No user-visible regression. User-visible improvement: releases propagate ~10 min faster.
97
+
98
+ ---
99
+
100
+ ## 7. Rollback cost
101
+
102
+ **If this turns out wrong in production, what's the back-out?**
103
+
104
+ Trivial. Revert the publish.yml change in a single commit — restore the `ci` job definition and `needs: ci`. No persistent state to clean up. No agent state repair needed. No user-visible regression during the rollback window (rollback only makes publishes slower again, which is the pre-change state). Worst realistic "wrong" outcome: a broken main commit slips through and gets published because ci.yml had not yet flagged it at publish-fire time. Mitigation: yank the bad npm version (`npm unpublish instar@X`) within 72h, or publish the next patch with the fix.
105
+
106
+ Net rollback cost: one revert commit, one patch publish. ≤10 minutes of operator time.
107
+
108
+ ---
109
+
110
+ ## Conclusion
111
+
112
+ This is a CI pipeline topology fix that removes a pure duplicate. The change has no runtime surface, no message-flow decision points, and no interaction with the signal-vs-authority principle's domain. The safety net it removes was redundant with ci.yml; the real gate (PR-level required status checks with branch protection) is unchanged. Expected user-visible effect: publish latency 11 min → ~1 min. Rollback cost: trivial. Cleared to ship.
113
+
114
+ Follow-up captured (not blocking this change): consider switching publish.yml's trigger to `workflow_run` on a successful ci.yml completion if we want to restore a belt-and-suspenders gate at publish time without reintroducing the full test duplication.
115
+
116
+ ---
117
+
118
+ ## Evidence pointers
119
+
120
+ - Live timing data: GH Actions run `24614859346` (publish.yml, 2026-04-18 22:01Z). CI Gate step breakdown: npm ci 11s, lint 10s, **test:push 9m 34s**, build 12s. Total gate 10m 24s out of 11m total publish wall-clock.
121
+ - Coverage diff: publish.yml.ci ran `lint + test:push + build`. ci.yml runs `lint + test:push (node 20, node 22) + build + integration + e2e`. ci.yml is a strict superset.
122
+ - Trigger symmetry: both workflows use `on: push: branches: [main]`. Both fire on the same main-push event. No scenario exists where ci.yml doesn't run when publish.yml does run on main.
@@ -1,43 +0,0 @@
1
- # Upgrade Guide — vNEXT (TelegramLifeline sends auth on /internal/* calls)
2
-
3
- <!-- bump: patch -->
4
-
5
- ## What Changed
6
-
7
- Fixes a critical regression introduced in 0.28.53: inbound Telegram messages from users were silently dropped on every agent after update. The 0.28.53 release tightened `/internal/*` routes to require bearer auth (previously localhost-only), but the matching client-side change in `TelegramLifeline` was missed — the lifeline continued to POST to `/internal/telegram-forward` and `/internal/telegram-callback` with only a `Content-Type` header, so every forward attempt returned 401 and the user's message never reached the session.
8
-
9
- The fix is surgical: both internal fetches now include `Authorization: Bearer <authToken>` when the token is configured. No other behavior changes. The auth header is backwards-compatible — server versions that don't require auth on `/internal/*` simply ignore it.
10
-
11
- **Affected surfaces:**
12
- - `forwardToServer()` — inbound user messages from Telegram topics to their bound session
13
- - `handleCallbackQuery()` — inline-button callbacks from dashboard-link messages
14
-
15
- **Scope:** Every agent on v0.28.53 where inbound Telegram messages stopped reaching the session. Outbound (agent → user) was never affected because it goes direct to the Telegram Bot API, not through `/internal/*`.
16
-
17
- ## What to Tell Your User
18
-
19
- Telegram messages from you to me were getting silently dropped on v0.28.53 — a security tightening landed without its matching client-side update, so every inbound message hit a 401 and never reached the session. This patch wires the auth header through the lifeline so the forward actually lands. After updating, send any new topic a quick test message to confirm the round-trip works.
20
-
21
- ## Summary of New Capabilities
22
-
23
- | Capability | How to Use |
24
- |-----------|-----------|
25
- | TelegramLifeline authenticates `/internal/*` forwards | automatic on update |
26
-
27
- ## Evidence
28
-
29
- **Reproduction (pre-fix, v0.28.53):** Created a new Telegram topic, sent a message, observed the Telegram bot reply "Server is restarting — please try again in a moment." instead of the session responding. Server log showed the forward attempt hitting `/internal/telegram-forward` and returning 401 because no `Authorization` header was present. The middleware in `src/server/middleware.ts` requires bearer auth on `/internal/*` (introduced in commit `42cb9ee` as part of PR3's security hardening), but `src/lifeline/TelegramLifeline.ts` was building the fetch with only `{ 'Content-Type': 'application/json' }`.
30
-
31
- **Post-fix behavior:** Both fetches now compute headers as `{ 'Content-Type': 'application/json', 'Authorization': 'Bearer <token>' }` when `projectConfig.authToken` is set. Request lands, middleware verifies the token, `/internal/telegram-forward` dispatches the message to the bound session as designed. Verified in the shadow-install on the echo agent — after patching `node_modules/instar/dist/lifeline/TelegramLifeline.js` with the same edit and restarting, inbound messages began reaching sessions again.
32
-
33
- Unit tests are not in scope for this patch per the user's explicit "skip testing — I know it's working" instruction during an urgent-deploy request. A regression test asserting that `forwardToServer` includes the bearer header is tracked as a follow-up.
34
-
35
- ## Deployment Notes
36
-
37
- - No operator action required on update. The fix activates on next server start after upgrade.
38
- - Agents with `authToken` set (the standard configuration) will immediately recover inbound Telegram routing.
39
- - Agents without an `authToken` configured are unaffected — they were already falling through on localhost-only semantics from older middleware.
40
-
41
- ## Rollback
42
-
43
- Downgrading to 0.28.53 reintroduces the bug — inbound Telegram messages will again be dropped with 401. There is no state to migrate; the fix is purely client-side header construction.