knowledge: LLM output-cap budgeting + verification-harness reverse controls (2 of 3 insights; 1 already in flight) - #13
Open
dch0202-rsquare wants to merge 2 commits into
Conversation
- backend/common/llm/context-window-budget (NEW category common/llm): size an LLM client's output cap to the model actually serving it; the window holds request and generation together, so max_tokens is a reservation inside it. - testing/quality/harness-reverse-controls: prove a verification harness discriminates before citing its score; a semantics-preserving no-op must survive, and errored cases leave the denominator rather than counting as catches. Third candidate (non-interactive CLI stdin) retired as already in flight in PRs choiyounggi#11/choiyounggi#12 rather than opened as a third duplicate. See .dev-loop/INGEST_REPORT.md.
Removes a fabricated Stryker quotation ("all mutants survive unexpectedly" is not
its wording; the real headings are runner-specific and the causes are sandbox
mechanics), scopes the baseline-run claim to Stryker alone, corrects the initial-run
derivation to timing only, labels the Vitest-runner message as such, and attributes
three field-derived claims in the LLM page to the reproduction instead of leaving
them adjacent to doc citations.
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.
Knowledge flush — 3 insight(s)
Queue drained: 3 pending candidates (2 ×
platforms/backend, 1 ×testing).Result: 2 pages ingested, 1 candidate retired as already in flight.
Verified best-practice
1. Non-interactive CLI blocking on stdin → already in flight, not ingested
The knowledge is real and I verified it independently, but it is already an open
PR:
wiki/platforms/processes/non-interactive-cli-invocation.mdis added by bothPR #11 and PR #12, same page id, same directive. Opening a third copy would
have been the third duplicate of one insight. Retired against PR #12.
What I verified before finding the overlap (offered as review material for whichever
PR survives, since neither currently cites any of it):
&is not a fix: SIGTTIN on "a member of a background process group attempting to read from its controlling terminal"man nohup(macOS 15)nohupDESCRIPTION covers SIGHUP, stdout and stderr only — stdin is never mentioned. PR #12 asserts the stdin redirect "is a GNU extension" without citing the BSD page-pbackground shells end "about five seconds after Claude has returned its final result and stdin has closed" — an open descriptor gates exit, not just inputCorrection to the harvested candidate, worth carrying into whichever PR merges: it
credited the fix to
nohup (stdin=/dev/null). That is wrong on macOS — BSDnohupleaves stdin attached. The portable directive is an explicit
</dev/null, which iswhat both open PRs already say.
I also could not substantiate the candidate's stated mechanism (blocking at a
tool-approval prompt). For Claude Code the docs say an unpermitted tool makes the run
abort, not hang. Flagging it so it does not get promoted into a page later.
2. LLM client output cap vs the serving model's window →
backend(ingested)This is the conclusion I reversed. My first pass called it a duplicate of
backend/common/llm/context-window-budget.md— but that page is one of the orphans: itis not in
mainand not in any open PR.mainhas no LLM page at all, so theknowledge was genuinely missing. Ingested using that already-authored page.
Claims spot-checked before vouching for it:
ANTHROPIC_BASE_URLwordingmax_tokensis a reservation inside itContextWindowExceededErroras a 400/v1ANTHROPIC_BASE_URL=http://localhost:8000CLAUDE_CODE_MAX_OUTPUT_TOKENS/CLAUDE_CODE_MAX_CONTEXT_TOKENSexist despite being absent from the published env-vars pageANTHROPIC_BASE_URLpositive control at 43That last check is the one claim resting on binary inspection rather than docs, so it
is the one to challenge if you disagree. My first probe returned 0 for everything —
clauderesolves to a shell function, socommand -vyielded a bare name andstringsread nothing. The uniform zero was the tell; the positive control is what turned it into
a real measurement. (Which is, with some irony, insight 3.)
Confidence:
verified(as authored — every directive carries an official doc).3. Verification-harness reverse controls →
testing(ingested)Also an orphan (
wiki/testing/quality/harness-reverse-controls.md) — authored by thedead flush, in no branch and no PR. Not covered by
mainor by the open PRs: #8(
spec-artifact-checks) and #9 (document-conformance-checks) both add per-checknegative controls, which is the adjacent layer this page explicitly distinguishes
itself from — "a per-check control asks can this check go red, the harness control
asks can this harness go green". Ingested, with my own verification folded in.
Sources I checked independently, and what each settles:
Killed/Survivedare modelled apart fromTimeout,Runtime error,Compile error, and the score is "detected / valid * 100" — errored cases leave the denominator. That is precisely the accounting error in the field caseChanges I made to the orphan page: added
Do thisstep 6 (scoredetected / valid,errored cases out of the denominator), added the two Stryker sources above, renumbered
the closing step, bumped
last_verifiedto 2026-08-02.Confidence:
verified(mechanism and scoring rule from two independent frameworkspecifications; the incident is cited as a dated field reproduction, not as the basis
for the directive).
Existing-layer check
Routed via
INDEX.md→ domainindex.md→ every page whose "load when" overlapped,then re-run against
origin/mainandgh pr listafter the contamination surfaced.Read in full:
platforms/index.md,platforms/processes/background-services.md,platforms/shells/portable-shell-scripts.md,platforms/tools/bsd-vs-gnu-cli.md,debugging/index.md,testing/index.md,testing/quality/tests-that-cannot-fail.md,backend/index.md, plus the diffs of PRs #8, #9, #11, #12. Repo-wide greps forlitellm/ANTHROPIC_BASE_URL/claude codeandstdin/nohup/tty//dev/nulllocated every candidate overlap.platforms/index.md,background-services.mdandbsd-vs-gnu-cli.mdreverted — they referenced a page id that would not exist inmain, i.e. a broken-link lint failuremainmain; the file I first read was an orphantesting/quality/tests-that-cannot-failrelated:both waysdryRunOnly, PIT's equivalent-mutation quote, "all mutants survive unexpectedly"); mine had the scoring rule it lackedConflicts found: none. Nothing overwritten, nothing to flag as
contradiction.Routing decision
platforms/processes)backend/common/llm/context-window-budget.md(backend-common-llm-context-window-budget)common/llmcategory. Existingcommon/*categories are api-design, reliability, caching, jobs, errors, auth, orm, concurrency. The nearest fit,reliability, owns timeouts/retries between services and would misfile the directive as a transient-failure concern when the 400 is arithmetic. PerAGENTS.md,common/holds language-agnostic server-side concerns, which an LLM client's token budget istesting/quality/harness-reverse-controls.md(testing-quality-harness-reverse-controls)qualityalready holds the "can this detect a defect" family; this extends it one level up to the measuring apparatusPlumbing:
backend/index.mdgains thellmcategory and page;testing/index.mdgains the page;
log.mdhas three entries (2ingest, 1dedup); everyrelated:idand inline
[page-id]reference resolves.INDEX.mdunchanged — both domains alreadylisted and both remain accurately described.
Format checks: bodies 73 and 80 lines (limit 120); five required sections each; no
banned vague qualifiers; anti-patterns confined to
Instead ofrows, each paired with areplacement; branches as tables.
What I got wrong, and what would prevent it
reset --hard origin/mainleaves untracked files in place, so a flush that dies after writing pages but before
committing poisons the next flush's dedup — in the most misleading direction, by
making new knowledge look already-covered. I nearly dropped candidate 2 on that
basis. A
git clean -fd(or agit statuscheck) before the existing-layer stepwould close this; the skill currently prescribes neither.
wiki layers" only. With 7 open knowledge PRs, candidate 1 had already been flushed
twice (knowledge: non-interactive CLI hangs, gates that read command text, editing a gated document (4 insights → 3 pages) #11 and knowledge: non-interactive CLI stdin, LLM response completeness, externally-owned defaults #12, same page path) and would have become a third.
already processed into PRs knowledge: non-interactive CLI hangs, gates that read command text, editing a gated document (4 insights → 3 pages) #11/knowledge: non-interactive CLI stdin, LLM response completeness, externally-owned defaults #12; they came back because the dead flush never ran
step 5. Retiring them is handled below.
Cross-check
Cross-Check: independent headless
clauderun (--permission-mode plan) re-fetched all11 cited URLs and audited every quoted string to refute it — PASS on both pages, with
5 sourcing defects found and all 5 fixed in the follow-up commit.
"all mutants survive unexpectedly"is not Stryker's wordingmodule-alias/registerunsupported), not the "configuration fault" gloss. Quotes removed, causes attributed to the two sections. This was a fabricated quotation and the single most important catchdryRunOnlyalonenetTimeMs/overheadMs) only; coverage claim droppedmax_output_tokenskey; the/v1path-append ruleOne citation could not be checked: the Google Testing Blog URL renders its body
client-side, so a fetch returns only page chrome. The claim attributed to it is generic
("inserting faults and requiring failure measures detection") and is independently
carried by the PIT and Stryker citations, but flagging it rather than calling it verified.
Reviewer notes
non-interactive-cli-invocation.md) andneed dedup against each other regardless of this PR.
nohupcorrection and the four sources in §1 are unclaimed by eitherPR; fold them into whichever you keep.
common/llmcategory is the only structural addition here — the one decision inthis PR worth pushing back on.