instar 1.3.1606 → 1.3.1608

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/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +4 -1
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/resolveMeshPeerUrl.d.ts +7 -0
  5. package/dist/core/resolveMeshPeerUrl.d.ts.map +1 -1
  6. package/dist/core/resolveMeshPeerUrl.js +23 -13
  7. package/dist/core/resolveMeshPeerUrl.js.map +1 -1
  8. package/dist/data/standards-guard-index.json +1 -1
  9. package/dist/data/standards-guard-index.meta.json +2 -2
  10. package/dist/data/standards-registry.meta.json +1 -1
  11. package/dist/feedback-factory/execute/executorSession.d.ts.map +1 -1
  12. package/dist/feedback-factory/execute/executorSession.js +6 -1
  13. package/dist/feedback-factory/execute/executorSession.js.map +1 -1
  14. package/dist/native/instar-desktop-host +0 -0
  15. package/dist/server/AgentServer.d.ts +5 -0
  16. package/dist/server/AgentServer.d.ts.map +1 -1
  17. package/dist/server/AgentServer.js +20 -11
  18. package/dist/server/AgentServer.js.map +1 -1
  19. package/dist/server/DesktopMeshBroker.d.ts +8 -0
  20. package/dist/server/DesktopMeshBroker.d.ts.map +1 -1
  21. package/dist/server/DesktopMeshBroker.js +27 -17
  22. package/dist/server/DesktopMeshBroker.js.map +1 -1
  23. package/dist/server/desktopPeerRopeFetch.d.ts +56 -0
  24. package/dist/server/desktopPeerRopeFetch.d.ts.map +1 -0
  25. package/dist/server/desktopPeerRopeFetch.js +141 -0
  26. package/dist/server/desktopPeerRopeFetch.js.map +1 -0
  27. package/dist/server/poolPeerFetch.d.ts +1 -1
  28. package/dist/server/poolPeerFetch.d.ts.map +1 -1
  29. package/dist/server/poolPeerFetch.js +2 -2
  30. package/dist/server/poolPeerFetch.js.map +1 -1
  31. package/package.json +1 -1
  32. package/src/data/builtin-manifest.json +3 -3
  33. package/src/data/standards-guard-index.json +1 -1
  34. package/src/data/standards-guard-index.meta.json +2 -2
  35. package/src/data/standards-registry.meta.json +1 -1
  36. package/upgrades/1.3.1607.md +21 -0
  37. package/upgrades/1.3.1608.md +23 -0
  38. package/upgrades/side-effects/desktop-peer-rope-fallback.eli16.md +30 -0
  39. package/upgrades/side-effects/desktop-peer-rope-fallback.md +79 -0
  40. package/upgrades/side-effects/feedback-base-missing-new-source.md +79 -0
