Repository navigation
Conversation
Section 'The probe that fits the claim' covers instrument selection but not instrument integrity: a correctly-chosen probe whose capture path cannot carry the signal reports silence, and silence reads as pass. Adds one anti-pattern bullet and a '### The instrument must be able to report failure' subsection with a WRONG/RIGHT pair for the common shape, a truncated subprocess stderr where the runtime's source preamble occupies the head and the cause sits at the tail. The check reduces to one question: would this field differ if the cause were different? Frontmatter (version, last_updated, last_updated_by) left untouched, since the pai-freshness-v1 fields and the release version look maintainer-owned. Doc-only; no code, schema, hook or test surface touched.
Owner
|
Thanks @garthsch. The gap you named is real: the doctrine covered choosing the right probe but never asked whether the probe's record can differ between two failures. Your section is in |
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.
TestingDoctrine.md§ The probe that fits the claim covers instrument selection:bun teston a DOM claim is the wrong instrument, and the claim "would close on evidence that doesn't actually test it." It does not cover instrument integrity — a correctly-chosen probe whose capture path is structurally incapable of carrying the signal. That path reports silence on every failure, and silence reads as pass. Nothing in the doctrine or the anti-pattern list asks whether the recorded evidence can vary.The common shape is a truncated subprocess
stderr. A child that throws emits the runtime's source preamble first, sostderr.slice(0, N)keeps the same text on every failure while the cause sits at the tail. Each decision is individually reasonable — throw on error, include stderr in the message, bound the stored string — and they compose into total diagnostic loss with no symptom.What it cost on one install: a nightly pipeline recorded 20 consecutive failures across two nights whose stored
last_errorheld the failing function's own TypeScript source lines instead of the error. The failures were transient, so re-running by hand succeeded and the real cause is now unrecoverable for all 20. Worse than the lost week: a status report attributed causes drawn partly from that empty channel before anyone checked whether the channel worked. The bug was in the capture, but the expensive mistake was reading its output as data.Changes (docs only, no behavior change)
### The instrument must be able to report failuresubsection: the failure shape, a WRONG/RIGHT pair for the truncated-stderr case, and the check reduced to one question — would this field differ if the cause were different? Run the probe against a second, known-different failure and compare the stored text.skills/Hardening) asks whether a test would fail if the code were wrong, this asks whether a record would differ if the cause were different; and it names itself the evidence-side companion to Rule 11, where a test must produce the edge rather than hand-write the state.Deliberately not touched
No enforcement, no hook, no runtime gate — this is doctrine prose and one anti-pattern row, consistent with the Algorithm being prompt-driven by design. Rules 1-12 are unchanged. No code, schema, settings or test surface is in the diff. Frontmatter is untouched:
version,last_updatedandlast_updated_bylook governed bypai-freshness-v1and the release process rather than by contributors.Related, and why this is a different problem
Three nearby threads, none of which covers this:
docs(testing), same file) scoped where tests live. Structurally the same kind of contribution, different subject. Noted mainly because its resolution is the one I'm expecting here.Inside the doctrine itself, § The probe that fits the claim covers picking the right instrument, and Rule 11 covers producing the edge rather than hand-writing the state. Neither asks whether the instrument's output can vary once it is running.
Verification
5e2f2e8(upstreammainat time of writing); patch applies with no rejects; diff is one file, +28 lines.LifeOS/Tools/DeployCore.tscopiesinstall/LIFEOS/<entry>to<configRoot>/LIFEOS/, so this file is in the deployed payload, not repo-only.###sits level with its siblings under the same##; the/\r?\n/literal survives the patch round-trip.Filed as a PR because the diff is the clearest statement of the proposal. Per #1603, if it's easier to take the text into source and close this, that works the same for me. And if some version of this is already sitting in source from a recent sweep, say so and I'll close it myself.