test(sdk): the pin was a permission, so give the premises a proof
The guard checked whether the installed SDK satisfied the pin. Nobody had ever checked whether anyone had READ it. Those are different questions, and the gap between them was a whole version range: pinned >=0.2.111,<0.3, premises source-verified through 0.2.110, installed 0.2.120. Every build in between was admissible and unexamined — `uv sync --upgrade` would have kept 806 tests green on an SDK no one had opened. Written red first: a guard handed 0.2.140 returned it without complaint. _VERIFIED_THROUGH is the ratchet. It records the newest build actually read at source, and a newer one fails naming the five premises to re-check. The pin is untouched and was never the defect — measurement dissolved the premise that it needed lifting. It was not too narrow but too wide, and a wider permission is not repaired by widening it further. The premises themselves were prose the failure message recited. Nothing tested them, so one that stopped being true would have surfaced on the one live paid run (S10, D6). They are now a table introspected against the installed package, with the printed prose derived from that same table so a checked attribute cannot go unreported or a reported one unchecked. The premise introspection structurally cannot see — that query() yields an AssistantMessage then a closing ResultMessage — is named apart, and is the honest reason the human reading still has to happen. Value-proved, not merely named: disabling the ratchet reds 1 test, stubbing the inventory to "no gaps" reds 3, re-hardcoding the prose reds 1, and lowering _VERIFIED_THROUGH below the installed build reds the real installed-version test rather than only a monkeypatched one. 0.2.139 read at source (0.2.120 -> 0.2.139, latest on PyPI today; STATE said 0.2.134, measured 08-09 and stale). The public query.py is byte-identical, every premise field keeps its type and default, and the parser changes are additive. One needed a look: 0.2.139 added a skills path defaulting setting_sources to ["user", "project"], which would have undone the S10 isolation fix — it fires only on None, so the explicit [] is out of reach. Prose carrying stale version claims moved with the reading, never ahead of it: each was re-verified at 0.2.139 before being restated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014dKDjVG7qrBh9NkAAxutqN
This commit is contained in:
parent
0b69354c74
commit
90a41774fc
8 changed files with 271 additions and 38 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
The S10 live run leaked the operator's Claude Code configuration into every
|
||||
spawned CLI session: ``ClaudeAgentOptions.setting_sources`` defaults to
|
||||
``None``, which loads ALL filesystem settings (verified against SDK 0.2.110)
|
||||
``None``, which loads ALL filesystem settings (verified against SDK 0.2.139)
|
||||
— session-start hooks injected STATE.md into the model's context, every reply
|
||||
opened with a mandated confirmation line (so a reply was NEVER pure JSON),
|
||||
and each call paid ~10-15k uncached context tokens. ``[]`` is the SDK's
|
||||
|
|
@ -49,11 +49,13 @@ class TestBuildCallOptions:
|
|||
def test_the_system_prompt_is_not_the_claude_code_preset(self) -> None:
|
||||
# Pins the OPTION value against the Claude Code preset. That None
|
||||
# reaches the spawned CLI as --system-prompt "" was verified by
|
||||
# READING subprocess_cli.py (0.2.110–0.2.120) — this test does NOT
|
||||
# READING subprocess_cli.py (0.2.110–0.2.139, re-read at 0.2.139:
|
||||
# `system_prompt is None` still serializes to `--system-prompt ""`)
|
||||
# — this test does NOT
|
||||
# bind that transport serialization; doing so would couple the suite
|
||||
# to SDK-private API (the F11 fragility this repo retired).
|
||||
#
|
||||
# HONEST LIMIT (measured, 0.2.120): `system_prompt=None` is NOT
|
||||
# HONEST LIMIT (measured, re-measured at 0.2.139): `system_prompt=None` is NOT
|
||||
# distinguishable from leaving the field untouched — the SDK default
|
||||
# is None too, so deleting `system_prompt=None` from build_call_options
|
||||
# left the old `is None` assertion GREEN. It pinned the SDK's default,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue