knowledge: orchestration control signals, harness-mediated tool results, client-side rate limiting, call-site surveys, ${VAR:-} (7 insights) - #29
Open
choiyounggi wants to merge 1 commit into
Conversation
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)
Drained
~/.dev-loop/queue(7 pending rows across 5 session files). Result:5 new pages, 2 revised pages, 1 new category (
infrastructure/orchestration).Verified best-practice
I1 — A plugin hook rewrites what a tool returns
Claim: when a tool returns content that does not match the file, test its
suggested workaround once; if it fails, switch to
grep -n+awkand name thatfallback in every spawned worker's brief.
Sources checked: Claude Code hooks reference —
documents
PostToolUse→hookSpecificOutput.updatedToolOutput, which "replacesthe tool's result", and
PreToolUse→updatedInput, which "replaces a tool'sarguments before it runs"; explicitly names this the interception point "for
redaction or transformation use cases …
PostToolUsefor inbound tool results".Verification: the mechanism is documented, which upgrades the insight from
"a plugin was weird" to a named, expected harness capability. The specific
substitution behavior is the session's own observation (4 files, retry with
offset=151, limit=120returned line 1 again, two worker panes independentlylogged it). Also corrected the queued claim's framing: the file is intact, the
channel is mediated — so the page directs at channel choice, not at the file.
Confidence:
verified(mechanism cited; field incident recorded separatelyunder "Field context").
I2+I3 — A control signal is not evidence
Claim: confirm a status file or watcher verdict against the primary artifact
(git log, substrate liveness) before restarting, discarding, or merging; report
an orchestrator-assigned task id rather than a discovered session name;
statthe status file after writing it.
Sources checked + reproduced:
current session is used if available; if no current session is available, the
most recently used is chosen."
env -u TMUX tmux display-message -p '#S'printed
lo-test— an unrelated session — with exit 0. This is the exactfalse-positive mechanism the queued insight described (
lo-14/15/16-npmcli):a worker outside tmux does not get an error, it gets someone else's session name.
plugins/guardrails/hooks/bash-guard.sh:217-245—worktree_escapefires when alinked worktree's command text names the main root together with a write verb
(
rm|mv|cp|tee|mkdir|touch|install|ddor a>/>>redirect), independent ofthe command's purpose;
plans/worker-safety-v0.1/design.md:82states the rule"only sees the literal command text", which is why the Write tool succeeded on
the same path. Default mode
ask→denyunderGROUNDWORK_NONINTERACTIVE=1.PreToolUseruns"Before a tool call executes. Can block it", so a blocked call leaves no side effect.
Confidence:
verified.I4 — Shared orchestration state across concurrent runs
Claim: namespace the state directory per run id; survey it for foreign task
ids before writing; confirm a foreign run from
git worktree list/ branches /default-branch HEAD rather than from the status files.
Sources checked: git-worktree —
git worktree listenumerates every linked worktree of the repository includinganother process's,
git worktree pruneclears administrative files for removedones (this is what makes the repo, not the status dir, the reliable witness).
Verification: the incident is field evidence only (two dev-loop runs sharing
.orchestration/status; run B merged four of run A's branches to the defaultbranch
373d9fa→24ea9e8without A's gate). The remedy is standard shared-mutable-state hygiene, but no external source prescribes this specific layout.
Confidence:
field-tested— deliberately not upgraded to verified.I5 — A throttle the token request slips past
Claim: throttle at the transport layer every request passes through, stamp the
timestamp immediately before the send, and decide whether the token endpoint takes
a slot from the provider's documented bucket policy.
Sources checked — and this materially corrected the queued directive:
"No more than 2,000 OAuth access token requests per hour", a secondary limit
distinct from the primary REST limit.
metered per authorization server, separately from other API endpoints.
per-endpoint policies, Authentication API metered separately.
EGW00201초당 거래건수 초과; "토큰 재발급 - 1분당 1회 발급됩니다"; 모의투자 계좌는REST API 호출 제한이 낮음 (corroborates the reported 2/sec paper-account limit).
token is obtained by an ordinary HTTP POST, subject to the server's limits.
Correction made: the queued directive said flatly "include token requests in
the throttle counter". That is not universally right — GitHub, Okta and Auth0
meter the token endpoint in its own bucket, where charging it to the API limiter
would under-use the quota. The page therefore ships a three-row decision table
(shared bucket / separate bucket / undocumented) instead of the flat rule, and
keeps the genuinely universal part: the throttle must sit below the auth layer,
because that is what the bug actually was.
Confidence:
verified.I6 — Enumerating call sites for a signature migration
Claim: search by callee symbol, not parameter name; audit test helper
definitions that reproduce the old shape.
Sources checked:
the same parameter may be passed positionally or by keyword, so the parameter
name is simply absent from a positional call's text. This is the mechanism.
resolves call sites through the callee symbol and normalizes positional↔keyword.
"finds and updates all usages, base symbols, implementations, and overrides".
Verification: every serious refactoring tool is symbol-driven, not
parameter-name-driven — that is the industry answer to this exact problem, and it
also supplied a directive the queued insight lacked (prefer the symbol-aware
rename; use grep to verify it, not to plan it).
Confidence:
verified. Session measurement retained as field context(
Ran 472 tests / FAILED (failures=11)).I7 —
${VAR:-default}swallows a deliberate empty valueClaim:
:-substitutes for unset and null;-only for unset. So passingVAR=to disable a feature is silently ignored.Sources checked: POSIX Shell Command Language §2.6.2 —
"use of the <colon> in the format shall result in a test for a parameter that
is unset or null; omission of the <colon> shall result in a test for a
parameter that is only unset."
Reproduced locally 2026-08-05 with
VAR=under sh, bash, zsh and dash:${VAR:-d}→d,${VAR-d}→ empty, in all four.Confidence:
verified(strongest of the batch — spec text + 4-shell repro).Existing-layer check
Pages read before writing:
INDEX.md,AGENTS.md,templates/page.md, andthe full domain indexes for
platforms,infrastructure,testing,backend,debugging. Full bodies read where "load when" overlapped:platforms/shells/portable-shell-scripts,platforms/shells/command-text-inspected-before-execution,backend/common/reliability/timeouts-and-retries.portable-shell-scriptsalready had an edge case pointingset -uusers at"${OPT:-}"— same expansion family, opposite direction (there:-is the fix; here it is the trap)last_verified2026-07-10 → 2026-08-05command-text-inspected-before-executionalready owns "a gate blocked a correct command"; its existing edge case covers exit-2-to-stderrlast_verified2026-07-30 → 2026-08-05timeouts-and-retriescovers outbound calls, 429 +Retry-After, and concurrency caps — but not client-side rate limiting to stay under a published quota, and says nothing about auth-layer requestsrelated:both ways. Its 429 row is referenced from the new page's retry edge case rather than restatedtesting/qualityholdstests-that-cannot-fail,checks-that-cannot-pass,harness-reverse-controls— all "your verification evidence is weaker than you claim"related:both ways withtests-that-cannot-fail, which its "suite is green" edge case defers tocommand-text-inspected-before-execution(harness gates a command) andnon-interactive-cli-invocation(harness runs a CLI) are adjacent but neither covers a harness rewriting a resultbackend/common/concurrency/distributed-locksandjobs/scheduled-job-overlapcover mutual exclusion between processes of one service, not two orchestration runs over one reporelated:-linked to both rather than duplicating their lock guidanceConflicts flagged: none. No new directive contradicts an existing page. The
one tension — I5's queued wording vs. the providers' actual bucket policies — was
a defect in the candidate, resolved by branching the directive (see I5 above),
not by overwriting anything.
Merge decision on I2+I3: the queue carried these as two rows from two sessions,
but they are one case (a control signal is not evidence) with two failure
instances (a false "dead" verdict; a never-emitted status write). Per
wiki-ingeststep 4 they went into one page rather than two near-duplicates.Back-links added both ways:
timeouts-and-retries→client-side-rate-limiting;tests-that-cannot-fail→migration-call-site-survey;command-text-inspected-before-execution→ both new orchestration and harness pages.Routing decision
platforms/tools/harness-mediated-tool-resultsinfrastructure/orchestration/control-signals-vs-primary-artifactsinfrastructure/orchestration/shared-run-statebackend/common/reliability/client-side-rate-limitingtesting/quality/migration-call-site-survey${VAR:-}vs${VAR-}platforms/shells/portable-shell-scriptsNew category
infrastructure/orchestration— why the existing six don't fit.ci-cdis pipeline structure and build secrets;deployis how a service reachesproduction;
observabilityis instrumenting a running service;configisper-environment settings;
containersanddataare plainly unrelated. Nonecovers several agent/worker sessions coordinating over one repository — the
subject of three of the seven candidates, which is what justifies a category
rather than a lone page.
INDEX.mdand the domain index route line were bothupdated so the category is reachable.
Routing note on I6. The queue's
domainhint saidtesting, and it landed intesting/quality— but on the category's actual theme (is your evidence as strongas your claim?) rather than on "it broke some tests". Its "load when" leads with
the signature-migration trigger so a migration task routes in without a test failure
having happened yet.
Routing note on I1.
platformsis nominally OS-level, but it already absorbsagent-harness concerns (
command-text-inspected-before-execution,non-interactive-cli-invocation), sotoolswas taken as the closest fit ratherthan opening a second new category. The domain's route line now names it.
Lint
Run against the
AGENTS.mdmaintenance invariants across all 7 touched pages:usually,consider,generally,typically, …): 0 ✅id:matches file path on every page ✅related:id resolves — re-checked repo-wide, not just on new pages ✅[page-id]reference resolves ✅index.mdwith a "load when" line ✅INDEX.md✅log.md: 1ingest+ 2reviseentries appended ✅Instead ofrows, each paired with a replacement ✅Queue
The 7 flushed rows are appended to
~/.dev-loop/queue/.processed.jsonland removedfrom their 5 session files, so the next flush does not re-ingest them.