session_host_marker reads through body_marker, not its own sed — the #2111 inline-code-span fix now covers host-affinity pins (#2114) #2117

Closed
matou-build-agent wants to merge 1 commit from agent/issue-2114 into main

closes #2114

What this lands

session-host-lib.sh's session_host_marker — the #89 host-affinity pin
(<!-- session-host: … -->) the ready-for-session pick loop honours — had its
own sed extraction over body_outside_fences, which strips block fences
only
. So the #2111 fix (which taught body-marker.jq's marker() to also
strip CommonMark inline code spans) did not cover host-affinity pins: a
host pin quoted in inline backticks while merely describing it, or sitting
mid-prose, was still honoured. Verified read-only on the vendored lib and
reproduced red in the offline test.

Fix: replace the private sed+trim with body_marker "$1" session-host,
routing host pins through the one place fence/span semantics live. A
backtick-wrapped pin is now suppressed; a pin that merely shares its line with
prose but is not in a code span still parses (a real harness shape, cf.
close-report #206). The output contract is unchanged — first marker wins,
trimmed host list, empty when absent — so session-runner.sh's pick loop is
untouched.

Vendored path (ADR 0180 / #445) + topology

Protected, vendored .sandcastle/ files. The backport chain forked at #2110
(e77a951): #2111 (a4189e0, the strip_inline_code this depends on) and #2112
(40d60ac, now the idss pin) were concurrent siblings. This did not stack on
#2111's line (that would revert #2112) — it rebased #2111's body-marker commit +
#2114's session-host commit onto 40d60ac (disjoint file sets, clean
linearization) as dev-factory backport/idss-2114 (18cfbcb), then re-vendored
FACTORY_REF 40d60ac→18cfbcb. The re-vendor therefore carries #2111's
body-marker.jq / body-marker-lib.sh / body-marker-lib-test.sh alongside
#2114's session-host-lib.sh / session-host-lib-test.sh; #2112's
main.mts / run-swarm.sh / execute-lib-test.sh are unchanged. FACTORY_MANIFEST
no churn, drift-gate OK, clean # Source: (no token leak).

Merge note: because this re-vendor carries #2111's body-marker fix, it
subsumes #2111's own vendor PR #2115 (itself now stale against the
40d60ac pin). Merge this and close #2115 as subsumed, or merge #2115
first and this rebases to its session-host delta.

Proof

  • tests/session-host-lib-test.sh gains a group: single- and double-backtick
    inline-span pins are not honoured, a real pin wins over an earlier
    inline-span phantom, a lone unmatched backtick opens no span. Red-before-green
    verified
    against the old sed parser (red: "a host pin in an inline code span
    must NOT be honoured (#2114)").
  • tests/body-marker-lib-test.sh stays green (8 groups).
  • check-harness-drift.sh: OK against 18cfbcb.

Ruled by agent under ADR 0174 — veto anytime (revertible: git revert + reset
the backport branch; provable: the vendored red-before-green suite).

Screenshots: none — a vendored shell parser (session_host_marker) with no UI surface; proof is the offline red-before-green test suite above.

🤖 Generated with Claude Code

closes #2114 ## What this lands `session-host-lib.sh`'s `session_host_marker` — the #89 host-affinity pin (`<!-- session-host: … -->`) the `ready-for-session` pick loop honours — had its **own** `sed` extraction over `body_outside_fences`, which strips **block fences only**. So the #2111 fix (which taught `body-marker.jq`'s `marker()` to also strip CommonMark **inline code spans**) did **not** cover host-affinity pins: a host pin quoted in inline backticks while merely describing it, or sitting mid-prose, was still honoured. Verified read-only on the vendored lib and reproduced red in the offline test. **Fix:** replace the private sed+trim with `body_marker "$1" session-host`, routing host pins through the one place fence/span semantics live. A backtick-wrapped pin is now suppressed; a pin that merely shares its line with prose but is **not** in a code span still parses (a real harness shape, cf. close-report `#206`). The output contract is unchanged — first marker wins, trimmed host list, empty when absent — so `session-runner.sh`'s pick loop is untouched. ## Vendored path (ADR 0180 / #445) + topology Protected, vendored `.sandcastle/` files. The backport chain **forked** at #2110 (`e77a951`): #2111 (`a4189e0`, the `strip_inline_code` this depends on) and #2112 (`40d60ac`, now the idss pin) were concurrent siblings. This did **not** stack on #2111's line (that would revert #2112) — it rebased #2111's body-marker commit + #2114's session-host commit onto `40d60ac` (disjoint file sets, clean linearization) as dev-factory `backport/idss-2114` (`18cfbcb`), then re-vendored `FACTORY_REF` `40d60ac`→`18cfbcb`. The re-vendor therefore carries #2111's `body-marker.jq` / `body-marker-lib.sh` / `body-marker-lib-test.sh` **alongside** #2114's `session-host-lib.sh` / `session-host-lib-test.sh`; #2112's `main.mts` / `run-swarm.sh` / `execute-lib-test.sh` are unchanged. `FACTORY_MANIFEST` no churn, drift-gate OK, clean `# Source:` (no token leak). > **Merge note:** because this re-vendor carries #2111's body-marker fix, it > **subsumes** #2111's own vendor PR #2115 (itself now stale against the > `40d60ac` pin). Merge this and close #2115 as subsumed, **or** merge #2115 > first and this rebases to its session-host delta. ## Proof - `tests/session-host-lib-test.sh` gains a group: single- and double-backtick inline-span pins are **not** honoured, a real pin wins over an earlier inline-span phantom, a lone unmatched backtick opens no span. **Red-before-green verified** against the old sed parser (red: "a host pin in an inline code span must NOT be honoured (#2114)"). - `tests/body-marker-lib-test.sh` stays green (8 groups). - `check-harness-drift.sh`: OK against `18cfbcb`. Ruled by agent under ADR 0174 — veto anytime (revertible: `git revert` + reset the backport branch; provable: the vendored red-before-green suite). **Screenshots:** none — a vendored shell parser (`session_host_marker`) with no UI surface; proof is the offline red-before-green test suite above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sandcastle: #2114 — session_host_marker reads through body_marker, not its own sed (re-vendored FACTORY_REF 40d60ac→18cfbcb)
Some checks failed
ci / seam (pull_request) Successful in 18m26s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been cancelled
f663c86f43
session_host_marker had a private sed extraction over body_outside_fences that
#2111's inline-code-span strip did not cover: a host pin quoted in inline
backticks (or mid-prose) was still honoured, letting prose — or an app report's
words — park a ticket on a host that never ticks. Unify it onto
body_marker -> body-marker.jq's marker(), the one place fence/span semantics
live, so a backtick-wrapped pin is suppressed while a prose-adjacent pin (a real
harness shape, cf. close-report #206) still parses. Output contract unchanged
(first wins, trimmed, empty when absent), so session-runner.sh's pick loop is
untouched.

The backport chain forked at #2110 (e77a951): #2111 (a4189e0, the body-marker
fix this depends on) and #2112 (40d60ac, now the idss pin) were concurrent
siblings. This did NOT stack on #2111's line (that would revert #2112) — it
rebased #2111's commit + #2114's onto 40d60ac (disjoint files, clean
linearization) as dev-factory backport/idss-2114 (18cfbcb), then re-vendored
FACTORY_REF 40d60ac->18cfbcb. The re-vendor carries #2111's body-marker files
alongside #2114's session-host files (the hole #2114 closes only exists once
strip_inline_code is present); #2112's main.mts/run-swarm.sh/execute-lib-test.sh
unchanged. Manifest no churn, drift OK, clean # Source.

