instar 1.3.37 → 1.3.39

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.
Files changed (40) hide show
  1. package/dist/commands/init.d.ts.map +1 -1
  2. package/dist/commands/init.js +62 -0
  3. package/dist/commands/init.js.map +1 -1
  4. package/dist/commands/server.d.ts.map +1 -1
  5. package/dist/commands/server.js +15 -3
  6. package/dist/commands/server.js.map +1 -1
  7. package/dist/core/SafeGitExecutor.d.ts +30 -0
  8. package/dist/core/SafeGitExecutor.d.ts.map +1 -1
  9. package/dist/core/SafeGitExecutor.js +30 -3
  10. package/dist/core/SafeGitExecutor.js.map +1 -1
  11. package/dist/core/featureRolloutScan.d.ts.map +1 -1
  12. package/dist/core/featureRolloutScan.js +9 -1
  13. package/dist/core/featureRolloutScan.js.map +1 -1
  14. package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
  15. package/dist/lifeline/TelegramLifeline.js +8 -0
  16. package/dist/lifeline/TelegramLifeline.js.map +1 -1
  17. package/dist/lifeline/TelegramPollOwnerLease.d.ts +67 -0
  18. package/dist/lifeline/TelegramPollOwnerLease.d.ts.map +1 -0
  19. package/dist/lifeline/TelegramPollOwnerLease.js +116 -0
  20. package/dist/lifeline/TelegramPollOwnerLease.js.map +1 -0
  21. package/dist/messaging/TelegramAdapter.d.ts +38 -0
  22. package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
  23. package/dist/messaging/TelegramAdapter.js +41 -0
  24. package/dist/messaging/TelegramAdapter.js.map +1 -1
  25. package/dist/messaging/installAgentMessageHook.d.ts +38 -0
  26. package/dist/messaging/installAgentMessageHook.d.ts.map +1 -0
  27. package/dist/messaging/installAgentMessageHook.js +99 -0
  28. package/dist/messaging/installAgentMessageHook.js.map +1 -0
  29. package/dist/monitoring/releaseReadinessWiring.d.ts.map +1 -1
  30. package/dist/monitoring/releaseReadinessWiring.js +11 -1
  31. package/dist/monitoring/releaseReadinessWiring.js.map +1 -1
  32. package/package.json +1 -1
  33. package/src/data/builtin-manifest.json +12 -4
  34. package/upgrades/1.3.32.md +10 -10
  35. package/upgrades/1.3.38.md +26 -0
  36. package/upgrades/1.3.39.md +50 -0
  37. package/upgrades/side-effects/a2a-recipient-hook-wiring.md +102 -0
  38. package/upgrades/side-effects/self-propagation-poll-owner-lease.md +43 -0
  39. package/upgrades/side-effects/self-propagation-test-as-self-skill.md +42 -0
  40. package/upgrades/side-effects/source-tree-guard-data-pull.md +35 -0
@@ -0,0 +1,35 @@
1
+ # Side-Effects Review — SourceTreeGuard data-pull exemption for `git fetch`
2
+
3
+ **Driver:** RELEASE-READINESS-VISIBILITY-SPEC §4.2.2 + §4.3.2 (Layer B + Layer C canonical-ref reads). Discovered during dogfood on Echo (the instar source IS the agent home — exactly the maintainer environment the spec targets).
4
+
5
+ ## What changed
6
+
7
+ - **`src/core/SafeGitExecutor.ts`** —
8
+ - New `SafeGitOptions.sourceTreeReadOk?: boolean` (default false).
9
+ - New exported `SOURCE_TREE_READ_TIER_VERBS: Set<string>` — currently `['fetch']` only. Closed enumeration.
10
+ - `execSync` + `spawn` skip `runSourceTreeChecks` when `sourceTreeReadOk: true` AND the verb is in `SOURCE_TREE_READ_TIER_VERBS`. The bypass is audit-logged (`sourceTreeReadOk-bypass` reason).
11
+ - **`src/monitoring/releaseReadinessWiring.ts`** — Layer B's `fetchCanonical` passes `sourceTreeReadOk: true`.
12
+ - **`src/core/featureRolloutScan.ts`** — Layer C's `scanSpecArtifactsCanonical` passes `sourceTreeReadOk: true` for its bounded fetch.
13
+
14
+ ## Side-effects analysis
15
+
16
+ **The dogfood that prompted this.** With Layers B + C live and Echo's `monitoring.releaseReadiness.enabled: true`, the very first real tick on Echo hit `SourceTreeGuardError` on the watchdog's `git fetch <canonical-remote> main`. The watchdog correctly fail-louded (one LOW-priority Attention item `release-readiness-eval-failure-fetch`, deduped across ticks, full audit in `sentinel-events.jsonl`). Layer C correctly degraded + fell back to the local scan with a degradation log. So the architecture caught its own integration gap. This PR closes the gap principledly.
17
+
18
+ **Why this is safe.** SourceTreeGuard's mandate is "refuse destructive ops against the instar source tree" — the 2026-04-22 incident class. `git fetch <remote> <branch> --no-tags --no-recurse-submodules` writes only to `FETCH_HEAD` (transient ref) and the object database. It does NOT modify: the working tree, any committed ref (heads/tags/remotes), any source file. From the source-protection standpoint it is read-tier. `ls-remote` is pure read and already in `READONLY_GIT_VERBS` (so it goes through `readSync`, which doesn't run source-tree checks at all).
19
+
20
+ **Why opt-in.** The bypass is opt-in per-call, not a global relaxation. Every callsite that uses it is reviewable and audit-logged. The allowlist is a small closed set (`fetch` only) — adding to it requires a spec edit + this same review pattern.
21
+
22
+ **Reach.** Two callsites touched, both in the canonical-ref read path the spec defines (Layer B `fetchCanonical`, Layer C `scanSpecArtifactsCanonical`). Every existing callsite that does NOT pass `sourceTreeReadOk: true` is byte-identically guarded by the prior behavior.
23
+
24
+ **Rollback.** Reverting this PR re-blocks the canonical-ref fetch on source trees. Layer B's fail-loud path keeps signaling on the failure; Layer C's local-scan fallback keeps working. The watchdog and the reconciler degrade gracefully back to their prior behavior — no broken state.
25
+
26
+ ## Testing
27
+
28
+ - `tests/unit/SafeGitExecutor-sourceTreeReadOk.test.ts` (5 tests):
29
+ - Default: `fetch` on a non-source tree works (baseline).
30
+ - Default: `fetch` on a source tree is BLOCKED by `SourceTreeGuard`.
31
+ - `sourceTreeReadOk: true` + `fetch` on a source tree passes.
32
+ - `sourceTreeReadOk: true` does NOT bypass for non-allowlist verbs (e.g. `add`).
33
+ - `SOURCE_TREE_READ_TIER_VERBS` is a small closed set (`fetch` only, ≤3 entries).
34
+
35
+ All green; lint clean.