knowledge: stderr-warnings gate, macOS SDK sysroot, auth-aware client throttle + 4 merges (7 insights, 1 dup dropped) - #35
Open
choiyounggi wants to merge 1 commit into
Conversation
3 new pages (stderr-warnings gate, macOS SDK sysroot, client-side rate
limiting), 4 merges (uncommitted-mutation restore, artifact-leak
attribution, ${VAR:-} empty-vs-unset, call-site helper fan-out).
All claims re-verified this session: 4 local reproductions + 9 live URL
checks; one draft source replaced (Okta rl2-token-oauth did not state
the claim), one harvested claim corrected (git checkout -- restores
from the index, not HEAD).
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 — 7 insight(s)
Verified best-practice
1. Gate a warning-emitting tool on captured stderr, not the exit code (
lnplcompiler hook, linkly session)OUT=$(tool "$F" 2>&1 >/dev/null)(order matters) and feed back via exit 2.2>&1 >/dev/nullinside$(...)captured exactlywarning: W1while the reversed order captured nothing. Sources fetched live: POSIX 2.7 Redirection ("the order of evaluation is from beginning to end"), GNU bash manual Redirections ("processed in the order they appear, from left to right", with thels > dirlist 2>&1example), and code.claude.com/docs/en/hooks (exit 2: "stderr text is fed back to Claude as an error message"; PostToolUse "Shows stderr to Claude; the tool already ran").2. Attribute leaked test artifacts by prefix counts, then enforce the convention statically (linkly, 998 leftover temp entries)
mkdtempsites without cleanup; post-fix tmp delta 0, 72M → 3.3M). No external doc claims to check.3. Restoring after a red-run mutation when the fix is uncommitted: copy+hash, not
git checkout --git checkout -- <path>discards the unstaged fix along with the mutation.git checkout --returned the file to the last commit (fix lost); a staged fix survived, confirming the restore source is the index (the harvested candidate said HEAD — corrected in the page); copy+hash restore round-tripped identically. Source fetched live: git-scm.com/docs/git-checkout ("Replace the specified files ... with the version from the index").4. Route token/auth requests through the client-side throttle (
stock-traderkis_client.py)5. Homebrew clang on macOS needs
-isysroot "$(xcrun --show-sdk-path)"-Wmissing-sysroot) and proceeds without system headers, failing one step downstream.-Wmissing-sysrootexists, enabled by default); LLVM Discourse #77604 (recommends-isysroot $(xcrun -show-sdk-path)); Homebrew Clang does not have correct search path for system include directory on MacOS Catalina Homebrew/homebrew-core#45061 (Homebrew clang does not find the system headers Apple's driver finds); localxcrun --show-sdk-pathresolves. Session evidence: 69 failing tests reduced to a one-file probe, fixed by the flag.6. Enumerate call sites by callee, not parameter name — dropped as a duplicate. The page
backend/common/change-impact/call-site-enumeration.md(merged to main 2026-08-04, PR #20) already carries this directive, the same linkly field incident, and the Python positional-or-keyword mechanism. The one novel fragment in the re-harvest — a test helper appearing once in the enumeration while feeding the old contract to N callers — was added as one edge-case row + one source line.7.
${VAR:-default}treats empty as unset, defeatingVAR=off-switches:-read, pass a value the script's own validation rejects (e.g.WATCH_TMUX=/nonexistent), or change the read to${VAR-default}.Existing-layer check
Read before writing:
INDEX.md; domain indexes for testing, backend, platforms; pagestests-that-cannot-fail,test-data-and-isolation,call-site-enumeration,portable-shell-scripts; the three draft pages left untracked by an interrupted earlier flush run (adopted after independent re-verification, one with corrected sources).testing/quality/tests-that-cannot-fail(edge-case row + Instead-of row + 3 source lines); knowledge: kubelet resource metrics on embedded k8s; host-to-pod memory limit sizing #2 →testing/data/test-data-and-isolation(edge-case row + Instead-of row + field-incident source); knowledge: validating a check whose target does not exist yet (1 insight) #7 →platforms/shells/portable-shell-scripts(edge-case row extending the existing"${OPT:-}"row, Instead-of row, GNU-manual source); knowledge: kubelet resource metrics, cgroupns visibility, LLM completion validation, gateway alias defaults (4 insights) #6 remainder →backend/common/change-impact/call-site-enumeration(one edge row).portable-shell-scripts, ↔command-text-inspected-before-execution;macos-sdk-sysroot↔path-resolution, ↔version-management;client-side-rate-limiting↔timeouts-and-retries;call-site-enumeration↔test-data-and-isolation.Routing decision
platforms/shells/warnings-on-stderr-with-exit-zerotesting, but the mechanics are shell redirection + hook contract → platforms/shellstesting/data/test-data-and-isolationtesting/quality/tests-that-cannot-failbackend/common/reliability/client-side-rate-limitingtimeouts-and-retriescovers outbound-call policy, not client-side throttle designplatforms/toolchains/macos-sdk-sysrootversion-managementis about version drift, not SDK resolutionbackend/common/change-impact/call-site-enumeration${VAR:-}off-switchplatforms/shells/portable-shell-scripts${OPT:-}underset -u; this is its inverse trapNo new categories were needed;
reliability,toolchains, andshellsall pre-exist. Index "load when" lines added/extended for every touched page;log.mdingest entry appended.