Red-before-green: session-host-lib-test.sh gains a group asserting
single/double-backtick inline-span pins are not honoured, a real pin wins over
an earlier inline-span phantom, and a lone unmatched backtick opens no span;
body-marker suite stays green. Lands by PR (landing-pr, ADR 0267); subsumes
#2111's vendor PR #2115. Advances #2114.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Factory-Account: d631bd58e1e9
Owner

Reviewed for merge at Ben's request (2026-11-16 PR sweep) — not merged; left open. Its FACTORY_REF pin is a dev-factory backport/idss-* commit 6–9 commits BEHIND the pin main now carries (291c9bf, after #2179), and not an ancestor of it — merging would roll the vendored harness back. Needs its dev-factory commit re-backported on top of 291c9bf and re-vendored (drift-clean), then a fresh PR.

Reviewed for merge at Ben's request (2026-11-16 PR sweep) — **not merged; left open.** Its FACTORY_REF pin is a dev-factory `backport/idss-*` commit 6–9 commits BEHIND the pin main now carries (`291c9bf`, after #2179), and not an ancestor of it — merging would roll the vendored harness back. Needs its dev-factory commit re-backported on top of `291c9bf` and re-vendored (drift-clean), then a fresh PR.
Owner

Superseded by a7483d0e on main. That commit re-vendors #2068, #2111 and #2114 together onto the current pin (dev-factory backport/idss-2068-2111-2114 @ bbcf34e, off 69d5c0d), so the #2057 snapshot fix stays in. Merging this PR would have rolled FACTORY_REF back. One change: the docs tier now reads its trees from .sandcastle/docs-gate.globs rather than hardcoding idss paths in vendored gate-lib.sh (dev-factory #47 guard).

Superseded by a7483d0e on main. That commit re-vendors #2068, #2111 and #2114 together onto the current pin (dev-factory `backport/idss-2068-2111-2114` @ bbcf34e, off 69d5c0d), so the #2057 snapshot fix stays in. Merging this PR would have rolled `FACTORY_REF` back. One change: the docs tier now reads its trees from `.sandcastle/docs-gate.globs` rather than hardcoding idss paths in vendored `gate-lib.sh` (dev-factory #47 guard).
ben closed this pull request 2026-11-17 12:55:51 +00:00
Some checks failed
ci / seam (pull_request) Successful in 18m26s
ci / publish (pull_request) Has been skipped
ci / publish-broker (pull_request) Has been skipped
ci / deploy-broker (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss!2117
No description provided.