Skip to content

curate: 21 trap.d fragments -- 12 promoted, 3 merged, 6 declined - #763

Merged
fdaviddpt merged 1 commit into
mainfrom
curate/20260925T105726Z
Sep 25, 2026
Merged

fdaviddpt merged 1 commit into
mainfrom
curate/20260925T105726Z

Conversation

@fdaviddpt

Copy link
Copy Markdown
Contributor

What this is

The /oss:run:curate pass over trap.d/ -- 18 fragments already waiting, 3 more that had
been written straight into the primary clone's working tree as untracked strays (#1723, now
swept), plus 2 new fragments this pass logged itself (#739, #746) before curating them
too. 21 total. Every one gets exactly one disposition below; none deferred.

New fragments logged and curated in this pass

Promoted (12 new rules)

Each fires both directions -- a must-fire payload and a must-not-fire payload, driven through
pre-path-hook.sh / pre-tool-hook.sh with a known-good control alongside -- caught one real
bug in the process: paths-dimension match: values must not carry the ~ prefix
tools-dimension rules use (copied by habit from supertool-required.md's own match: ~.*);
with it, every one of these rules matched literally nothing, silently.

  • paths/00-manual/bash-locale-pin-byte-and-case-ops.md -- pin LC_ALL=C before any
    byte-range/case-fold bash comparison; folds in macos-latest CI: a bash case-pattern matching a real control byte silently failed to match, mechanism unknown, not reproducible locally #630 and safe_eval drops every bridge variable containing 'I' under tr_TR locale — no save ever completes #695's outward-walk fragment as
    supporting evidence (below).
  • paths/00-manual/dollar-paren-lt-file-is-a-special-case.md -- $(<file) is a special-cased
    grammar production; any other token in the parens silently reads nothing.
  • paths/00-manual/hand-kept-completeness-list-goes-stale.md -- a static "every X is
    guarded" check fed a hand-kept list only proves the list, not the guard.
  • paths/00-manual/kill-a-subshell-not-its-forked-child.md -- kill $subshell_pid does not
    reach a sleep it forked; the orphan can hold an inherited fd open past the timeout.
  • paths/00-manual/per-session-value-shared-channel.md -- a per-session value published
    through one shared file is owned by whichever session wrote it last.
  • paths/00-manual/security-check-three-states-not-two.md -- a security-relevant check
    gated on a shelled-out command must not fold "command failed" into its permissive branch
    (folds in 721.git-command-failure-reads-as-untracked).
  • paths/00-manual/simulating-tool-absence-on-macos.md -- faking "tool X absent" by dropping
    a whole PATH entry can silently take macOS-bundled sibling tools down with it.
  • paths/00-manual/spawn-counter-splits-on-embedded-newlines.md -- a multi-line quoted
    jq/awk/sed filter argument inflates any spawn count that splits a recorded "$*" on
    newlines.
  • paths/00-manual/case-divergence-pin-fold-dont-stack.md -- see test: drop the #726 sanctioned-divergence pair #744 stranded on main #746 above.
  • tools/00-manual/supertool-cwd-verify-tree.md -- supertool's default cwd can silently
    point at the wrong tree; verify, don't trust.
  • tools/00-manual/raw-append-write-unguarded.md -- interim copy: the raw-command guard
    blocks a raw read but not a raw >> append. Filed upstream as
    claude-supertool#2699.
  • tools/00-manual/targeted-pytest-misses-py39-and-scanners.md -- see fix(#738): per_session /remember no longer writes into the last-started session's handoff #739 above.

Merged into an existing rule

  • 705.edit-toml-literal-double-escape -> appended to
    tools/00-manual/supertool-literal-backslashes.md (escaping direction still matters even
    with literal_backslashes = true).
  • 630.macos-case-byte-range-silent-mismatch and 695.outward-walk-assumes-lexical-scope ->
    folded into bash-locale-pin-byte-and-case-ops.md as supporting evidence rather than
    standalone rules (both are single-incident, one confirmed reverted before merge, the other
    a scanner-logic caveat with no live instance in this tree today).

Declined, each recorded in the owning layer's 00-README.md

Every decline here is a live-code claim, checked against this branch's own HEAD before
declining -- five were still true and got a tracking issue; one was a tool-workflow
observation, not a code claim, so no issue was needed.

Two fragments promoted instead of declined, despite naming a specific code site

721.git-command-failure-reads-as-untracked and 721.case-fold-helper-not-pinned-to-c-locale
each describe a generalizable class worth teaching beyond their one call site (a security
check folding command-failure into its permissive branch; missing LC_ALL=C pinning), so
both became -- or were folded into -- one of the promoted rules above, alongside filing #760
for the still-live _remember_handoff_is_tracked instance.

Out of scope, left untouched, worth a human's attention

  • .claude/jit-context/tools/01-oss/python-heredoc-writes-are-unvalidated.md and
    raw-file-reads-are-uncapped.md sit untracked in the primary clone's working tree (not this
    worktree, cut from origin/main, which cannot see them). Byte-identical to the plugin's own
    0.42.0 template for that layer -- a scaffold sync gap (this repo's tracked 01-oss layer is
    missing exactly these two files), not a curate decision: 01-oss/ is generated and this
    pass never writes there. Left for /oss:run:scaffold.

Firing proof

Every promoted rule was driven both directions through the actual hooks
(pre-path-hook.sh for paths, pre-tool-hook.sh for tools), rebuilding
00-index.tsv first, with a pre-existing known-good rule (trap-fragments.md /
supertool-required.md) alongside each batch as the control. Full transcript in this PR's
own session; happy to paste specific probes on request.

[AI-generated]

trap.d's queue (18 pre-existing plus 3 stray uncommitted, from the primary clone's
own working tree) plus two new fragments logged for this pass (#739, #746) --
21 total, all decided, none deferred.

New fragments added and curated in this same pass:
- 746: two PRs (#734 then #746) each stranded a sanctioned-divergence pair in
  test_case_divergence_298.py by stacking a new pair on a site an earlier PR had
  already pinned, going red on origin/main invisibly to either PR's own CI.
- 739: a targeted local pytest run missed a Python 3.9 str|None annotation and
  a new shell bracket-range pattern, both caught only by the full CI matrix.

Promoted (12 new rules, all firing-proven both directions via pre-path-hook.sh /
pre-tool-hook.sh, plus a known-good control):
- paths/00-manual: bash-locale-pin-byte-and-case-ops, dollar-paren-lt-file-is-a-
  special-case, hand-kept-completeness-list-goes-stale, kill-a-subshell-not-its-
  forked-child, per-session-value-shared-channel, security-check-three-states-
  not-two, simulating-tool-absence-on-macos, spawn-counter-splits-on-embedded-
  newlines, case-divergence-pin-fold-dont-stack
- tools/00-manual: supertool-cwd-verify-tree, raw-append-write-unguarded
  (interim, filed claude-supertool#2699), targeted-pytest-misses-py39-and-scanners

Merged into existing rules:
- 630, 695.outward-walk-assumes-lexical-scope -> folded into
  bash-locale-pin-byte-and-case-ops.md as supporting evidence
- 705.edit-toml-literal-double-escape -> appended to supertool-literal-
  backslashes.md

Declined, each recorded in the owning layer's 00-README.md:
- 695.emit-read-max-is-an-unvalidated-knob (still true, filed #758)
- 719.silent-exclude-mkdir-failure (still true, filed #759)
- 721.git-dir-symlink-bypasses-tracked-check (still true, filed #761,
  low-priority: attacker already needs a stronger primitive)
- 660.promo-installed-key-array-plugins-shape (still true, filed #762)
- 722.edit-tool-cannot-write-raw-unicode-literal (not a code claim; narrow,
  workaround already obvious)
- 725.recon-reads-dirty-sibling-clone-not-origin-main (not this repo's code;
  filed claude-oss#1745 against oss:recon itself)

721.git-command-failure-reads-as-untracked and 721.case-fold-helper-not-pinned-
to-c-locale were promoted rather than declined: both describe a generalizable
class (git-gated security checks folding failure into the permissive branch;
missing LC_ALL=C pinning) worth teaching beyond the one call site, so each
became -- or was folded into -- a promoted rule above, alongside filing the
underlying code issue.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@fdaviddpt fdaviddpt added the no-changelog Change is invisible to users label Sep 25, 2026
@fdaviddpt
fdaviddpt merged commit 118ac43 into main Sep 25, 2026
17 of 19 checks passed
@fdaviddpt
fdaviddpt deleted the curate/20260925T105726Z branch September 25, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Change is invisible to users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant