fix(wake): #944 path becomes a hard-locator arm — detector-shape actionable entries pass the §2.1 gate (#945)
Closes #944. _has_hard_locator accepted only repo+issue / 40-hex sha / file — the forge vocabulary. The detector emits path (+snapshot_sha when attested) and NEVER emits file/issue/sha, so predicate and sole producer shared ZERO keys and every class=actionable board_file entry dead-lettered. Latent since #920, whose harness pinned the detector's own emission shape as its malformed example — the suite certified the gap it was written to guard. Fix: `path` becomes a hard-locator arm, and ONLY path. Bare path-less snapshot_sha is a deliberate NON-arm (would widen past the board_file vocabulary); Q11(d) asserts it still quarantines at 7/40/64 chars, spanning the detector's ^[0-9a-f]{7,64}$ attestation range. VERIFICATION - Pipeline 2105 terminal-green atfa36da8. Its `test` step reaches all nine wake harnesses via turbo -> packages/mosaic `test` -> `test:framework-shell`, which names each suite explicitly. The two-levels-down indirection matters: no search of .woodpecker/* can see it, and that is exactly why this question was got wrong earlier today and then corrected. CI therefore DOES attest the quarantine suite and the detector suite at this head. - Independent review (mos-dt, consumer on the affected lane) PASS atfa36da8, from a detached worktree: predicate provably unmoved fromfb3c3c3(comment-stripped sha256 identical, _has_hard_locator body byte-identical), RED control at base reproduced exactly 8 failures all Q11 including "got 6". - Third reviewer (wake-judge) ACCEPT on both judgment calls: the Q1 assertion reversal is a legitimate correction (the flip was forced, not elective — base fixtures red 19 assertions against the head predicate) and path-alone satisfies §2.1, whose operative test is "one targeted call, never a search" — two of its four named exemplars already resolve to current state. Requiring path+snapshot_sha jointly would permanently dead-letter a declared source class and conflict with #940's advisory-fields ruling. - Judge's mutation criterion met: with the reconciled exemption disabled, the gate-level assertion ("an ORIENTATION-tier enumeration must NOT be quarantined") dies at this head and did not exist as a casualty before F1. - D4 (detector lock re-acquisition) fails intermittently at base AND head; git diff base..head over the detector files is EMPTY, so it is out of this PR's surface on structural grounds rather than on a re-roll. Known defect, fix identified (detector.sh:516, fd 9 leaked into sleep), tracked separately. KNOWN RESIDUALS - ENUM-B is now the sole address-free reconciled fixture, so the exemption's gate-level guard is a population of one. Safe by population, not by design. Author follow-up: assert ENUM-B carries no hard-locator arm so the harness guards its own premise. - The binding spec (CONVERGED-DESIGN.md §2.1, separate repo) still enumerates four forge tokens and reads narrower than the shipped gate. Tracked as #948, sequenced after the dragon-lin reseed. - Hard-locator arms are type-loose: repo/file/path accept any non-null JSON value. Pre-existing; `sha` fails closed only by accident of test(). Tracked separately. Authored by pepper (sb-it-1-dt); reviewed independently by mos-dt (sb-it-1-dt) and wake-judge. The mos-dt-0 commit/fork identity does not identify the author — attribution collapse tracked in #3092. Co-authored-by: mos-dt-0 <[email protected]>
This commit was merged in pull request #945.
This commit is contained in:
@@ -25,8 +25,8 @@
|
||||
# sufficiency NEVER exempts a consequential action from its live gate.
|
||||
#
|
||||
# HARD LOCATORS (§2.1): every actionable claim MUST carry a precise locator
|
||||
# (repo + issue#, a 40-char SHA, or file:anchor) so re-verification is ONE
|
||||
# targeted call. A missing locator = malformed ACTIONABLE entry = FAIL-LOUD.
|
||||
# (repo + issue#, a 40-char SHA, file:anchor, or path — #944) so re-verification
|
||||
# is ONE targeted call. A missing locator = malformed ACTIONABLE entry = FAIL-LOUD.
|
||||
#
|
||||
# #920 (per-entry quarantine — fail-loud WITHOUT head-of-line blocking): a
|
||||
# render-refused entry (actionable-tier, no hard locator) is QUARANTINED — durably
|
||||
@@ -209,13 +209,28 @@ _scrub_free() {
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# _has_hard_locator LOCATORS_JSON — true iff the locators object carries at least
|
||||
# one PRECISE locator sufficient for one-call re-verification:
|
||||
# repo + issue (issue#) | 40-hex sha | file (file:anchor).
|
||||
# one PRECISE locator sufficient for one-call re-verification. BOTH locator
|
||||
# vocabularies in live use are accepted (the same two _locator_line documents
|
||||
# under #914b):
|
||||
# forge shape (§2.1): repo + issue (issue#) | 40-hex sha | file (file:anchor)
|
||||
# detector shape (#944): path
|
||||
# The `path` arm was added by #944: detector.sh (A1) builds board_file locators
|
||||
# as kind/id/observed_hash + path (+ snapshot_sha when adapter-attested, #940)
|
||||
# — none of which the gate tested — so a class=actionable board_file entry
|
||||
# could NEVER pass and every heartbeat-planning delta dead-lettered (live seqs
|
||||
# 63/68). `path` mirrors `file` exactly (same one-call "re-read X" hint below;
|
||||
# with an attested snapshot_sha the hint upgrades to one-call
|
||||
# `git show <snapshot_sha>:<path>`). DELIBERATELY NOT ARMS: `observed_hash`
|
||||
# (a content hash, not an address) and bare `snapshot_sha` without `path`
|
||||
# (a path-less 40-hex would widen the gate past the board_file vocabulary —
|
||||
# review-adopted criterion on #944; snapshot_sha's precision is only reachable
|
||||
# THROUGH a path, so path is the address and snapshot_sha stays a refinement).
|
||||
_has_hard_locator() {
|
||||
jq -e '
|
||||
((.repo // "") != "" and ((.issue // "") | tostring) != "")
|
||||
or (((.sha // "") | test("^[0-9a-f]{40}$")))
|
||||
or ((.file // "") != "")
|
||||
or ((.path // "") != "")
|
||||
' >/dev/null 2>&1 <<<"$1"
|
||||
}
|
||||
|
||||
@@ -223,16 +238,18 @@ _has_hard_locator() {
|
||||
# one-targeted-call re-verify hint, where available.
|
||||
#
|
||||
# #914b: covers BOTH locator vocabularies actually in use:
|
||||
# - the HARD-locator shape (§2.1, gated by _has_hard_locator, unchanged):
|
||||
# - the HARD-locator shape (§2.1, gated by _has_hard_locator):
|
||||
# repo+issue | 40-hex sha | file(:anchor).
|
||||
# - the shape detector.sh (A1) actually builds for a `digest`-class entry
|
||||
# (see detector.sh's enqueue-locators jq filter): kind/id/observed_hash +
|
||||
# whichever of repo/path/anchor/remote/branches the source def declares.
|
||||
# None of kind/id/observed_hash/remote/path/branches were recognized here
|
||||
# before, so a real digest-class pointer rendered a bare empty "locator:"
|
||||
# line despite the entry carrying real (soft, non-hard) locator data. This
|
||||
# is display-only: it does NOT feed _has_hard_locator, so the
|
||||
# ACTIONABLE-tier hard-locator FAIL-LOUD gate is untouched.
|
||||
# line despite the entry carrying real (soft, non-hard) locator data.
|
||||
# (At #914b this was display-only; #944 later promoted `path` — and ONLY
|
||||
# `path` — into _has_hard_locator, since it carries the same one-call
|
||||
# re-verify precision as `file`. kind/id/observed_hash/remote/branches
|
||||
# and bare snapshot_sha remain soft/display-only.)
|
||||
_locator_line() {
|
||||
local loc="$1" repo issue sha file anchor head parts='' reverify=''
|
||||
local remote path kind id ohash branches snap_sha snap_ts
|
||||
@@ -477,7 +494,7 @@ _quarantine_entry() {
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
echo "digest.sh: FAIL-LOUD QUARANTINE (#920) — malformed ACTIONABLE entry at observed_seq=$seq has no §2.1 hard locator (repo+issue#/40-char SHA/file:anchor). DEAD-LETTERED to $dlq and EXCLUDED from this digest; the rest of the cumulative set still renders (no head-of-line block). Re-feed the source with a valid hard locator." >&2
|
||||
echo "digest.sh: FAIL-LOUD QUARANTINE (#920) — malformed ACTIONABLE entry at observed_seq=$seq has no §2.1 hard locator (repo+issue# / 40-hex sha / file:anchor / path). DEAD-LETTERED to $dlq and EXCLUDED from this digest; the rest of the cumulative set still renders (no head-of-line block). Re-feed the source with a valid hard locator." >&2
|
||||
# #924 (G2a): route the SAME per-entry alarm off-host too, deduped by
|
||||
# observed_seq so a still-dead-lettered entry re-drained every tick is
|
||||
# alarmed off-host EXACTLY ONCE (never once per re-render).
|
||||
|
||||
Reference in New Issue
Block a user