Files
stack/packages/mosaic/framework
Hermes Agent 06046f7675
ci/woodpecker/pr/ci Pipeline was successful
wrapper-guard: close three fail-opens the last round left, and enumerate the large-repo test
Round-two remediation of the four blockers gate-ultron-01 raised on f8d04d1b. All
four were confirmed by my own measurement before being touched; none is taken on
the reviewer's word.

1. The --config/-K refusal never ran. It sat nested inside `if API_SHAPED`, and
   API_SHAPED is a test for a provider URL in the command text — which is exactly
   what a config file removes. The check was guarded by the condition that the
   capability it guards against defeats, so `curl --config /tmp/write.cfg` walked
   past it. It now keys on curl itself, ahead of the URL gate, and covers the
   attached (`-K/tmp/f`) and bundled (`-sK`) spellings a space-separated test
   cannot see.

2. Percent-encoded endpoints are a live route, not a theoretical one. Measured
   against the provider: `…/issues/1174` and `…/iss%75es/1174` both return HTTP
   200 for the same object. A write carrying any percent-escape is now refused
   rather than decoded — a decoder has to be exactly right about depth
   (%2569 -> %69 -> i) and about the provider's own normalisation, and being
   approximately right there is indistinguishable from not checking. Scoped to
   writes: a read is never this hook's business and a query string carrying %20
   is an ordinary URL.

3. HOME was still expanded unguarded at the `W=` fallback, which runs before any
   of the new HOME adjudication — so a guard deployed without its siblings still
   died on an unset HOME, upstream of the fix that was supposed to survive it.
   Moving a fail-open earlier in the file is not closing it. HOME is now resolved
   once, above every use, and every later site reads the resolved value.

   The existing harness could not have caught this: it runs the guard beside its
   siblings, so `[ -x "$W/pr-review.sh" ]` always succeeded and the fallback was
   never reached. A test's blind spot can be a property of the harness rather
   than of the code. The new lone_case() block copies the guard alone into an
   empty directory and re-asserts the four behaviours there.

4. test-mosaic-worktree-large-repo.sh shipped at mode 100644 and appeared in no
   CI step, so the enumeration guard (#1017) redded pipeline 2386 — correctly.
   Committed mode is now 100755 and the test is enumerated in the sanitization
   step. My own process miss: I verified the CI queue before pushing and never
   verified terminal CI after.

Controls: the 25 fixtures added here all FAIL against 029af418 (rc 0 or 1 where 2
is required) and all pass at this head, 143/143.
2026-08-13 02:18:35 -05:00
..