docs(6210): acceptance sweep — src, scripts and frontend leftovers described in the present tense
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m9s
CI & Build / Python tests (push) Successful in 1m55s
CI & Build / Build & push image (push) Successful in 34s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m9s
CI & Build / Python tests (push) Successful in 1m55s
CI & Build / Build & push image (push) Successful in 34s
The acceptance greps found what the per-area passes missed: - src/scribe: "Phase 7/8" removal notes in projects, settings and user_profile; a paragraph promising an auto-summary side effect that no longer exists; user_profile's claim that "upcoming MCP profile tools" read the profile, which nothing does; an instance count and instance rule titles in plugin_context; "MILESTONE 323 DECIDED" in rulebooks. - scripts/: check_plugin's header and inline comments were a history of the incidents behind each guard, with issue numbers in two failure messages; check_dangling_styles named this app's classes as its examples; check_design_tokens, measure_duplication and mint_plugin_version cited issues and checklists. - frontend/src: forty-odd comments with four-digit issue numbers that the earlier frontend scan filtered out as hex colours, plus "used to" and "Phase N" notes. Kept: illustrative ids (`#4181` as a bare-id example, `PR #198`), migration Create Date headers and one migration's dated data floor, and the plugin skills' worked examples of how to cite a record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+89
-113
@@ -4,47 +4,35 @@
|
||||
WHY THIS EXISTS. `plugin/` is not built into the Docker image. Installs fetch it
|
||||
from this git repo via `.claude-plugin/marketplace.json`, so a push IS the
|
||||
release for plugin content: no build, no gate, immediately fetchable. Two
|
||||
separate defects have reached a live install through that path:
|
||||
failures reach an install through that path without a sound:
|
||||
|
||||
- #2198 — all four hook scripts were inert (wrong env-var case, line-oriented
|
||||
`jq -rR`, line-oriented `cut -c`). No CI ran, because `plugin/**` wasn't in
|
||||
the workflow's `paths:` filter at all.
|
||||
- #2209 — the fix for #2198 shipped to `main` and still couldn't reach an
|
||||
install, because `plugin.json`'s version wasn't bumped and the installer
|
||||
compares versions to decide whether to refresh its cache.
|
||||
- inert hook scripts (a wrong env-var case, a line-oriented `cut -c`) — so
|
||||
`plugin/**` is in the workflow's `paths:` filter and these checks run on it;
|
||||
- a fix that ships and cannot reach an install, because `plugin.json`'s
|
||||
version did not move and the installer compares versions to decide whether
|
||||
to refresh its cache.
|
||||
|
||||
Both were fixed. The second was fixed TWICE — once by bumping the number, and
|
||||
then properly, by removing the class it came from: `plugin.json`'s version is
|
||||
no longer a value anybody chooses. `scripts/mint_plugin_version.py` derives it
|
||||
from the clock (`make mint-plugin`), and `check_version_is_minted` below fails
|
||||
the lane when shipped content moved and the version did not.
|
||||
`plugin.json`'s version is not a value anybody chooses.
|
||||
`scripts/mint_plugin_version.py` derives it from the clock (`make mint-plugin`),
|
||||
and `check_version_is_minted` below fails the lane when shipped content moved
|
||||
and the version did not.
|
||||
|
||||
State exactly what that did and did not remove, because a rationale that
|
||||
overstates its own control is how the control gets trusted past its limit, and
|
||||
because the paragraph this replaces was itself read that way. Gone: having to
|
||||
remember which NUMBER to write, and the whole question of whether a chosen
|
||||
number was the right one. Not gone: the mint still has to be RUN, and
|
||||
forgetting to run it is still possible. What changed is that forgetting is now
|
||||
LOUD — a red lane on the batch that forgot, instead of a silent no-op found
|
||||
weeks later when somebody says "I don't think it updated" (#2220).
|
||||
What that does and does not remove, stated exactly, because a rationale that
|
||||
overstates its own control is how the control gets trusted past its limit.
|
||||
Gone: choosing which NUMBER to write, and the question of whether a chosen
|
||||
number was the right one. Not gone: the mint still has to be RUN. What the
|
||||
check adds is that forgetting is LOUD — a red lane on the batch that forgot,
|
||||
instead of a silent no-op found weeks later when somebody says "I don't think
|
||||
it updated".
|
||||
|
||||
shellcheck is NOT in `ci-python` (verified against CI-runner's Dockerfile and
|
||||
scripts/install-common.sh, not from memory — rule #37). CI installs it per-job,
|
||||
which is what CI-runner's own docs/process.md prescribes for a dep with a
|
||||
single consumer: "If only one project needs the dep, prefer that project
|
||||
installing it per-job in their workflow — at least until a second consumer
|
||||
arrives." Promotion into the image is filed as an issue there rather than
|
||||
assumed here.
|
||||
shellcheck is NOT in the `ci-python` image; CI installs it per-job, the usual
|
||||
practice for a dependency with a single consumer. It is optional at runtime:
|
||||
without shellcheck the lint step is SKIPPED and says so. A skipped check
|
||||
announces itself loudly, because a check that quietly no-ops is the failure
|
||||
mode this whole file exists to prevent.
|
||||
|
||||
It is optional at runtime: without shellcheck the lint step is SKIPPED and says
|
||||
so. A skipped check announces itself loudly, because a check that quietly
|
||||
no-ops is the failure mode this whole file exists to prevent.
|
||||
|
||||
jq USED TO BE IN THAT SAME SENTENCE, and the smoke tests below skipped
|
||||
themselves without it. Since jq is not in `ci-python` either, that meant three
|
||||
of them announced a skip on every CI run and had never actually run there. The
|
||||
hooks need no jq now (#4107), so those checks run unconditionally — removing a
|
||||
dependency from the product removed a permanent hole in its verification.
|
||||
The hooks need no jq (it is not in `ci-python` either), so the smoke tests
|
||||
below run unconditionally rather than skipping wherever it is absent.
|
||||
|
||||
Usage:
|
||||
python3 scripts/check_plugin.py # all checks
|
||||
@@ -85,7 +73,7 @@ MANIFEST = PLUGIN_DIR / ".claude-plugin" / "plugin.json"
|
||||
|
||||
# ── What ships, and what decides what it says about itself ─────────────────
|
||||
#
|
||||
# ONE definition (#3127 §3, milestone 334 step 2). It has TWO consumers that
|
||||
# ONE definition. It has TWO consumers that
|
||||
# need different granularities, and conflating them is the bug:
|
||||
#
|
||||
# the workflow's `paths:` trigger whole paths should CI run at all?
|
||||
@@ -103,15 +91,14 @@ MANIFEST = PLUGIN_DIR / ".claude-plugin" / "plugin.json"
|
||||
# carries description, mcpServers and userConfig, all of which reach an
|
||||
# install and all of which matter. Excluding the file wholesale would mean a
|
||||
# userConfig-only edit computes an unchanged version and never refreshes —
|
||||
# #2209 again with a narrower trigger.
|
||||
# the unreached fix again, with a narrower trigger.
|
||||
SHIPPED_PATHS = ("plugin", ".claude-plugin")
|
||||
|
||||
# Files that decide what a published artifact SAYS ABOUT ITSELF — kept as a
|
||||
# table so the next artifact is a one-line addition rather than a third
|
||||
# bespoke guard (#3127 §3). The membership test is NOT "is this copied into
|
||||
# the artifact?" but "can changing this file change the published bytes, or
|
||||
# what the artifact says about itself?" — FC learned that twice in four days
|
||||
# (#3156, #3202), and a deriver is never in the COPY list.
|
||||
# bespoke guard. The membership test is NOT "is this copied into the
|
||||
# artifact?" but "can changing this file change the published bytes, or what
|
||||
# the artifact says about itself?" — a deriver is never in the COPY list.
|
||||
#
|
||||
# Note what is absent: a CHECKER does not belong here. Whatever validates a
|
||||
# version decides whether the lane goes red, not what any artifact reports,
|
||||
@@ -119,10 +106,10 @@ SHIPPED_PATHS = ("plugin", ".claude-plugin")
|
||||
# the plugin version is.
|
||||
DERIVERS: dict[str, tuple[str, ...]] = {
|
||||
# The "Generate image tags and version" step computes the server image's
|
||||
# name, ordering key and channel (#3298).
|
||||
# name, ordering key and channel.
|
||||
".forgejo/workflows/ci.yml": ("server-image",),
|
||||
# Decides the plugin's version FORMAT, so it decides what every future
|
||||
# manifest says about itself (milestone 334 step 3).
|
||||
# manifest says about itself.
|
||||
"scripts/mint_plugin_version.py": ("plugin",),
|
||||
}
|
||||
|
||||
@@ -130,7 +117,7 @@ DERIVERS: dict[str, tuple[str, ...]] = {
|
||||
def version_relevant_paths() -> tuple[str, ...]:
|
||||
"""Everything a change to which must produce a NEW plugin version.
|
||||
|
||||
Wider than `SHIPPED_PATHS`, and #3127 §3's asymmetry is why it has to be:
|
||||
Wider than `SHIPPED_PATHS`, and this asymmetry is why it has to be:
|
||||
|
||||
A change to how the VERSION is computed is compared against nothing at
|
||||
all. Left out, the published artifact goes on reporting the OLD value
|
||||
@@ -140,7 +127,7 @@ def version_relevant_paths() -> tuple[str, ...]:
|
||||
and a diff over the shipped paths alone reports "no content change, the
|
||||
version need not move". The manifest then keeps a value in the old format
|
||||
forever and nothing ever says so. The mint script reaches no install and
|
||||
belongs here anyway; that is #3156's exact shape.
|
||||
belongs here anyway.
|
||||
|
||||
A CHECKER is deliberately not here. Whatever validates the version decides
|
||||
whether the lane goes red, not what any artifact reports — so this file is
|
||||
@@ -165,7 +152,7 @@ def ok(msg: str) -> None:
|
||||
|
||||
def skip(msg: str) -> None:
|
||||
# Loud on purpose. A check that quietly does nothing is indistinguishable
|
||||
# from a check that passed — the exact confusion that let #2198 survive.
|
||||
# from a check that passed.
|
||||
print(f"SKIP {msg}")
|
||||
|
||||
|
||||
@@ -191,7 +178,7 @@ def check_syntax() -> None:
|
||||
# --- known-bad patterns ----------------------------------------------------
|
||||
|
||||
# Each entry: (compiled pattern, short label, why it's wrong).
|
||||
# These are the exact classes from #2198. They are deliberately specific — a
|
||||
# These are the classes that make a hook inert. They are deliberately specific — a
|
||||
# broad shell linter belongs in the image, not hand-rolled here.
|
||||
PATTERNS: list[tuple[re.Pattern, str, str]] = [
|
||||
(
|
||||
@@ -202,15 +189,11 @@ PATTERNS: list[tuple[re.Pattern, str, str]] = [
|
||||
"hook then does nothing, silently.",
|
||||
),
|
||||
(
|
||||
# NEITHER OF THESE MAY COME BACK (#4107). This replaced a narrower rule
|
||||
# about `jq -R` being line-oriented, which is now moot in the only way
|
||||
# that rule could become moot: there is no jq left to pass flags to.
|
||||
#
|
||||
# The wider rule is the one worth having. jq is absent by default on
|
||||
# NEITHER OF THESE BELONGS IN A HOOK. jq is absent by default on
|
||||
# macOS, on the Debian/Ubuntu slim images, on Alpine and in most CI
|
||||
# containers; `tac` is GNU-only and absent on macOS. Every hook used to
|
||||
# guard itself with `command -v jq || exit 0`, so a machine without it
|
||||
# got no context, no rules, no prior art and no process sync, silently —
|
||||
# containers; `tac` is GNU-only and absent on macOS. A hook that guards
|
||||
# itself with `command -v jq || exit 0` gives a machine without it no
|
||||
# context, no rules, no prior art and no process sync, silently —
|
||||
# `exit 0` is indistinguishable from "nothing to say". A hook may use
|
||||
# only what POSIX guarantees; scribe_defs.sh has the readers.
|
||||
re.compile(r"(?<![\w./-])(jq|tac)(?![\w./-])"),
|
||||
@@ -219,15 +202,15 @@ PATTERNS: list[tuple[re.Pattern, str, str]] = [
|
||||
"by default anywhere the plugin is likely to land, and tac is GNU-only. "
|
||||
"Read JSON with scribe_json_flat / _pick / _list / _len, write it with "
|
||||
"scribe_json_out, encode with scribe_urlenc; to take the LAST match of "
|
||||
"a filter, pipe to `tail -1` instead of reversing with tac (#4107).",
|
||||
"a filter, pipe to `tail -1` instead of reversing with tac.",
|
||||
),
|
||||
(
|
||||
# `$(producer | head -N) || var=""` — the fallback OUTSIDE the
|
||||
# substitution (#4042). Every hook runs under `pipefail`; once `head`
|
||||
# substitution. Every hook runs under `pipefail`; once `head`
|
||||
# (or `grep -m`/`-q`) has what it needs it exits, a producer still
|
||||
# writing dies of SIGPIPE, the substitution fails, and the fallback
|
||||
# wipes the output that was already captured. Silent, and only on big
|
||||
# inputs — which for the duplicate arm meant the most-duplicated names.
|
||||
# inputs — which for the duplicate arm means the most-duplicated names.
|
||||
re.compile(r"\|\s*(?:head\b|grep\s+-[A-Za-z]*[mq])[^)]*\)\s*\|\|\s*\w+=\"\""),
|
||||
"early-exit consumer with the fallback outside the substitution",
|
||||
"Under pipefail, `$(x | head -N) || v=\"\"` discards head's output whenever x "
|
||||
@@ -298,7 +281,7 @@ def check_shellcheck() -> None:
|
||||
# always emits a static behavioural floor that needs no credentials and no
|
||||
# network, so "silent" would be the wrong assertion for it.
|
||||
#
|
||||
# UNREACHABLE is different for the two write-path hooks since #2932: a call
|
||||
# UNREACHABLE is different for the two write-path hooks: a call
|
||||
# that was owed and did not come back is SAID, once per outage ("> Scribe did
|
||||
# not answer …"), so a session can tell "checked, nothing there" from "never
|
||||
# checked". That line — or silence, when the once-per-outage marker in
|
||||
@@ -306,19 +289,17 @@ def check_shellcheck() -> None:
|
||||
# is the only output allowed with no working instance; anything else is a hook
|
||||
# speaking on data it cannot have.
|
||||
#
|
||||
# This is the contract that made #2198 invisible for weeks, so it is worth
|
||||
# pinning: the bug and the healthy no-results case looked identical from
|
||||
# outside. #2932 is what finally makes the failure visible at the write; this
|
||||
# check makes sure the fail-open behaviour stays deliberate rather than
|
||||
# accidental.
|
||||
# The contract is worth pinning because an inert hook and the healthy
|
||||
# no-results case look identical from outside. The outage line makes the
|
||||
# failure visible at the write; this check makes sure the fail-open behaviour
|
||||
# stays deliberate rather than accidental.
|
||||
# A symbol that exists nowhere, ASSEMBLED rather than written literally.
|
||||
# The prior-art hook's local arm (#2280) fires with no credentials, so the
|
||||
# silence assertion below needs a name the repo genuinely lacks. Two traps,
|
||||
# both hit while writing this:
|
||||
# - `def f` matched real code, so the hook spoke and "silent" was asserting
|
||||
# the wrong thing;
|
||||
# - spelling the replacement out in full put `def <name>(` INTO this file,
|
||||
# so the smoke event defined the very symbol it claimed was absent.
|
||||
# The prior-art hook's local arm fires with no credentials, so the silence
|
||||
# assertion below needs a name the repo genuinely lacks. Two traps:
|
||||
# - a short name like `def f` matches real code, so the hook speaks and
|
||||
# "silent" asserts the wrong thing;
|
||||
# - spelling the replacement out in full puts `def <name>(` INTO this file,
|
||||
# so the smoke event defines the very symbol it claims is absent.
|
||||
# Concatenating keeps the contiguous string out of the source.
|
||||
_ABSENT_SYM = "zz" + "_absent_" + "9f3a2b"
|
||||
|
||||
@@ -331,7 +312,7 @@ SMOKE_EVENTS: dict[str, str] = {
|
||||
"tool_input": {"file_path": "src/x.py",
|
||||
"new_string": f"def {_ABSENT_SYM}():\n pass\n"}}
|
||||
),
|
||||
# The pre-tool rule arm (#3476). A real Bash call, and one whose whole
|
||||
# The pre-tool rule arm. A real Bash call, and one whose whole
|
||||
# point is that it looks harmless: reaching for curl against the forge API
|
||||
# is the reflex the arm exists to catch. With no instance it must stay
|
||||
# SILENT — it is deliberately not an OUTAGE_SPEAKER, because a Bash call is
|
||||
@@ -341,7 +322,7 @@ SMOKE_EVENTS: dict[str, str] = {
|
||||
{"session_id": "smoke", "cwd": ".", "tool_name": "Bash",
|
||||
"tool_input": {"command": "curl -s https://example.invalid/api/v1/runs"}}
|
||||
),
|
||||
# The moment arm (milestone 458). A command the shipped mappings send to
|
||||
# The moment arm. A command the shipped mappings send to
|
||||
# work.deliver, so a configured run reaches the moment-tools fetch and the
|
||||
# moment request; with no instance both fail and it must stay SILENT,
|
||||
# since it fires before every call that can reach a mounted rule.
|
||||
@@ -351,7 +332,7 @@ SMOKE_EVENTS: dict[str, str] = {
|
||||
),
|
||||
"scribe_sync_processes.sh": json.dumps({"source": "startup"}),
|
||||
"scribe_session_context.sh": json.dumps({"source": "startup"}),
|
||||
# The after-write hook (#2901) diffs the working tree; on CI's clean
|
||||
# The after-write hook diffs the working tree; on CI's clean
|
||||
# checkout there is nothing to report, so silence is the right assertion.
|
||||
# (On a dirty local tree with a definition just written it may speak —
|
||||
# that is the hook working, not a failure of the contract.)
|
||||
@@ -359,27 +340,27 @@ SMOKE_EVENTS: dict[str, str] = {
|
||||
{"session_id": "smoke", "cwd": ".", "tool_name": "Bash",
|
||||
"tool_input": {"command": "true"}, "tool_response": {}}
|
||||
),
|
||||
# The Stop-hook report check (milestone 409 step 5). A transcript that does
|
||||
# The Stop-hook report check. A transcript that does
|
||||
# not exist is the smoke case: nothing to read, so it must stay silent and
|
||||
# never block, configured or not.
|
||||
"scribe_report_check.sh": json.dumps(
|
||||
{"session_id": "smoke", "transcript_path": "/nonexistent/smoke.jsonl",
|
||||
"cwd": ".", "hook_event_name": "Stop", "stop_hook_active": False}
|
||||
),
|
||||
# The reply moment (milestone 458). No transcript, so no reply: silent and
|
||||
# The reply moment. No transcript, so no reply: silent and
|
||||
# never a block, configured or not.
|
||||
"scribe_reply_check.sh": json.dumps(
|
||||
{"session_id": "smoke", "transcript_path": "/nonexistent/smoke.jsonl",
|
||||
"cwd": ".", "hook_event_name": "Stop", "stop_hook_active": False}
|
||||
),
|
||||
# The end-of-turn shape check (milestone 439). With no ledger for the
|
||||
# The end-of-turn shape check. With no ledger for the
|
||||
# session there is nothing to ask about, and with no instance there is
|
||||
# nobody to ask: silent, and never a block, configured or not.
|
||||
"scribe_shape_check.sh": json.dumps(
|
||||
{"session_id": "smoke", "transcript_path": "/nonexistent/smoke.jsonl",
|
||||
"cwd": ".", "hook_event_name": "Stop", "stop_hook_active": False}
|
||||
),
|
||||
# The PreCompact preserver (#3680). Its whole contract is the inverse of
|
||||
# The PreCompact preserver. Its whole contract is the inverse of
|
||||
# every other hook's: it must exit 0 AND print, because stdout is what
|
||||
# becomes the summarizer's custom instructions. A silent success here is
|
||||
# the failure mode, and it would look like every other hook's success.
|
||||
@@ -387,7 +368,7 @@ SMOKE_EVENTS: dict[str, str] = {
|
||||
{"session_id": "smoke", "cwd": ".", "hook_event_name": "PreCompact",
|
||||
"trigger": "manual", "custom_instructions": None}
|
||||
),
|
||||
# The opened-ledger recorder (#4100). It writes to TMPDIR and prints
|
||||
# The opened-ledger recorder. It writes to TMPDIR and prints
|
||||
# nothing — a PostToolUse hook that emitted output would put a line in
|
||||
# front of every get_rule call, which is the opposite of its purpose. The
|
||||
# smoke case is a well-formed open: it must exit 0 and stay silent.
|
||||
@@ -396,18 +377,17 @@ SMOKE_EVENTS: dict[str, str] = {
|
||||
"tool_name": "mcp__scribe__get_rule", "tool_input": {"rule_id": 1},
|
||||
"tool_response": {}}
|
||||
),
|
||||
# The acted-ledger recorder (#4216). Same shape and same reasoning as its
|
||||
# sibling above: TMPDIR only, and silent, because a PostToolUse hook that
|
||||
# spoke would put a line after every rule_outcome call and turn recording
|
||||
# an outcome into something with a cost. A skip here would have left the
|
||||
# newest of the three ledgers as the only hook the lane never runs.
|
||||
# The acted-ledger recorder. Same shape and same reasoning as its sibling
|
||||
# above: TMPDIR only, and silent, because a PostToolUse hook that spoke
|
||||
# would put a line after every rule_outcome call and turn recording an
|
||||
# outcome into something with a cost.
|
||||
"scribe_record_outcome.sh": json.dumps(
|
||||
{"session_id": "smoke", "cwd": ".",
|
||||
"tool_name": "mcp__scribe__rule_outcome",
|
||||
"tool_input": {"rule_id": 1, "outcome": "applied"},
|
||||
"tool_response": {}}
|
||||
),
|
||||
# The claim-session binder (milestone 381). Silent like the ledgers above —
|
||||
# The claim-session binder. Silent like the ledgers above —
|
||||
# a PostToolUse hook that spoke would add a line after every task write —
|
||||
# and with no instance configured it must exit before reaching for one.
|
||||
"scribe_claim_session.sh": json.dumps(
|
||||
@@ -416,7 +396,7 @@ SMOKE_EVENTS: dict[str, str] = {
|
||||
"tool_input": {"task_id": 1, "content": "smoke"},
|
||||
"tool_response": {}}
|
||||
),
|
||||
# The SessionEnd claim release (milestone 381 step 4). Silent: nobody reads
|
||||
# The SessionEnd claim release. Silent: nobody reads
|
||||
# a SessionEnd hook's output, and with no instance it must exit first.
|
||||
"scribe_session_end.sh": json.dumps(
|
||||
{"session_id": "smoke", "cwd": ".", "hook_event_name": "SessionEnd",
|
||||
@@ -435,14 +415,14 @@ STATIC_EMITTERS = {
|
||||
# The two-tier SessionStart design: the bundled static tier ships whatever
|
||||
# the instance does, and that floor is the whole point of the split.
|
||||
"scribe_session_context.sh": "static floor present",
|
||||
# PreCompact's contract is INVERTED (#3680). Its stdout becomes the
|
||||
# PreCompact's contract is INVERTED. Its stdout becomes the
|
||||
# summarizer's custom instructions, and what must survive a summary is
|
||||
# known without asking anything — so it needs no instance, and silence is
|
||||
# the failure mode rather than the success one. Read as a generic hook it
|
||||
# would look like a leak; it is the opposite.
|
||||
"scribe_precompact_preserve.sh": "preservation instructions present",
|
||||
}
|
||||
# The hooks that say so when a configured instance does not answer (#2932).
|
||||
# The hooks that say so when a configured instance does not answer.
|
||||
OUTAGE_SPEAKERS = {"scribe_prior_art.sh", "scribe_after_write.sh"}
|
||||
OUTAGE_LINE = "> Scribe did not answer the prior-art check"
|
||||
|
||||
@@ -458,13 +438,9 @@ def _run_hook(script: Path, event: str, env_extra: dict[str, str]) -> subprocess
|
||||
|
||||
|
||||
def check_fail_open() -> None:
|
||||
# No jq gate any more (#4107). This check used to skip itself when jq was
|
||||
# missing, because without it every hook bailed at line 1 and the check
|
||||
# would have passed while exercising nothing. jq is NOT in `ci-python`, so
|
||||
# what that actually meant is that this smoke test announced a skip on
|
||||
# every CI run and never once ran there. The hooks now need only POSIX
|
||||
# tools, so it runs everywhere — which is the point of the change it is
|
||||
# testing.
|
||||
# No jq gate: the hooks need only POSIX tools, so this runs everywhere,
|
||||
# CI's `ci-python` image included. A gate on a tool the image lacks would
|
||||
# announce a skip on every run and never exercise the hooks there.
|
||||
scenarios = [
|
||||
("unconfigured", {}),
|
||||
# Connection refused immediately — exercises the unreachable-instance
|
||||
@@ -514,7 +490,7 @@ def check_fail_open() -> None:
|
||||
|
||||
|
||||
def check_local_prior_art_needs_no_instance() -> None:
|
||||
"""The prior-art hook's local arm must answer with no credentials (#2280).
|
||||
"""The prior-art hook's local arm must answer with no credentials.
|
||||
|
||||
The other arms ask Scribe what was RECORDED. This one asks the repo what
|
||||
EXISTS, which needs no instance — and that is the whole reason it catches
|
||||
@@ -562,8 +538,8 @@ def check_session_context_reports_its_version() -> None:
|
||||
pulls on its own, while the CACHE is what executes and refreshes only when
|
||||
the manifest version changes. So a shipped fix can sit unreached while
|
||||
inspecting the clone shows it present — the obvious debugging move
|
||||
misleads, and twice the only detector was a human saying "I don't think it
|
||||
updated" (#2209, #2220).
|
||||
misleads, and otherwise the only detector is a human saying "I don't think
|
||||
it updated".
|
||||
|
||||
Asserted WITHOUT credentials on purpose. The state most needing diagnosis
|
||||
is the one where the token never arrives, and a marker that vanished there
|
||||
@@ -643,8 +619,8 @@ def manifest_differs_beyond_version(a: str | None, b: str | None) -> bool:
|
||||
or mcpServers-only edit demanding a new version.
|
||||
|
||||
Unreadable input answers True. The conservative direction is "demand a new
|
||||
version": a spurious bump costs one cache refresh, while a missed one is
|
||||
#2209 — the fix reaches the repo and stops there.
|
||||
version": a spurious bump costs one cache refresh, while a missed one means
|
||||
the fix reaches the repo and stops there.
|
||||
"""
|
||||
def without_version(text: str | None):
|
||||
if text is None:
|
||||
@@ -667,8 +643,8 @@ def shipped_content_changed(base: str) -> tuple[bool | None, list[str]]:
|
||||
"""Has anything that REACHES AN INSTALL changed against `base`?
|
||||
|
||||
Returns `(changed, paths)`. `changed` is **None** when the question could
|
||||
not be answered — a caller must never read that as "no", which is the
|
||||
distinction #2663 cost weeks of zeroed telemetry to learn.
|
||||
not be answered — a caller must never read that as "no": an unanswered
|
||||
question read as "nothing changed" is a failure that reports success.
|
||||
|
||||
The manifest is special-cased, not excluded: if it is the ONLY thing that
|
||||
moved and the only difference is `version`, nothing that reaches an
|
||||
@@ -693,17 +669,17 @@ def shipped_content_changed(base: str) -> tuple[bool | None, list[str]]:
|
||||
|
||||
|
||||
def check_version_is_minted(base: str = "origin/main") -> None:
|
||||
"""THE control (#3127 checklist 4), replacing "somebody remembers".
|
||||
"""THE control, replacing "somebody remembers".
|
||||
|
||||
The checklist asks, of any hand-set component: *say what happens the
|
||||
release somebody forgets it.* This is the answer — the lane goes red,
|
||||
deterministically, because CI can compute whether the value should have
|
||||
moved. Its predecessor could only ask "did the number move at all", which
|
||||
any bump satisfied and which therefore proved nothing.
|
||||
moved. Asking only "did the number move at all" would be satisfied by any
|
||||
bump and would therefore prove nothing.
|
||||
|
||||
Four verdicts:
|
||||
|
||||
content changed, version did not FAIL — this is #2209, exactly
|
||||
content changed, version did not FAIL — the fix would not reach an install
|
||||
version not in canonical shape FAIL — see below
|
||||
version implausibly in the future FAIL — a bad clock or a hand-edit
|
||||
version moved, content did not pass, and say so
|
||||
@@ -718,10 +694,10 @@ def check_version_is_minted(base: str = "origin/main") -> None:
|
||||
A malformed version is worth failing on even though the installer would
|
||||
accept it. `K4` returns the manifest string verbatim, and `H == "unknown"`
|
||||
sets `forceOverwrite`, so a broken value either sorts as a normal string
|
||||
or reinstalls the plugin every single session (#3325). Neither is loud.
|
||||
or reinstalls the plugin every single session. Neither is loud.
|
||||
|
||||
Stated against the BASE BRANCH rather than the last commit, as its
|
||||
predecessor was: a per-commit rule would demand a fresh mint from every
|
||||
Stated against the BASE BRANCH rather than the last commit: a per-commit
|
||||
rule would demand a fresh mint from every
|
||||
commit in a batch, when what matters is that whatever reaches an install
|
||||
differs from what is cached. One mint per batch, which is also how a person
|
||||
would do it.
|
||||
@@ -745,8 +721,8 @@ def check_version_is_minted(base: str = "origin/main") -> None:
|
||||
if not VERSION_RE.match(here):
|
||||
fail(
|
||||
f"the manifest version is {here!r}, which is not YYYY.MM.DD.HHMM.\n"
|
||||
f" One shape for every version in the family (#3127 checklist "
|
||||
f"10), zero-padded so the midnight case renders 2026.01.05.0000.\n"
|
||||
f" One shape for every version in the family, zero-padded so "
|
||||
f"the midnight case renders 2026.01.05.0000.\n"
|
||||
f" Run `make mint-plugin`."
|
||||
)
|
||||
return
|
||||
@@ -780,7 +756,7 @@ def check_version_is_minted(base: str = "origin/main") -> None:
|
||||
f" The installer decides whether to refresh its cache by "
|
||||
f"comparing this string, so an unchanged version means these edits "
|
||||
f"reach the repo and stop there — the marketplace clone updates, the "
|
||||
f"cache that actually executes does not (#2209, #1040, #2220).\n"
|
||||
f"cache that actually executes does not.\n"
|
||||
f" Run `make mint-plugin`.\n"
|
||||
f" Changed:\n {files}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user