Repository navigation
chore(memory): the assert-or-label rule, and the gate/cache split - #506
Merged
Merged
Conversation
Two entries from the tool-verification arc (#500, #501, #503), both reasoning that git records only as an outcome. - decision: a command that reports a fact must assert it against a declaration, or label the output unknown/skip with the reason. The measured defect was a verdict that referred to something other than the measurement — a `latest` pin whose green meant "answered --version", a lock whose green meant "a key with that name exists", and an identity printed with no verdict at all, which makes the reader supply one. Generalises to anything whose completeness depends on the caller's authority or on a lookup that may not have run. - convention: a gate never calls the network. It reads a cache; an explicit command fills it; a cold cache says so. This is the resolution of no-false-green versus the-gate-must-be-fast, and it is what #503's role lookups should reuse rather than build a second time. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
✅ Docker image built successfully
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two appends to the curated shared tier (
.kit/shared/memory.jsonl) from the tool-verification arc —2ca60e(decision) and15128e(convention), areacli.Why these two
Both are the reasoning behind #500 / #501 / #503, and the diffs of those PRs record the mechanism rather than the argument.
2ca60e— report a fact ⇒ assert it, or label the output. kit makes three kinds of statement: a measurement (vercel 53.1.1), an assertion (matches what the repo declared), and a verdict (✓). Every defect in the arc was a verdict that referred to something other than the measurement, while the reader took them as the same thing:✓actually meantlatestpin--versioncli-lock.jsonTwo branches, both required: compare against a declaration when you can (
git.emailandgcloud.accountalready did;vercel.userdid not, which was the gap), and labelunknown/skipwith the reason when you cannot. Unknown is not failure — unknown must be visible, and kit already has the vocabulary.It generalises past versions: anything whose completeness depends on the caller's authority or on a lookup that may not have run — a scanner without a token, a registry offline, a listing filtered by a role, and a verdict whose oracle can only see one working tree (#470, the same defect one level up).
15128e— a gate never calls the network. This is the resolution of a genuine conflict between two of kit's own rules: no false green wants verification against the registry; the gate must stay fast and offline-safe wants no outbound call. A gate that calls out becomes slow, flaky, skipped, and false-green the moment a call fails and the code shrugs.The design splits who fills the cache from who reads it: an explicit user-initiated command fills (
kit tools list --latest), the gate reads only and printsnot looked up yet — run …when it is cold. Two details carry the honesty: a failed lookup is not cached (a flaky network must not become a day-long policy), and air-gap gets a different reason string from cache-cold, because "we did not call" and "we have not looked yet" are different facts for the reader.Written down because the next verification that wants to live in a gate should answer three questions instead of one — who fills, who reads, what do we say when it is cold — and because #503's deferred role lookups are supposed to reuse this rather than grow a second version of it.
Verification
kit memory verify→ 36 entries, 36 trusted, 0 bad-sig, 0 untrusted, 0 unsigned2 insertions(+))🤖 Generated with Claude Code