Repository navigation
Description
What was found
<placeholder> text inside a fenced shell block is parsed by bash as redirection, not as a placeholder. Two published guards in internals/skills/git-workflow/references/evidence-and-freshness.md were found to be unrunnable this way — discovered only because a validator executed them. They are fixed in opencharly/plugins#203.
The corpus-wide picture, measured on plugins@origin/main:
402 fenced shell blocks across 147 files
2089 lines inside those fences
181 lines carrying an angle-bracket placeholder
155 LOUD some bracket lacks a redirect target -> bash refuses to parse
26 SILENT every bracket has a target -> the line RUNS, wrongly
Why most of it is safe, and why that is not reassuring
Bash parses an entire line before executing any of it, so a syntax error anywhere prevents the earlier redirection from ever being performed. One malformed placeholder immunises the whole line.
rm <artifact-repo>/<suspect-path> '>' -> newline syntax error LOUD
grep -o x CHANGELOG/<entry>.md '>' -> '.md' parses, runs SILENT
So safety is a property of the line, not of any bracket — and it is an accident of how the line happens to end, not a design decision.
The part that makes this worth filing: it decays under normal maintenance
Appending one token flips a safe line into a dangerous one. Executed:
BEFORE rm <artifact-repo>/<suspect-path> -> syntax error near `newline`, refuses to parse
AFTER rm <artifact-repo>/<suspect-path>.bak -> PARSES AND RUNS
stdout: '' <- a `for x in $(...)` loop iterates ZERO times
stderr: 'artifact-repo: No such file or directory'
An author adding an extension, a suffix, or a flag value converts a self-announcing failure into a silently-empty one. There is no diff signal, no gate, and the line looks more complete afterwards. 155 lines are one ordinary edit away from the dangerous class.
Because the protection comes from the line's parse as a whole, the edit and the bracket providing the protection need not be anywhere near each other.
The failure mode is the empty-set problem
The error goes to stderr; the empty result goes to stdout. A caller of the shape for sha in $(...) consumes stdout, iterates zero times, and reads as "nothing found — clean." A reader who glanced at the terminal would see an error message and still get a passing check.
THE OBVIOUS GATE IS EXACTLY BACKWARDS
bash -n over every fenced block fails the 155 safe lines and passes the 26 dangerous ones, because the dangerous ones are precisely those that parse. Anyone building this check should know that before writing it.
A gate that works has to detect the placeholder pattern inside a fence, not unparseable shell — or better, distinguish blocks meant to be run as given from templates a reader edits before running, since angle brackets are conventional and correct in the second case.
What is NOT claimed
26 lines run; only three are shown to produce a false verdict (the guards, fixed in plugins#203). Several of the rest are comments, and most are templates where execution produces visible nonsense. Running wrongly and reading as a pass are different, and only the second is a defect. The population is measured; the defect rate outside those three is not.
Related
opencharly/plugins#203— fixes the three guard lines- The two guards were found by execution during review. Prose review cannot execute, so every other published command in the corpus is unverified by construction until someone runs it.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
Activity
atrawog commentedon Aug 18, 2026
Correction — the three header totals are undercounts. Cause found, and it is not the ref.
Cause: my scan anchored fences at column zero. The pattern was
^```(bash|sh|shell|console), which silently drops every fence indented inside a list item or blockquote.Ruled out by measurement rather than assumed:
A collaborator suspected a
main-vs-origin/maingap — a real defect that had bitten them earlier the same night — and explicitly declined to state it as the cause without reproducing it. That was the right call: the ref was not the cause, and a plausible recent mechanism would have been the wrong diagnosis.What this changes
The corrected totals are larger, so the exposure is slightly wider, not narrower. Nothing in the analysis depends on them: the
181 / 155 / 26split, the parse-whole-line mechanism, the executed BEFORE/AFTER transition, the inverted-bash -nfinding, and every stated limit were all measured separately and stand unchanged.But they are the first numbers a reader meets, which is exactly why they needed to be right.
The lesson, since this issue is about instruments
A
^anchor encodes an assumption about the FORM of what you are looking for — here, that a fence begins at column zero. Fences indented under a list item are ordinary markdown and their contents are just as copy-pasteable.Same class as the defect this issue documents: a pattern that silently matches less than intended, returning a confident number with no signal that anything was skipped.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
atrawog commentedon Aug 18, 2026
Two additions: a sharper scope for the hazard, and a third failure mode that depends on the reader's shell
1. The dangerous property is narrower than "a placeholder in a fence"
The property that matters is a placeholder inside
$(…)whose output is consumed as a verdict — typically feeding aforloop. That is what converts a failed command into an empty set, which reads as a clean pass.This is actionable where "prose review cannot execute" is only true. It tells a reader which snippets actually need running: not all 408 blocks, but the subset whose output is consumed rather than displayed. A placeholder in a command a reader edits and runs interactively is conventional and safe; a placeholder inside a substitution feeding a verdict is not.
Credit: this narrowing came from the
plugins#203validator, not from the original filing.2. The same broken line fails three different ways, decided by the reader's
grepMeasured, not predicted — all three from one fixture with two CHANGELOG entries present:
The third is the worst: the guard does not fail at all. It silently widens from one file to the whole directory and returns a well-formed answer to a question nobody asked — output a reader would trust, from a command that is not doing what it says.
grepbeing a shell function that reroutes to a recursing implementation is not exotic — it is the case in at least one environment where this corpus is actively maintained.Consequence for anyone auditing this: a snippet's behaviour is not a property of the snippet alone. Two reviewers running the same published line can get an error, an empty result, and a confident wrong answer, and none of them is wrong about what they saw.
Scope note on the audit itself
The corpus counts in this issue were re-derived through
/usr/bin/grepand are unchanged (402 pre-correction, 408 corrected) — every measurement piped stdin, and the recursion difference only manifests when a directory is passed as an argument. Audits that pass path arguments to a baregrepshould be re-checked; ones that pipe are unaffected.Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
atrawog commentedon Aug 18, 2026
CORRECTION to the previous comment — the third case does NOT produce a wrong answer. It produces a clean pass and a stray file.
The prior comment claimed:
That is wrong, and the wrong half is the one that mattered. Executed as published, with a recursing
greplive, inside theforloop it is written for:The recursion is real — grep does search every entry — but the same
>that made the line parse diverts the output into the stray.mdfile. So$( )captures nothing, the loop body never executes, and the answer is written to a file nobody reads.The corrected table: every case reads as clean
This is a tidier and more damning finding than the one it replaces: there is no environment in which this guard reports a problem. The third case is the worst not because it lies, but because it silently produces the correct answer into a file the reader will never open.
How I got it wrong, since this issue is about instruments
I tested a simplification. To isolate the recursion I dropped the redirect —
grep -ohE '…' CHANGELOG/— and it printed the SHAs on stdout. I then reported that as the behaviour of the full line.A scoping fact that decides who is actually exposed
A reader who saves the snippet to a file gets one behaviour; a reader who pastes it gets another — and pasting is how a published snippet is actually used. This is invisible to anyone testing via a script file, which is why three script-file tests found no recursion and a pasted test found it immediately.
This is the third correction to this issue. The
181 / 155 / 26split, the parse-whole-line mechanism, the BEFORE/AFTER transition and the inverted-bash -nfinding are unaffected — all were measured directly rather than inferred.Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
atrawog commentedon Aug 18, 2026
Anchor correction — the figures were pinned to a moving ref
The body says the corpus counts were "measured on
plugins@origin/main".origin/mainis not a re-derivable anchor — it namedc4aa221at filing and names01edd45now, and one of the intervening merges changed the very file this issue is about.Re-derived at today's
main, the headline figures are unchanged:So nothing here is stale. The defect is the anchor, not the numbers — and it was invisible precisely because the numbers held. Had they drifted, the moving ref would have announced itself as a discrepancy.
Read every figure in this issue as measured at
plugins@c4aa221andcharly@7c538cb9, and re-derive at those shas rather than atmain.The general form, which this issue's own subject matter argues for: a measurement anchored to a fixed tree survives the artifact changing around it. A reader re-runs it at the sha and gets the stated number; a later different number is then a second consistent fact rather than a discrepancy to reconcile. An anchor to
origin/maingives up that property for nothing.Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
atrawog commentedon Aug 28, 2026
Validation (2026-08-28) — RESOLVED
Verified against current
marketplacemain. The two unrunnable guards were fixed (plugins#203), and the corpus was regenerated:evidence-and-freshness.mdno longer contains therm <...>/grep -o x CHANGELOG/<entry>.mdshapes (the file now has only 8 angle-bracket characters total, none in the LOUD/SILENT redirection class).Closing as resolved.