@@ -0,0 +1,79 @@
1
+ # Side-Effects Review — remote-desktop peer calls try every rope
2
+
3
+ **Version / slug:** `desktop-peer-rope-fallback`
4
+ **Date:** `2026-11-02`
5
+ **Author:** `Echo`
6
+ **Tier:** 1 (declared). Size: 7 files, about 350 lines added (most of it the new helper and its tests). Effort: one build pass, no spec rounds.
7
+
8
+ ## Summary of the change
9
+
10
+ The Remote Desktop guided setup (`GET /desktop/setup`) said "Can't reach Mama PC" while Mama PC answered over Tailscale. `resolvePeerUrls()` hands every fan-out site ONE rope per machine: the best one the ordinary credential guard admits. That guard refuses plain-http Tailscale, so for Mama PC it handed over the `lan` rope `172.22.96.135` — the WSL-internal NAT address, unreachable from other machines. The desktop calls (`desktopSetupPeerCall`, `desktopProbePeer` in `src/server/AgentServer.ts`, and `DesktopMeshBroker.post` for begin/control/locked/keepalive) dialled only that rope and gave up.
11
+
12
+ New `src/server/desktopPeerRopeFetch.ts`: the desktop calls now walk every rope the peer advertises in resolver order (`resolveMeshPeerCandidates`, wired into `resolvePeerUrls()` as a new optional `ropes` field; without it, the refused ropes are placed ahead of the selection), skip ones `desktopPeerUrlAllowed` refuses, and move to the next rope ONLY when the request provably never reached a server: a short TCP connect check failed before sending, or the fetch failed with a connect-class code (refused, no route, DNS, connect timeout). Any HTTP reply is returned as the answer; an ambiguous failure (abort after connect, reset) is rethrown. The connect check runs only when another admissible rope remains, so single-rope peers behave exactly as before. Budgets are unchanged (8 s setup, 3 s probe and broker) and cover the whole walk. The request is signed once. `poolPeerFetch` gains an optional `fetchImpl` so rope health is still recorded through it. The broker relays the stream to the rope that actually answered.
13
+
14
+ ## Decision-point inventory
15
+
16
+ - Rope selection for remote-desktop peer calls — modify (from "first rope only" to "first rope that carries traffic").
17
+ - No block/allow decision added or changed. Admission is still `desktopPeerUrlAllowed`, unchanged.
18
+
19
+ ## 1. Over-block
20
+
21
+ No new rejection. A peer that used to be reachable on its first rope is still reached on it.
22
+
23
+ ## 2. Under-block
24
+
25
+ Not a gate. Remaining miss: a rope that accepts TCP but then hangs (a half-dead path) uses the whole budget and is not retried, by design, because the request may have reached the target. The WSL NAT address is still advertised as a `lan` rope; this change routes around it but does not stop it being advertised. That is filed as feedback (see Evidence) because telling WSL NAT mode from mirrored mode needs a separate, careful change in the endpoint advertiser.
26
+
27
+ ## 3. Level-of-abstraction fit
28
+
29
+ The rope walk belongs with the desktop calls because only they use a wider admission rule (proven Tailscale plain-http) than the shared selection. Changing the shared selection would widen credential sending for every pool read, which the desktop gate deliberately does not do. The shared resolver gains only a read helper (`resolveMeshPeerCandidates`) that `resolveMeshPeerSelection` now also uses, with identical behaviour.
30
+
31
+ ## 4. Signal vs authority compliance
32
+
33
+ - [x] No — this change has no block/allow surface.
34
+
35
+ It chooses a transport path. Credential admission stays with `desktopPeerUrlAllowed`, applied per rope.
36
+
37
+ ## 4b. Judgment-point check
38
+
39
+ No new static heuristic at a competing-signals decision point. "Did the request reach a server?" is an enumerable fact (connect-class error codes or a failed TCP connect), and the rule errs toward NOT retrying when unsure, because these are signed requests that may act on the target.
40
+
41
+ ## 5. Interactions
42
+
43
+ - Rope health: failed connect checks are recorded as rope failures through the same `recordRopeResult`, so the shared resolver demotes a dead rope faster — the same signal pool reads already produce. Successful dials are recorded by `poolPeerFetch` as before.
44
+ - Replay protection: the request is signed once; a rope is only abandoned when the request never left, so the target never sees the same signed request twice from this path.
45
+ - Other `resolvePeerUrls()` consumers ignore the new optional `ropes` field.
46
+
47
+ ## 6. External surfaces
48
+
49
+ Visible effect: setup and remote-desktop sessions now reach machines whose first rope is dead. One extra TCP handshake per desktop call when a peer has more than one admissible rope. No new endpoints, config, or messages.
50
+
51
+ ## 6b. Operator-surface quality
52
+
53
+ The guided setup stops showing a false "Can't reach" for a machine that is reachable. No new operator surface.
54
+
55
+ ## 7. Multi-machine posture
56
+
57
+ Inherently cross-machine: this is the front dialling a target. Machine-local by design (each front walks its own view of the peer's ropes); no state, no replication.
58
+
59
+ ## 8. Rollback cost
60
+
61
+ Revert the commit. No state, migration, or config to repair.
62
+
63
+ ## Conclusion
64
+
65
+ Narrow transport fix; no authority change. Safe to ship.
66
+
67
+ ## Second-pass review (if required)
68
+
69
+ Not required: no block/allow, session lifecycle, gate, sentinel or watchdog surface. The broker change touches remote-desktop request routing only; grants and Stop stay with the target.
70
+
71
+ ## Evidence pointers
72
+
73
+ - `tests/unit/desktop-peer-rope-fetch.test.ts` (13 tests): first rope dead → second used; connect-class failure → next rope; HTTP 409 on first rope → no retry; ambiguous timeout → no retry; all dead / none admissible → unreachable; gate-refused ropes skipped; single rope → no connect check; budget kept; real TCP check; broker relays to the answering rope.
74
+ - Existing suites passing: desktop-mesh-broker, desktop-peer-url-gate, resolve-mesh-peer-url, pool-rope-health-feedback, peer-presence-wiring, mesh-url-advertisement-wiring (unit); desktop-routes, desktop-setup-routes, resolve-mesh-peer-url (integration).
75
+ - WSL NAT `lan` advertisement filed via `POST /feedback`.
76
+
77
+ ## Class-Closure Declaration (display-only mirror)
78
+
79
+ No agent-authored-artifact defect — not applicable.
@@ -0,0 +1,79 @@
1
+ # Side-Effects Review — Feedback base check accepts missing new source with zero collected tests
2
+
3
+ **Version / slug:** `feedback-base-missing-new-source`
4
+ **Date:** 2026-11-02
5
+ **Author:** Echo
6
+ **Second-pass reviewer:** independent read-only reviewer `/root/feedback_gate_review`
7
+
8
+ ## Summary of the change
9
+
10
+ The feedback executor's `classifyBaseFailure` in `src/feedback-factory/execute/executorSession.ts` now examines a missing source import before treating Vitest's `Tests no tests` summary as a missing test. The recorded worker test imported `src/core/ConfigFileWriter.ts`, which the proposed fix adds; the base clone correctly lacks it. The change affects only the base-proof verdict. `tests/unit/feedback-factory/execute-units.test.ts` covers the recorded output and two negative cases. The release fragment is `upgrades/next/feedback-base-missing-new-source.md`. The driving approved, converged spec is `docs/specs/feedback-triage-and-execution.md` §4 step 8(a).
11
+
12
+ **Tier:** 2. This is a small, reversible diff, but it changes a safety proof gate before publication. One independent implementation review round concurred; local gate attempts: one focused test, one broad unit run that ended with a worker-process error, and a captured rerun that passed 55,549 tests. No merge or rollout yet.
13
+
14
+ ## Decision-point inventory
15
+
16
+ - `classifyBaseFailure` — modify — decides whether the named regression test failed for an allowed reason on the original code. The new ordering recognizes the spec's missing-new-source case even when Vitest collected zero tests.
17
+ - Head-test pass count, lint, independent review, CI, and merge gates — pass-through — remain independent requirements.
18
+
19
+ ## 1. Over-block
20
+
21
+ A test file genuinely absent at base still returns `test-not-found-at-base`. A failed suite with no recognized missing-source path still returns the same reason. An unusual Vitest wording for an allowed missing source may be rejected; this change does not expand the parser's accepted output vocabulary. The recorded Vitest wording is covered directly.
22
+
23
+ ## 2. Under-block
24
+
25
+ The base check may accept a test whose only base failure is a newly added source file, even if the test's assertion would not prove the reported behavior. This allowance already exists in the approved spec. The head clone must run the named test and show at least one pass, and independent review must judge whether the test and fix address the report. An unrelated missing import is rejected before the zero-test summary is considered. A fake missing-source line from test output remains a possible parser concern inherited from the existing classifier; the head and review gates still apply.
26
+
27
+ ## 3. Level-of-abstraction fit
28
+
29
+ The classifier is a deterministic proof validator for a constrained test-run output contract. It does not judge the feedback report's value or intent. Triage handles value; independent review handles semantic safety. The changed ordering implements an already declared allowed proof shape at the existing base-check layer.
30
+
31
+ ## 4. Signal vs authority compliance
32
+
33
+ The change keeps a hard invariant before publishing a code change. A base test must fail for a listed reason; a head test must really pass. The domain is constrained by the recorded changed-source paths and Vitest output, and the publish action has a high cost for false acceptance. This fits the hard-invariant and irreversible-action exceptions in `docs/signal-vs-authority.md`. It adds no message-content or agent-intent blocker.
34
+
35
+ ## 4b. Judgment-point check
36
+
37
+ No new static heuristic at a competing-signals judgment point. The check compares an observed missing import with the proposed change set. Human or model judgment about whether the fix is useful remains in triage and independent review.
38
+
39
+ ## 5. Interactions
40
+
41
+ - **Shadowing:** The old generic `Tests no tests` check shadowed the allowed missing-new-source classification. The new order removes that shadow; `No test files found` still rejects before path inspection.
42
+ - **Double-fire:** No new action or notification is emitted. One base-check verdict is returned per run.
43
+ - **Races:** The classifier is pure and receives bounded output plus the immutable change-set paths from the executor. No shared state or timing is changed.
44
+ - **Feedback loops:** A previously rejected item may use its one automatic retry and reach head testing or a PR. A failed head test still stops publication; the daily start cap is unchanged.
45
+
46
+ ## 6. External surfaces
47
+
48
+ The executor may open a feedback PR that this specific base-check error previously stopped. That PR still has the usual independent review and merge gates. No API shape, database schema, secret, operator action, URL format, or user notice changes. Existing agents receive the behavior through the next Instar release; no on-disk migration is required.
49
+
50
+ ## 6b. Operator-surface quality
51
+
52
+ No operator surface — not applicable.
53
+
54
+ ## 7. Multi-machine posture
55
+
56
+ Machine-local by design: each machine's installed executor validates its own confined attempt against its local clone. The same code is shipped to every updated agent. This change emits no user-facing notices, stores no new durable state, and generates no URLs; topic transfer needs no new replication path.
57
+
58
+ ## 8. Rollback cost
59
+
60
+ Revert the classifier ordering and release a patch. There is no data migration or agent-state repair. During rollback propagation, the affected test shape may again be rejected and consume an attempt, which would be visible in the executor failure reason.
61
+
62
+ ## Conclusion
63
+
64
+ The review found a narrow ordering error in an existing safety proof check. The revised order accepts only the specified missing-new-source failure while preserving negative cases and downstream gates. Local lint, build, focused regression, and a captured full unit rerun pass. The independent second pass concurred. Integration and end-to-end tests are required before publication.
65
+
66
+ ## Second-pass review
67
+
68
+ **Reviewer:** `/root/feedback_gate_review`, read-only, 2026-11-02.
69
+ **Independent read of the artifact:** Concur with the review. The order matches §4 step 8(a), preserves the rejection of unrelated imports and absent tests, and leaves head-test and independent review gates in place. The reviewer found no new blocker. The inherited parser risk remains: output is untrusted and a missing-path regex uses suffix matching; the zero-collected-test variant now reaches that existing parser path.
70
+
71
+ ## Evidence pointers
72
+
73
+ - Live failure: executor status `lastCheckFailure` for `feedback-bcac1212-d53c-46d6-8ef0-1eec8a518960:a1`, 2026-11-02.
74
+ - Local commit before artifact amendment: `5d96c49dd`.
75
+ - Run receipt: `.instar/autonomous/18330-evidence-20261102.md`.
76
+
77
+ ## Class-Closure Declaration (display-only mirror)
78
+
79
+ No agent-authored-artifact defect and no self-triggered controller change — not applicable. This is a source-code classifier correction.