Repository navigation
docs(dsh): document the ungated probe-healthy/pinned-recover landings (#1788) - #1792
Conversation
…#1788) #1787's stale-landing guard (landingOwnsRegister) covers the four slow-path write sites in verifyAttachAndRecover but leaves the two early landings ungated: the probe-healthy short-circuit and the pinned-target-recovered write. This documents WHY they are intentionally exempt and pins the safe direction with a regression test. Boundary notes (src/agent/dsh-native.ts): - the probe-healthy and pinned-recovered landings converge rather than clobber: with routed evidence present, home/back === state.routedOrigin — the same origin onRoutedOriginObserved rebinds to — and maybeRetry's respawn() joins the same single-flight, so no independent writer moves base mid-flight. - narrow residual (exotic multi-lifecycle interleave where base holds a different LIVE origin set up outside routed evidence) -> tools bind briefly to that other live proxy; the next request's routed evidence rebinds back. Transient, self-correcting, no data loss or deadlock. - records why NOT to force the predicate here: the unconditional `return home` would then desync from register.base (return says X, base stays elsewhere). Test (tests/dsh-native.test.ts): startup attach with routed evidence to a LIVE origin distinct from a LIVE preset asserts the probe-healthy landing binds to the routed origin, never the preset, never a spawn. Distinct from the #1365 suite (dead targets); verified to fail when the routed preference is removed. Non-behavioral: comments + additive test only. Stacked on #1787.
PR review complete — pulled the head ( Verification performed
回归审查 (existing behaviors touched): none exist beyond "comments don't change runtime behavior", which holds trivially for a comments+additive-test diff. High-risk pattern sweep (semantic drift, threshold/timing/output-format change, fail-fast→swallow): negative. Test isolation: hooks reset in 结构化七问
收工判定: 内容面可合——但它是 stack:需等 #1787 先合入 master,再按 PR 描述 rebase 到 master(让注释里引用的 |
ea8adf1
into
2026-10-01_dsh-stale-landing-guard
Closes #1788
Stacked on #1787 — based on
2026-10-01_dsh-stale-landing-guard(#1787's head). The boundary notes referencelandingOwnsRegister, which #1787 introduces; rebase onto master once #1787 merges.What
#1787's stale-landing guard (
landingOwnsRegister) covers the four slow-path write sites inverifyAttachAndRecoverbut leaves the two early landings unguarded:src/agent/dsh-native.ts:285-286)src/agent/dsh-native.ts:293-294)This takes resolution (b) from the issue: document the boundary + pin the safe direction with a test. No behavior change.
Why (b) over (a)
Naively extending the predicate to these sites desyncs the unconditional
return home/return backfromregister.basein the blocked case (return says X, base stays elsewhere) — a return-contract violation needing a follow-up semantic change. For a low-severity, narrow-trigger, self-correcting residual, documenting the convergence argument is the safer call (#1039 "document the boundary" discipline). If you'd rather have (a), the delta is guard + return-consistency at both sites.Convergence argument (now documented in-source)
home/back===state.routedOrigin— the same originonRoutedOriginObservedrebinds to → converges, no clobber.maybeRetry'srespawn()joins the same single-flight mid-flight → no independent writer movesbase.Test
New regression test pins the safe direction: startup attach with routed evidence to a LIVE origin distinct from a LIVE preset asserts the probe-healthy landing binds to the routed origin (never the preset, never a spawn). Distinct from the #1365 suite (dead targets). Verified to fail when the routed preference is removed (teeth check).
Pre-flight