@chrono-meta/fh-gate 3.11.0 → 3.13.0
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.
- package/.claude-plugin/marketplace.json +4 -4
- package/CLAUDE.md +8 -4
- package/bin/fh-codex-doctor.js +223 -25
- package/knowledge/shared/harness-core/claude_md_gate_details.md +8 -4
- package/knowledge/shared/harness-core/governance_engineering_definition.md +403 -7
- package/knowledge/shared/learnings/subagent_invocations_log.yaml +99 -0
- package/package.json +268 -257
- package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-meta/CHANGELOG.md +54 -0
- package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
- package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
- package/scripts/citation_key_check.py +357 -0
- package/scripts/claim_propagation_scan.py +499 -0
- package/scripts/numeric_token_diff.py +389 -0
- package/scripts/outbound_pr_gate.sh +283 -0
- package/scripts/package_coverage_check.sh +10 -0
- package/scripts/section_ref_check.py +591 -0
- package/scripts/selfcheck.sh +111 -0
- package/scripts/session_checklist.py +704 -0
- package/scripts/test_claim_propagation_lanes.sh +573 -0
- package/scripts/test_codex_doctor_root_lanes.sh +384 -0
- package/scripts/test_outbound_pr_gate_lanes.sh +214 -0
- package/scripts/test_paper_integrity_lanes.sh +1473 -0
- package/scripts/test_session_checklist_lanes.sh +746 -0
- package/templates/predelete_check.sh +28 -4
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# outbound_pr_gate.sh — PreToolUse(Bash): a PR about to be OPENED on a repo we do not own.
|
|
3
|
+
#
|
|
4
|
+
# THE DEFECT (measured, outbound corpus to non-owned repos, 2026-06-20..09-18)
|
|
5
|
+
# Counted by outcome: 4 merged · 1 declined-on-SCOPE (we were right — no defect to fix) ·
|
|
6
|
+
# 1 closed-on-DEFECT · 2 CHANGES_REQUESTED · 1 awaiting. THREE carry a technical-defect
|
|
7
|
+
# finding, and all three are ONE shape: our guard and our test ran on OUR MODEL of the target,
|
|
8
|
+
# and the maintainer's evidence was an execution we had never run.
|
|
9
|
+
# tt-a1i/archify#328 a pre-write source-hash check "cannot catch damage caused by
|
|
10
|
+
# the write itself" (destination symlinked to the input).
|
|
11
|
+
# clawd-on-desk#1025 the test asserted attribute removal and then called the
|
|
12
|
+
# next-stage handler SYNCHRONOUSLY, so the IPC round-trip that IS
|
|
13
|
+
# the regression window did not exist in the test at all.
|
|
14
|
+
# clawd-on-desk#1021 "every exception fixture contains only one effective
|
|
15
|
+
# destructive decision, so they cannot detect this composition
|
|
16
|
+
# failure" — the maintainer's own words for why our suite was
|
|
17
|
+
# green while 13 of 16 composed commands auto-allowed.
|
|
18
|
+
# All three were submitted after a STATIC read of the target.
|
|
19
|
+
# `[[feedback_fixture_shape_from_artifact_not_mental_model]]` (N>=6 across repos/languages).
|
|
20
|
+
#
|
|
21
|
+
# WHY A HOOK AND NOT PROSE
|
|
22
|
+
# CLAUDE.md §Skeleton-Not-Muscle already scopes "code contributed upstream to someone else's
|
|
23
|
+
# repo", and §7's `standpoint:` enum already has the rung that separates the two outcomes
|
|
24
|
+
# (#888 merged exactly-as-submitted ran the consumer path; #1025 read it). The rule exists and
|
|
25
|
+
# was NOT wired. Measured precedent for why prose is not the fix: the same rule as a CLAUDE.md
|
|
26
|
+
# table row fired 1/15 at floor tier; as a PreToolUse hook, 9/9 (proposal_hook r3/r4).
|
|
27
|
+
#
|
|
28
|
+
# WHY *THIS* SURFACE AND NOT pre-commit
|
|
29
|
+
# An outbound PR is authored in the TARGET's clone and committed under the TARGET's hooks.
|
|
30
|
+
# forge-harness' pre-commit/pre-push are structurally not on that path — no FH commit occurs.
|
|
31
|
+
# `gh pr create` IS the outbound executor, and PreToolUse is the only place that sits on it
|
|
32
|
+
# ([[feedback_instrument_not_on_the_path]], same reasoning as outbound_query_hook's).
|
|
33
|
+
#
|
|
34
|
+
# DEGRADE DIRECTION — split by what we could ESTABLISH, and the split is the design
|
|
35
|
+
# target positively NON-OWNED -> DENY (exit 2). Opening a PR on a stranger's repo is
|
|
36
|
+
# publish-class: CLAUDE.md §Autonomous-Initiative already lists
|
|
37
|
+
# "opening/updating a PR" as publish intent, and
|
|
38
|
+
# §Irreversibility Gates says that surface fails CLOSED.
|
|
39
|
+
# target positively OWNED -> silent. FH's own PRs must never be touched; a gate that
|
|
40
|
+
# blocks every internal PR is a bypass trainer.
|
|
41
|
+
# applicability UNDETERMINED -> ADVISORY, never deny. We have not established that we are on
|
|
42
|
+
# the protected surface at all, and denying here would block
|
|
43
|
+
# every bare `gh pr create`. NAMED RECALL RESIDUAL: an external
|
|
44
|
+
# PR opened from an already-`cd`-ed shell with no -R and no cwd
|
|
45
|
+
# in the payload gets an advisory that arrives on the next turn,
|
|
46
|
+
# i.e. after the PR is open. That residue is swept post-hoc by
|
|
47
|
+
# session_close_check.sh ①-b (cross-repo + reviewDecision).
|
|
48
|
+
# instrument incomplete on a
|
|
49
|
+
# NON-OWNED target -> DENY. NOT SCANNED is not clean.
|
|
50
|
+
# not an FH checkout -> silent (mechanical: is the tracked anchor file here?).
|
|
51
|
+
#
|
|
52
|
+
# WHAT IT CHECKS — the RECORD's shape, never the claim's truth (§Mechanization Boundary)
|
|
53
|
+
# A record file tracks/_meta/outbound_pr_<TODAY>_<slug>.md carrying three typed lines:
|
|
54
|
+
# standpoint: tier2(<repo>) — ran `<cmd>` there, output: <what you saw>
|
|
55
|
+
# generated-path: none-found(<the generator grep you ran>) | found(<path> -> <generator>)
|
|
56
|
+
# fixture-carries: asserted(<cmd>, <what you saw>) | not-applicable(<grounds>)
|
|
57
|
+
# `standpoint:` is the EXISTING closed enum (CLAUDE.md §7). This gate applies an ALLOW-LIST of
|
|
58
|
+
# its strong rungs — tier2 / tier2b / tier3 — so tier1, tier1b, not-applicable, UNKNOWN, every
|
|
59
|
+
# DEGRADED_*, and ANY FUTURE MEMBER block by default. Default-deny on an unknown value is the
|
|
60
|
+
# same contract validate_standpoint_leg() uses; lane L8 fails if a new enum member is added
|
|
61
|
+
# without being classified here.
|
|
62
|
+
# `generated-path:` closes archify#328② (editing a build OUTPUT: the canon is the generator's
|
|
63
|
+
# input). NONE FOUND is printed as UNPROVEN, never as safe.
|
|
64
|
+
# `fixture-carries:` closes archify#328①, clawd#1025③④ AND clawd#1021 — all three are ONE
|
|
65
|
+
# proposition: "the fixture never put the system into the state where the defect is
|
|
66
|
+
# OBSERVABLE." Three spellings measured so far, all from our own closed/blocked PRs:
|
|
67
|
+
# A the destination was never a symlink to the input, so a pre-write hash check could not
|
|
68
|
+
# see the damage the write itself caused (archify#328①)
|
|
69
|
+
# B the IPC round-trip never existed in the test, because the next-stage handler was called
|
|
70
|
+
# synchronously, so the transition window was not in the fixture at all (clawd#1025③④)
|
|
71
|
+
# C every exception fixture carried exactly ONE effective destructive decision, so a
|
|
72
|
+
# first-match-only evaluator could not be told from an all-match one (clawd#1021 —
|
|
73
|
+
# maintainer's own words, and reproduced by the governor: 13 of 16 composed commands
|
|
74
|
+
# AUTO-ALLOW, e.g. `npm publish --dry-run && rm -rf /`, with live controls `ls -la`→null
|
|
75
|
+
# and `rm -rf /`→HOLD)
|
|
76
|
+
# ONE FIELD, NOT ONE PER DEFECT. A fourth spelling lands as a fourth bullet in the deny text —
|
|
77
|
+
# zero enum change, zero lane change. Growing the FIELD set one-per-defect is how a gate turns
|
|
78
|
+
# into a form: with `not-applicable` available, a field that is almost always not-applicable
|
|
79
|
+
# trains rubber-stamping (measured in this repo's own standpoint corpus: 6 bare
|
|
80
|
+
# `not-applicable`). 🟥 NAMED RESIDUAL of folding: a session can answer spelling A and never
|
|
81
|
+
# consider C, and the gate is satisfied. Closing that would need a grounds-vocabulary grep,
|
|
82
|
+
# i.e. a frozen judgment about what an adequate answer sounds like — deliberately not built.
|
|
83
|
+
# It is a FIELD and not a detector on purpose: a grep for "next-stage handler called on the
|
|
84
|
+
# following line" asserts a CONCLUSION about test adequacy.
|
|
85
|
+
#
|
|
86
|
+
# 🟥 SELF-ATTESTED, AND THAT IS THE INTENDED RESIDUE. This blocks the record's FORM (present,
|
|
87
|
+
# typed, attributable, non-vacuous), never whether the run was real — the same boundary the
|
|
88
|
+
# crossfamily/standpoint/thirdparty commit lanes already live on.
|
|
89
|
+
#
|
|
90
|
+
# Override, recorded by construction: put FH_OUTBOUND_PR_OK=1 in the command itself. The hook
|
|
91
|
+
# reads the COMMAND STRING (an env var exported in the session is not in the hook's env), so
|
|
92
|
+
# the override lands in the transcript, and the PR it lets out is itself swept by ①-b.
|
|
93
|
+
#
|
|
94
|
+
# Ownership discriminator — CALIBRATED, offline, zero network (2026-09-18, this machine):
|
|
95
|
+
# a clone of a repo we do not own carries an `upstream` remote under a foreign owner.
|
|
96
|
+
# ~/projects/archify upstream tt-a1i/archify -> NON-OWNED (known-pos)
|
|
97
|
+
# ~/projects/clawd-on-desk upstream rullerzhou-afk/clawd-on-desk-> NON-OWNED (known-pos)
|
|
98
|
+
# ~/projects/forge-harness no upstream -> OWNED (known-neg)
|
|
99
|
+
# ~/projects/qasp-dev no upstream (has ghe/tst) -> OWNED (known-neg)
|
|
100
|
+
# Both directions separate, so the discriminator measures rather than generates.
|
|
101
|
+
#
|
|
102
|
+
# Usage: hook: PreToolUse matcher "Bash" -> bash scripts/outbound_pr_gate.sh
|
|
103
|
+
# test: printf '%s' '<json>' | bash scripts/outbound_pr_gate.sh
|
|
104
|
+
# Lanes: bash scripts/test_outbound_pr_gate_lanes.sh
|
|
105
|
+
set -uo pipefail
|
|
106
|
+
|
|
107
|
+
SELF_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
108
|
+
FH="${CLAUDE_PROJECT_DIR:-}"
|
|
109
|
+
[ -n "$FH" ] || FH="$(cd "$SELF_DIR/.." && pwd)"
|
|
110
|
+
# Applicability of the whole hook: only inside an FH checkout. Mechanical, never self-judged —
|
|
111
|
+
# same test shape as outbound_query_hook's (a tracked anchor that only this repo ships).
|
|
112
|
+
ANCHOR="${FH_OUTBOUND_ANCHOR:-$FH/scripts/session_close_check.sh}"
|
|
113
|
+
[ -f "$ANCHOR" ] || exit 0
|
|
114
|
+
|
|
115
|
+
TODAY="${FH_OUTBOUND_TODAY:-$(date +%Y-%m-%d)}"
|
|
116
|
+
RECDIR="${FH_OUTBOUND_RECDIR:-$FH/tracks/_meta}"
|
|
117
|
+
|
|
118
|
+
# ── read the payload ──────────────────────────────────────────────────────────────────────────
|
|
119
|
+
# python3 is used ONLY to parse. The DENY path below needs no interpreter (exit 2 + stderr), so a
|
|
120
|
+
# dead python3 cannot silently unblock this surface — it makes us read nothing and exit 0, which
|
|
121
|
+
# is the one documented fail-open and is identical to the hook not being wired at all.
|
|
122
|
+
RAW=$(cat)
|
|
123
|
+
PARSED=$(printf '%s' "$RAW" | python3 -c '
|
|
124
|
+
import json,sys
|
|
125
|
+
try: d=json.load(sys.stdin)
|
|
126
|
+
except Exception: sys.exit(0)
|
|
127
|
+
if not isinstance(d,dict) or d.get("tool_name")!="Bash": sys.exit(0)
|
|
128
|
+
ti=d.get("tool_input") or {}
|
|
129
|
+
cmd=(ti.get("command") if isinstance(ti,dict) else str(ti)) or ""
|
|
130
|
+
cwd=str(d.get("cwd") or "")
|
|
131
|
+
sys.stdout.buffer.write(("CWD\t"+cwd.replace("\t"," ").replace("\n"," ")+"\n").encode("utf-8"))
|
|
132
|
+
sys.stdout.buffer.write(("CMD\t"+cmd.replace("\t"," ").replace("\n","; ")+"\n").encode("utf-8"))
|
|
133
|
+
' 2>/dev/null) || exit 0
|
|
134
|
+
[ -n "$PARSED" ] || exit 0
|
|
135
|
+
PAY_CWD=$(printf '%s\n' "$PARSED" | sed -n 's/^CWD\t//p' | head -1)
|
|
136
|
+
CMD=$(printf '%s\n' "$PARSED" | sed -n 's/^CMD\t//p' | head -1)
|
|
137
|
+
[ -n "$CMD" ] || exit 0
|
|
138
|
+
|
|
139
|
+
# ── is this the outbound act? ─────────────────────────────────────────────────────────────────
|
|
140
|
+
# create / reopen / ready: the three ways a PR is put in front of a stranger. `gh pr edit --body`
|
|
141
|
+
# is publish per CLAUDE.md too and is a NAMED GAP here, not a claimed coverage.
|
|
142
|
+
# 🟥 cross-family (codex, 2026-09-18) 이 트리거를 공격했고, **주장 7건 중 5건은 실측에서 틀렸다** —
|
|
143
|
+
# `command gh` · `env X=1 gh` · `time gh` · `noglob gh` · `gh pr create --repo 'o/r'` 는 종전 식으로도
|
|
144
|
+
# 전부 잡힌다(선행 문자가 공백이므로). 실제로 안 잡히던 것은 셋이고, 그중 둘을 여기서 닫는다:
|
|
145
|
+
# ⓐ 경로 형태 `/opt/homebrew/bin/gh pr create` · `./gh pr create` → `([^ ;&|]*/)?` 추가
|
|
146
|
+
# ⓑ 인용 안쪽 `sh -c 'gh pr create …'` → 선행 문자류에 ' " ` 추가
|
|
147
|
+
# 🟥 셋째는 **정규식으로 닫히지 않는다**: 변수 간접(`GH_CMD=gh; $GH_CMD pr create`) · 셸 alias ·
|
|
148
|
+
# gh 를 감싼 스크립트. 이름으로 남긴 잔여이고, 이 훅은 그래서 «상기시키는 층» 이지 floor 가 아니다.
|
|
149
|
+
# ⚠️ 알려진 과차단 하나: `echo gh pr create` 도 잡힌다. 과차단 방향이라 그대로 둔다
|
|
150
|
+
# (막는 쪽으로 틀리는 것이 이 표면에서 옳다).
|
|
151
|
+
printf '%s' "$CMD" | LC_ALL=C grep -qE '(^|[ ;&|('"'"'"`])([^ ;&|]*/)?gh +([^ ;&|]+ +)*pr +(create|reopen|ready)([ ;&|]|$)' || exit 0
|
|
152
|
+
|
|
153
|
+
# ── owned-owner set ───────────────────────────────────────────────────────────────────────────
|
|
154
|
+
OWNERS=""
|
|
155
|
+
_origin=$(git -C "$FH" remote get-url origin 2>/dev/null || true)
|
|
156
|
+
_o=$(printf '%s' "$_origin" | sed -E 's#^.*[/:]([^/:]+)/[^/]+$#\1#')
|
|
157
|
+
[ -n "$_o" ] && [ "$_o" != "$_origin" ] && OWNERS="$_o"
|
|
158
|
+
# Optional operator layer; absent by construction in a consumer install.
|
|
159
|
+
OWNFILE="${FH_OWNED_OWNERS_FILE:-$FH/.claude/rules/.owned-owners}"
|
|
160
|
+
[ -f "$OWNFILE" ] && OWNERS="$OWNERS
|
|
161
|
+
$(grep -vE '^[[:space:]]*(#|$)' "$OWNFILE" 2>/dev/null || true)"
|
|
162
|
+
|
|
163
|
+
_is_owned() { # $1 = owner login
|
|
164
|
+
[ -n "${1:-}" ] || return 1
|
|
165
|
+
printf '%s\n' "$OWNERS" | grep -qxF "$1"
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
# A clone's BASE repo, as `gh pr create` resolves it: the fork parent (`upstream`) when the clone
|
|
169
|
+
# is a fork, otherwise `origin` itself. Reading only `upstream` would call a DIRECT clone of a
|
|
170
|
+
# foreign repo "ours" — that is the same not-found-is-not-zero face this repo keeps meeting.
|
|
171
|
+
_base_repo_of() { # $1 = a directory; echoes "owner/repo", or nothing
|
|
172
|
+
local d="$1" u r
|
|
173
|
+
[ -n "$d" ] && [ -d "$d" ] || return 1
|
|
174
|
+
git -C "$d" rev-parse --git-dir >/dev/null 2>&1 || return 1
|
|
175
|
+
u=$(git -C "$d" remote get-url upstream 2>/dev/null)
|
|
176
|
+
[ -n "$u" ] || u=$(git -C "$d" remote get-url origin 2>/dev/null)
|
|
177
|
+
[ -n "$u" ] || return 1
|
|
178
|
+
r=$(printf '%s' "$u" | sed -E 's#\.git$##; s#^.*[/:]([^/:]+/[^/:]+)$#\1#')
|
|
179
|
+
case "$r" in */*) printf '%s' "$r" ;; *) return 1 ;; esac
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
# ── resolve the target, first hit wins ────────────────────────────────────────────────────────
|
|
183
|
+
TARGET=""; OWNER=""; HOW=""
|
|
184
|
+
_spec=$(printf '%s' "$CMD" | LC_ALL=C grep -oE '(^|[ ;&|])(-R|--repo)[= ]+[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+' | head -1 \
|
|
185
|
+
| sed -E 's#.*[= ]([A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+)$#\1#')
|
|
186
|
+
if [ -n "$_spec" ]; then
|
|
187
|
+
TARGET="$_spec"; OWNER="${_spec%%/*}"; HOW="-R/--repo in the command"
|
|
188
|
+
else
|
|
189
|
+
_cd=$(printf '%s' "$CMD" | LC_ALL=C grep -oE '(^|[ ;&|])cd +[^ ;&|]+' | head -1 | sed -E 's#.*cd +##')
|
|
190
|
+
for _d in "$_cd" "$PAY_CWD"; do
|
|
191
|
+
[ -n "$_d" ] || continue
|
|
192
|
+
if _b=$(_base_repo_of "$_d"); then
|
|
193
|
+
TARGET="$_b"; OWNER="${_b%%/*}"; HOW="base repo of $_d (upstream, else origin)"; break
|
|
194
|
+
fi
|
|
195
|
+
done
|
|
196
|
+
fi
|
|
197
|
+
|
|
198
|
+
if [ -z "$OWNER" ]; then
|
|
199
|
+
VERDICT="UNDETERMINED"
|
|
200
|
+
elif _is_owned "$OWNER"; then
|
|
201
|
+
exit 0 # positively ours — silent, always
|
|
202
|
+
else
|
|
203
|
+
VERDICT="NON-OWNED"
|
|
204
|
+
fi
|
|
205
|
+
|
|
206
|
+
# ── record check (only reached on NON-OWNED / UNDETERMINED) ───────────────────────────────────
|
|
207
|
+
# Grounds bar is 20 chars, deliberately the SAME number validate_standpoint_leg() uses — one bar,
|
|
208
|
+
# not a second one that drifts.
|
|
209
|
+
STRONG_RUNGS="tier2 tier2b tier3"
|
|
210
|
+
WEAK_RUNGS="tier1 tier1b not-applicable UNKNOWN DEGRADED_NO_TARGET_ACCESS DEGRADED_NOT_RUN"
|
|
211
|
+
REASONS=""
|
|
212
|
+
_add() { REASONS="${REASONS} - $1
|
|
213
|
+
"; }
|
|
214
|
+
|
|
215
|
+
_field() { # $1 = field name; echoes the value line or nothing
|
|
216
|
+
ls -1 "$RECDIR"/outbound_pr_"$TODAY"_*.md 2>/dev/null | while read -r f; do
|
|
217
|
+
grep -m1 -E "^[[:space:]]*$1:" "$f" 2>/dev/null
|
|
218
|
+
done | head -1
|
|
219
|
+
}
|
|
220
|
+
_records=$(ls -1 "$RECDIR"/outbound_pr_"$TODAY"_*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
221
|
+
|
|
222
|
+
if [ "${_records:-0}" -eq 0 ]; then
|
|
223
|
+
_add "no record: expected $RECDIR/outbound_pr_${TODAY}_<slug>.md — none exists."
|
|
224
|
+
else
|
|
225
|
+
_sp=$(_field standpoint); _sp=${_sp#*:}
|
|
226
|
+
_spv=$(printf '%s' "$_sp" | sed -E 's/^[[:space:]]*//; s/[[:space:]]*(—|--).*$//; s/[[:space:]]+$//; s/^["'"'"']//')
|
|
227
|
+
_spg=$(printf '%s' "$_sp" | sed -E 's/^[^—-]*((—|--)[[:space:]]*)?//')
|
|
228
|
+
case "$_spv" in
|
|
229
|
+
tier2\(*\)|tier2b\(*\)|tier3\(*\))
|
|
230
|
+
[ "${#_spg}" -lt 20 ] && _add "standpoint: $_spv — grounds do not name the command you ran and the output you saw." ;;
|
|
231
|
+
"") _add "standpoint: line absent from the record. The enum is CLAUDE.md §7; only $STRONG_RUNGS clear this gate." ;;
|
|
232
|
+
*) _add "standpoint: '$_spv' is not a strong rung. tier1b means you READ the target and ran nothing — that is the signal that it is NOT time to submit (clawd#1025 was exactly this). Strong rungs: $STRONG_RUNGS." ;;
|
|
233
|
+
esac
|
|
234
|
+
_gp=$(_field generated-path); _gp=${_gp#*:}
|
|
235
|
+
_gpv=$(printf '%s' "$_gp" | sed -E 's/^[[:space:]]*//; s/\(.*$//; s/[[:space:]]+$//')
|
|
236
|
+
_gpg=$(printf '%s' "$_gp" | sed -E 's/^[^(]*\(//; s/\)[[:space:]]*$//')
|
|
237
|
+
case "$_gpv" in
|
|
238
|
+
found|none-found) [ "${#_gpg}" -lt 20 ] && _add "generated-path: $_gpv() carries no grounds — name the generator grep you ran over the target repo." ;;
|
|
239
|
+
"") _add "generated-path: line absent. For every path this patch touches, grep the target's own generators (package.json scripts, *.mjs|*.js|*.sh that WRITE that path). A hit means the edit is in the wrong place — the canon is the generator's input (archify#328②). Absence is 'none-found', i.e. UNPROVEN, never 'safe'." ;;
|
|
240
|
+
*) _add "generated-path: '$_gpv' is not one of: found(...) | none-found(...)." ;;
|
|
241
|
+
esac
|
|
242
|
+
_ar=$(_field fixture-carries); _ar=${_ar#*:}
|
|
243
|
+
_arv=$(printf '%s' "$_ar" | sed -E 's/^[[:space:]]*//; s/\(.*$//; s/[[:space:]]+$//')
|
|
244
|
+
_arg=$(printf '%s' "$_ar" | sed -E 's/^[^(]*\(//; s/\)[[:space:]]*$//')
|
|
245
|
+
case "$_arv" in
|
|
246
|
+
asserted|not-applicable) [ "${#_arg}" -lt 20 ] && _add "fixture-carries: $_arv() carries no grounds." ;;
|
|
247
|
+
"") _add "fixture-carries: line absent. The fixture must put the system into the state where the defect is OBSERVABLE; three spellings measured in our own closed PRs — (A) destination pre-made as a symlink to the input, assert the INPUT's post-state [archify#328]; (B) assert INSIDE the async window, do not call the next-stage handler synchronously [clawd#1025]; (C) the input carries >=2 effective decisions with the FIRST one excepted, so a first-match-only evaluator is distinguishable [clawd#1021]. Answer whichever applies, and name the run. Values: asserted(<cmd>, <what you saw>) | not-applicable(<grounds>)." ;;
|
|
248
|
+
DEGRADED_NOT_RUN) _add "fixture-carries: DEGRADED_NOT_RUN — 'did not run it' is an honest record and it is also the answer 'not yet ready to submit'. Run it, or record not-applicable(<grounds>)." ;;
|
|
249
|
+
*) _add "fixture-carries: '$_arv' is not one of: asserted(...) | not-applicable(...) | DEGRADED_NOT_RUN(...)." ;;
|
|
250
|
+
esac
|
|
251
|
+
fi
|
|
252
|
+
|
|
253
|
+
# ── verdict ───────────────────────────────────────────────────────────────────────────────────
|
|
254
|
+
HDR="OUTBOUND-PR GATE — target $TARGET ($HOW)"
|
|
255
|
+
if [ "$VERDICT" = "UNDETERMINED" ]; then
|
|
256
|
+
[ -n "$REASONS" ] || exit 0
|
|
257
|
+
BODY=" ⚠️ OUTBOUND-PR GATE — could not establish whether this PR's base repo is ours.
|
|
258
|
+
Advisory only (denying here would block every bare \`gh pr create\`), and it reaches you on
|
|
259
|
+
the NEXT turn — the PR may already be open. If the base repo is NOT ours, the record is owed:
|
|
260
|
+
${REASONS} Re-run with -R <owner>/<repo> to get a decided verdict instead of this one."
|
|
261
|
+
if json=$(printf '%s' "$BODY" | PYTHONIOENCODING=utf-8 python3 -c '
|
|
262
|
+
import json,sys
|
|
263
|
+
h=sys.stdin.read()
|
|
264
|
+
print(json.dumps({"systemMessage":h,"hookSpecificOutput":{"hookEventName":"PreToolUse","additionalContext":h}}))
|
|
265
|
+
' 2>/dev/null) && [ -n "$json" ]; then printf '%s\n' "$json"; exit 0; fi
|
|
266
|
+
printf '%s\n' "$BODY" >&2
|
|
267
|
+
exit 0
|
|
268
|
+
fi
|
|
269
|
+
|
|
270
|
+
# NON-OWNED from here down.
|
|
271
|
+
if printf '%s' "$CMD" | LC_ALL=C grep -qE 'FH_OUTBOUND_PR_OK=1'; then
|
|
272
|
+
printf '%s\n' " ⚠️ $HDR — FH_OUTBOUND_PR_OK=1 in the command: gate acknowledged, not satisfied." >&2
|
|
273
|
+
exit 0
|
|
274
|
+
fi
|
|
275
|
+
[ -n "$REASONS" ] || exit 0
|
|
276
|
+
printf '%s\n' " ❌ $HDR
|
|
277
|
+
A PR on a repo we do not own is publish-class and this gate fails CLOSED.
|
|
278
|
+
Owed, in $RECDIR/outbound_pr_${TODAY}_<slug>.md:
|
|
279
|
+
${REASONS} Three of our outbound PRs carry a technical-defect finding (#1025 closed, #328 and #1021
|
|
280
|
+
changes-requested) and all three were submitted after a STATIC read of the target. This gate
|
|
281
|
+
blocks the RECORD's shape, never the truth of the run.
|
|
282
|
+
Deliberate and reviewed -> prefix the command with FH_OUTBOUND_PR_OK=1." >&2
|
|
283
|
+
exit 2
|
|
@@ -316,6 +316,16 @@ ACCEPTED_ABSENT=(
|
|
|
316
316
|
# runner (labelled hub-local at the reference), which is a pointer for contributors, not a promise
|
|
317
317
|
# of a shipped artifact — the skill's own save path works without it.
|
|
318
318
|
"scripts/frontier_digest_daily.sh"
|
|
319
|
+
# 🟥 2026-09-18 — 발행 «확인» 3종. 이 레포 자기 릴리스 파이프라인의 부품이고 소비자 호출부가 없다.
|
|
320
|
+
# `publish_verify_poll.sh` 는 `.github/workflows/publish.yml` 의 verify 단계가 유일한 호출부이고,
|
|
321
|
+
# 워크플로 자체가 출하되지 않는다. 소비자는 `@chrono-meta/fh-gate` 를 발행하지 않으므로
|
|
322
|
+
# 이 스크립트를 부를 이유가 구조적으로 없다(PKG_NAME 으로 매개화돼 있긴 하다 — 그래서
|
|
323
|
+
# «불가능» 이 아니라 «호출부 부재» 라고 적는다).
|
|
324
|
+
# ⚠️ 그 결과 소비자 install 에서는 이 셋이 없고, selfcheck 의 해당 레인은 SKIP 으로 렌더된다.
|
|
325
|
+
# SKIP 은 PASS 가 아니다 — 이 레포에서는 레인이 실제로 돌고, 그것이 이 배선의 검증면이다.
|
|
326
|
+
"scripts/publish_verify_poll.sh"
|
|
327
|
+
"scripts/publish_verify_poll_stub_npm.sh"
|
|
328
|
+
"scripts/test_publish_verify_poll_lanes.sh"
|
|
319
329
|
)
|
|
320
330
|
|
|
321
331
|
# `--list-accepted`: print the ACCEPTED_ABSENT paths, one per line, and exit — no git/package.json
|