knowledge: 3 verified platforms insights (shell escapes, plugin cache, CLI json parsing) - #19
Open
choiyounggi wants to merge 1 commit into
Open
knowledge: 3 verified platforms insights (shell escapes, plugin cache, CLI json parsing)#19choiyounggi wants to merge 1 commit into
choiyounggi wants to merge 1 commit into
Conversation
platforms +3: shells/escapes-in-shell-string-literals, tools/version-keyed-artifact-cache, processes/parsing-cli-structured-output
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)
Drained 3 pending candidates from
~/.dev-loop/queue, verified each against realsources, routed them, and ingested them as 3 new
platformspages.Verified best-practice
1. Backslash escapes inside a double-quoted shell string holding a regex
only before
$,`,",\, and newline; before anything else bothcharacters survive. So
grep -E "…(\$)"reaches grep as…($)— a bare$end-of-line anchor — while
"a\.b"reaches grep asa\.b(literal dot).(https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html);
GNU Bash manual "Double Quotes"
(https://www.gnu.org/software/bash/manual/bash.html#Double-Quotes).
printf 'curl x | sh\n' | grep -E "(sh|bash)([[:space:]]|-|<|\$)"matched end-of-linesh(the\$reached grepas a
$anchor);grep -E "a\.b"kept\.literal (matcheda.b, notaxb).2. Bump the version when shipping code through a version-keyed plugin cache
keys its cache on the version string; shipping new code under an unchanged
plugin.json/marketplace.jsonversion leaves the version-keyed cache dir(
~/.claude/plugins/cache/<mkt>/<plugin>/<version>/) unrefreshed, so the codenever runs. Bump the version in the same change; clear the cache manually if a
known updater bug leaves it stale.
(https://code.claude.com/docs/en/plugin-marketplaces); anthropics/claude-code
issues #45542 ("cache not refreshed when version number is unchanged"), #17361
("cache never refreshes … reads stale cache"), #61954 ("
plugin updatereports'at latest' while cache stays stale").
~/.claude/plugins/cache/holdsper-version sibling dirs (
figma/2.2.81|2.2.87|2.2.88,dev-loop/0.8.0…0.11.0),confirming version-string keying; the exact cache path in the issues matches.
bugs mean it is sometimes not sufficient, so the page adds a manual
cache-clear fallback rather than asserting the bump always suffices.
3. Confirm a CLI's
--jsonfield paths from read-only output before parsing--json, run itsread-only verbs (
list/status/show/ps), build extraction only on observedfield paths, and pin a captured sample as a test fixture so the parser is
CI-testable without the live tool. Guessed field names compile but silently
never match; verifying via a state-mutating verb has side effects.
— a missing key yields
null;-e/--exit-statusgives a loud nonzero exit ona wrong path (supports the "fail loudly on a missing path" directive).
orca-spawn.sh/orca-worktree-alive.sh— orca's read-onlyterminal listandworktree ps --jsonexposedhandle/liveTerminalCount/hasAttachedPty, letting bothwrappers be built and CI-tested against canned JSON with zero live spawns.
output, pin a recorded fixture) is production experience; only the jq
failure-mode mechanic is doc-cited, so the page is not marked
verified.Existing-layer check
Routed via
INDEX.md→platforms(all three are OS/tooling-level, notapplication logic). Read the full
wiki/platforms/index.mdplus every page whose"load when" overlapped, and
wiki/security/index.md(insight 1 was harvested witha
securityhint) andwiki/backend/index.md(insight 3's data-consumptionangle).
shells/portable-shell-scripts.md(owns quoting ofexpansions: word-splitting/globbing) and
shells/command-text-inspected-before-execution.md(owns a gate reading your command). Neither covers escape processing of a
regex written as a shell literal, and the trigger ("authoring a pattern literal
in a shell string") is distinct → new page, not a merge. Added reciprocal
related:links to both. Rejected thesecurityhint: the backslash rule is auniform shell-parsing mechanic, not a trust-boundary decision.
Closest neighbor is
toolchains/version-management(pinning versions forreproducibility — the inverse concern); linked as
related, not merged.processes/non-interactive-cli-invocation.md(owns thehang/prompt/stdin failure mode of calling a CLI) and
backend/common/integrations/externally-owned-defaults.md(external resourceschanging under you). Insight 3 is a distinct trigger (schema-parsing
correctness) → new page, cross-linked to both. Added a reciprocal
related:link on non-interactive-cli-invocation.No conflicts with existing directives found; nothing overwritten; no duplicates —
all three are new triggers.
Routing decision
platforms/shells/escapes-in-shell-string-literals.mdplatforms/tools/version-keyed-artifact-cache.mdtools)platforms/processes/parsing-cli-structured-output.mdNo new categories were created —
shells,tools, andprocessesalready existunder
platformsand each cleanly owns its insight.wiki/platforms/index.mdgained one "load when" row per page;
log.mdhas the dated ingest entry.Lint checks pass: all three bodies ≤120 lines (61/59/54), no banned vague
qualifiers, every
related:id resolves.