Skip to content

0.27.1 — the temp-tree check reads the whole repository; the old leak is reapable by content - #45

Merged
sshlg merged 2 commits into
mainfrom
fix/ag06
Oct 12, 2026
Merged

sshlg merged 2 commits into
mainfrom
fix/ag06

Conversation

@sshlg

@sshlg sshlg commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Closes board rows B-158, AG-06a, AG-06b (sshlg-skills plan R28). Patch on v0.27.0 (96ed0f8).

  • B-158: TEMP_MAKERS ported from make-skill 0.31.0 — a direct call through one receiver or none, and a one-line renaming from-import, are refused. The alias and renamed-import negative controls were watched failing on the old pattern (B-158 self-test: a temp-dir call through a module alias (\tf.`) was not found, … a renamed from-import … was not found); each asserts on the parsed (match, line). Not seen (stated in code and CHANGELOG): chained receivers, function references, getattr`, parenthesised multi-line imports.
  • AG-06a: the check now reads every *.py in the repository (test/ recursively, plugins/, bin/), with exact-path, exact-count, reasoned exemptions: test/residue.py (1) and agent-harness/scripts/audit_agent.py (2, a shipped tool's context-managed self-test that cannot import the suite's ledger). The first run refused a real bypass, test/audit_regressions/instruction_budget.py line 21, now residue.workspace(). Plants refused by file and line: an aliased maker in a plugin script, a renamed import under bin/, a third maker in audit_agent.py (3 makers, 2 allowed), plugins dropped from the scan (capability control). New CI negative self-test for a plugin-script plant (its logic was run locally; GitHub hasn't run it yet).
  • AG-06b: python3 test/residue.py --reap-own [--apply] (test/reap_own.py). It is a dry run unless --apply is passed. It claims a tree only when the tree is named the way mkdtemp() names directories, is not a symlink, matches one of the old fixture's end states byte for byte (plus, optionally, its own manifest), and has not changed for 24 h. test/reap_own_test.py runs 6 cases in a sandbox temp root. A planted permissive reaper was caught: near-misses were claimed as own: ['tmpextrab01', 'tmpextraf01']. On the real $TMPDIR, a dry run found 0 tree(s) match, and the find count is 0, so the 2592 trees are already gone. Nothing was deleted.

Gate: npm test EXIT=0. It printed OK: agent-stack structurally valid (16 checks = 12 named + 4 per-skill, 4 skill(s), v0.27.1), PASS: plant_guard — 9 cases, PASS: reap-own — 6 cases, PASS: installer — 11 case(s), and all 25 audit regressions passed. claude plugin validate ./plugins/agent-stack --strict passed.

Not merged, tagged or published.

🤖 Generated with Claude Code

Робот and others added 2 commits October 12, 2026 18:20
… is reapable by content

- B-158: TEMP_MAKERS is make-skill 0.31.0's pattern (any single
  receiver, one-line renaming from-import refused); alias and
  renamed-import negative controls watched failing on the old pattern.
- AG-06a: the check reads every *.py the repository ships or runs, with
  exact-path, exact-count, reasoned exemptions (residue.py 1,
  audit_agent.py 2). Its first run refused a real bypass in
  test/audit_regressions/instruction_budget.py:21, now
  residue.workspace(). New CI negative self-test for a plugin script.
- AG-06b: `python3 test/residue.py --reap-own` (dry run by default,
  --apply) claims only mkdtemp-named, non-symlink trees that are byte for
  byte one of the old fixture's end states, unchanged for 24 h.
  test/reap_own_test.py runs in a sandbox temp root (6 cases, in npm
  test). Real $TMPDIR, dry: 0 trees match; nothing deleted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ore delete, sees empty dirs; exempt files pinned by shape

Blind reading of 53b5e38: the temp root was never checked against / or $HOME; the age
floor accepted 0 and negatives and crashed on non-numbers; a write between the final
check and rmtree was deleted; empty directories were invisible; the state count was
misstated; the audit_agent.py exemption pinned a count, not the with-form. Each is a
case now (13 reap-own cases).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sshlg
sshlg merged commit cb8f699 into main Oct 12, 2026
2 checks passed
@sshlg
sshlg deleted the fix/ag06 branch October 12, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant