docs(6209): twelve more test files say which behaviour they pin
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / TypeScript typecheck (push) Successful in 52s
CI & Build / integration (push) Successful in 1m12s
CI & Build / Python tests (push) Successful in 1m53s
CI & Build / Build & push image (push) Successful in 12s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / TypeScript typecheck (push) Successful in 52s
CI & Build / integration (push) Successful in 1m12s
CI & Build / Python tests (push) Successful in 1m53s
CI & Build / Build & push image (push) Successful in 12s
shape ledger, MCP projects/search/rulebooks tools, backup, chunking, plugin context, derived mirror, rule band, shape form gate, plugin version mint and note usage tests drop issue, milestone and rule numbers, dates and one-install figures from docstrings, comments and messages. Three shape-form-gate test names that told the discovery story now name the property: a registry module's helpers are not service functions, the divergence gate silences only a family contradiction, and callable helpers beside a callable canon still prompt. The rulebook tool-count comment that logged each milestone's additions is replaced by the reason it is a count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""The plugin's version is MINTED, and CI is the control that it moved.
|
||||
|
||||
WHAT THIS IS ABOUT (milestone 334 step 3). `plugin/` ships straight from this
|
||||
WHAT THIS IS ABOUT. `plugin/` ships straight from this
|
||||
git repo — no build step, so no moment at which CI could stamp a version in.
|
||||
The value is therefore minted by a script before the commit, and CI's job is
|
||||
not to produce it but to prove it moved when it had to.
|
||||
@@ -11,15 +11,15 @@ from different clocks, on purpose:
|
||||
server image name from COMMIT time, ordering key from BUILD time
|
||||
plugin one value, from MINT time
|
||||
|
||||
#3127 §2 prescribes commit time so two lanes building one source report one
|
||||
The server uses commit time so two lanes building one source report one
|
||||
string. The plugin has one lane and no build, so that reason does not reach
|
||||
it. "Let's make these consistent" is the obvious tidy-up and it breaks
|
||||
whichever artifact loses — which is why the difference is pinned here rather
|
||||
than only explained in a comment.
|
||||
|
||||
The trade mint time makes — you cannot recompute the value from history, only
|
||||
verify it moved — is acceptable ONLY because #3325 established that the
|
||||
installer's refresh test is `===` with no ordering anywhere. Where a
|
||||
verify it moved — is acceptable ONLY because the installer's refresh test
|
||||
is `===` with no ordering anywhere. Where a
|
||||
comparator orders, an unreproducible version would be unverifiable too.
|
||||
"""
|
||||
import ast
|
||||
@@ -57,7 +57,7 @@ def fake_manifest(version: str = "2026.09.01.2252") -> str:
|
||||
|
||||
|
||||
@pytest.mark.parametrize("when,expected", [
|
||||
# THE midnight case, which #3127 checklist 10 names by hand. An unpadded
|
||||
# THE midnight case. An unpadded
|
||||
# `%-H%M` renders this hour as `0` and silently shortens the string.
|
||||
(datetime(2026, 1, 5, 0, 0, tzinfo=timezone.utc), "2026.01.05.0000"),
|
||||
(datetime(2026, 1, 5, 0, 9, tzinfo=timezone.utc), "2026.01.05.0009"),
|
||||
@@ -150,7 +150,7 @@ def test_the_rewrite_refuses_TWO_version_lines():
|
||||
|
||||
|
||||
def test_the_mint_script_is_version_relevant():
|
||||
"""#3127 §3's asymmetry. A change to how the version is COMPUTED is
|
||||
"""The deriver's asymmetry. A change to how the version is COMPUTED is
|
||||
compared against nothing — leave the deriver out of the set and a format
|
||||
change never forces a re-mint, so the manifest keeps a value in the old
|
||||
format indefinitely and nothing says so."""
|
||||
@@ -189,7 +189,7 @@ def run_check(here: str, there: str | None, changed_paths: list[str], monkeypatc
|
||||
|
||||
|
||||
def test_content_changed_and_the_version_did_not_FAILS(monkeypatch):
|
||||
"""#2209, exactly. The headline, and the only reason the check exists."""
|
||||
"""The headline, and the only reason the check exists."""
|
||||
failures = run_check(
|
||||
"2026.09.01.2252", "2026.09.01.2252",
|
||||
["plugin/hooks/scribe_session_context.sh"], monkeypatch,
|
||||
@@ -209,7 +209,7 @@ def test_content_changed_and_the_version_moved_PASSES(monkeypatch):
|
||||
def test_a_version_that_is_not_the_canonical_shape_FAILS(monkeypatch):
|
||||
"""`K4` returns the manifest string verbatim, so a malformed value is not
|
||||
rejected by the installer — it either sorts as an ordinary string or, when
|
||||
unreadable, forces a reinstall every session. Neither is loud (#3325)."""
|
||||
unreadable, forces a reinstall every session. Neither is loud."""
|
||||
failures = run_check("0.1.48", "0.1.47", [], monkeypatch)
|
||||
assert len(failures) == 1
|
||||
assert "not YYYY.MM.DD.HHMM" in failures[0]
|
||||
@@ -218,7 +218,7 @@ def test_a_version_that_is_not_the_canonical_shape_FAILS(monkeypatch):
|
||||
@pytest.mark.parametrize("bad", ["2026.9.1.2252", "2026.09.01.252", "2026.09.01"])
|
||||
def test_an_UNPADDED_or_short_version_FAILS(bad, monkeypatch):
|
||||
"""The padding is the contract, not cosmetics — one shape for every version
|
||||
in the family (#3127 checklist 10)."""
|
||||
in the family."""
|
||||
assert run_check(bad, "2026.08.30.1200", [], monkeypatch) != []
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ def test_a_version_that_moved_with_no_content_change_is_NOT_a_failure(monkeypatc
|
||||
|
||||
def test_a_failed_diff_FAILS_rather_than_passing_quietly(monkeypatch):
|
||||
"""A check that cannot run must not report the same thing as a check that
|
||||
passed — #2663's lesson, and the reason this file's siblings exist.
|
||||
passed.
|
||||
|
||||
`rev-parse` is stubbed to SUCCEED so only the diff fails. Failing every git
|
||||
call would trip the base-branch guard first and this would pass while
|
||||
@@ -280,13 +280,8 @@ def test_the_shipped_manifest_carries_a_minted_version():
|
||||
|
||||
|
||||
def test_the_session_context_hook_still_reads_the_version_field():
|
||||
"""The marker #2220 asked for. The value's SHAPE changed, not the field or
|
||||
its reader — if this had to move, the derivation went somewhere it should
|
||||
not have.
|
||||
|
||||
The READER changed once, in #4107: `jq -r '.version'` became
|
||||
`scribe_json_pick ... '.version'` when the hooks stopped depending on jq.
|
||||
What this pins is unchanged — that the hook still reads `.version` out of
|
||||
the manifest rather than deriving the string some other way."""
|
||||
"""The hook reads `.version` out of the manifest rather than deriving the
|
||||
string some other way — if this has to move, the derivation went
|
||||
somewhere it should not have."""
|
||||
hook = (check_plugin.HOOKS_DIR / "scribe_session_context.sh").read_text()
|
||||
assert re.search(r"scribe_json_pick[^\n]*'\.version'", hook)
|
||||
|
||||
Reference in New Issue
Block a user