Skip to content

feat(hooks): set-writes-scope --from-plan names and refuses a ## Files item it cannot scope (7.22.0) - #458

Merged
PrzemekGalarowicz merged 9 commits into
mainfrom
przemek/setter-names-dropped-bullets
Nov 17, 2026
Merged

PrzemekGalarowicz merged 9 commits into
mainfrom
przemek/setter-names-dropped-bullets

Conversation

@PrzemekGalarowicz

Copy link
Copy Markdown
Member

What

set-writes-scope.cjs --from-plan now refuses a plan whose ## Files holds an item it cannot scope (*, ?, <, >, or an empty item), exits 1, writes nothing, and names every such item with its reason and the count (2 of 37 \## Files` item(s) … cannot be scoped`). Before, it dropped them without a word and printed the smaller count. This was found three times (L37, L71, the CORE-90 ship) and is the plan-time check L20 and L71 asked for. Ships as 7.22.0.

  • Same refusal in --check (which /pharn-plan and /pharn-dev-plan run at plan time) and in a build's Step 0, so --check still predicts Step 0. No opt-in: such an item never granted a write.
  • --from-frontmatter is unchanged (its placeholders resolve through --target).
  • The setter edit is the maintainer's patch (control surface), committed before each build anchor (L68): d1793d20, 60a2af53, 843212ab.

Changed

  • Setter tests: each reason by name, the "N of M" count, the live record left byte-identical in both modes, the L71 shape (2 of 37), JSON quoting. 4 of the new tests fail on the old setter; the 5th is a control.
  • Three floor tests that fed the setter a glob now assert the refusal (check-ac-tests, check-build-complete parity, stage-verify).
  • /pharn-plan and /pharn-dev-plan --check guidance, the writes-scope guide, ac-tests.md, and floor comments that said the setter "drops" such an item.
  • pharn-install.json regenerated; SKILLS_VERSION 7.21.0 → 7.22.0; CHANGELOG ## [7.22.0].

Evidence

  • Real-setter measurement over every committed PLAN: the same 18 refuse (16 carry the habitual docs/capabilities/** item); entry-run-as-base-evidence reads 2 of 37, exactly L71.
  • /pharn-dev-regress: no-regressions (194 outside test files, 6648 tests each side, validate, the trust-fence pair).
  • /pharn-dev-verify: see .dev/features/setter-dropped-bullets/VERIFY.md.
  • Independent review: GREEN, 0 floor-gate findings; both important findings fixed (REVIEW.md).

Bounds (P0)

A character-membership test in a Bash-run program (pharn/LIMITS.md §6). A literal path the build never writes still passes. The message escapes C0 controls but not C1, DEL or bidi. Some unchanged sentences still say the hook "drops" such an entry (listed in the CHANGELOG); rewording them is a follow-up.

Not merged: the merge is the maintainer's call.

🤖 Generated with Claude Code

PrzemekGalarowicz and others added 8 commits November 17, 2026 08:55
…annot scope, naming each one

The maintainer's patch (control surface, fix #2), committed before the build anchors (L68), plus the
GATE-1-approved PLAN for setter-dropped-bullets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n took 7.20.0)

The maintainer's patch (control surface), committed before the build anchors (L68).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… PLAN.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fuse the plan (setter-dropped-bullets)

Build of the GATE-1-approved PLAN: the setter's tests, the three floor tests that fed it a glob, the plan
commands' --check guidance, the comments and ac-tests.md sentence that said the setter drops such an item,
the writes-scope guide, and the version bump. Includes REGRESSION.md / regression-report.json
(no-regressions) and the independent review's fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n took 7.21.0); PLAN build round 2

The maintainer's patch (control surface), committed before build round 2's anchor (L68).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er-dropped-bullets REVIEW.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4827a1b and 4f60aaa.

Files ignored due to path filters: 9

  • .dev/features/setter-dropped-bullets/GRILL.md is excluded by !**/.dev/**
  • .dev/features/setter-dropped-bullets/PLAN.md is excluded by !**/.dev/**
  • .dev/features/setter-dropped-bullets/REGRESSION.md is excluded by !**/.dev/**
  • .dev/features/setter-dropped-bullets/REVIEW.md is excluded by !**/.dev/**
  • .dev/features/setter-dropped-bullets/SHIP.md is excluded by !**/.dev/**
  • .dev/features/setter-dropped-bullets/VERIFY.md is excluded by !**/.dev/**
  • .dev/features/setter-dropped-bullets/regression-report.json is excluded by !**/.dev/**
  • .dev/features/setter-dropped-bullets/verify-report.json is excluded by !**/.dev/**
  • .dev/guides/writes-scope.md is excluded by !**/.dev/**
Files selected for processing: 16

  • .claude/commands/pharn-dev-plan.md
  • .claude/commands/pharn-plan.md
  • .claude/hooks/set-writes-scope.cjs
  • .claude/hooks/set-writes-scope.test.cjs
  • CHANGELOG.md
  • README.md
  • SKILLS_VERSION
  • pharn-install.json
  • pharn/floor/ac-tests-core.mjs
  • pharn/floor/ac-tests-lock.mjs
  • pharn/floor/check-ac-tests.test.mjs
  • pharn/floor/check-build-complete.test.mjs
  • pharn/floor/check-regress.mjs
  • pharn/floor/render-regression.mjs
  • pharn/floor/stage-verify.test.mjs
  • pharn/pharn-contracts/ac-tests.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown

pharn

🛡️ pharn-ci · ❌ Fail

Caution

Fail · Diff coverage of this change is 100% against a threshold of 100%; 1 test-integrity finding; 106 agent setup files found.

Verdict Diff coverage Test integrity Agent setup
❌ Fail 100% (threshold 100%) ℹ️ 1 finding 106 files

🧪 Diff coverage

▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰ 100%

100% of changed lines covered (47/47, threshold 100%)

Changed files (5)
File Coverage Covered Uncovered lines
.claude/hooks/set-writes-scope.cjs 100% 31/31
pharn/floor/ac-tests-core.mjs 100% 3/3
pharn/floor/ac-tests-lock.mjs 100% 3/3
pharn/floor/check-regress.mjs 100% 6/6
pharn/floor/render-regression.mjs 100% 4/4

🔍 Test integrity

  • ℹ️ TI15 .claude/hooks/set-writes-scope.cjs:1047 — The condition at ".claude/hooks/set-writes-scope.cjs:1047" compares with a 11-character string literal that the test file ".claude/hooks/set-writes-scope.test.cjs" also adds, so the code may special-case the test's input.
    • Hint: Check that the code handles the general case and not only the test's value, and add a test with another input.

💬 Messages (3)

  • ℹ️ COVERAGE_PATHS_PARTIALLY_UNMATCHED 126 file paths in the coverage report are not tracked files in the repository; their coverage is not used.
    • Hint: Nothing to do if those files are generated or outside the repo; if changed files are missing from the table, check the coverage root.
  • ❌ TEST_INTEGRITY_INDEX_UNAVAILABLE TI02 and TI05 did not run: the text of the touched test files could not be read (`pr-number mode: the diff came from the GitHub API`), so removed tests and emptied assertions are not checked.
    • Hint: Review the named test files by hand for removed tests and weakened assertions. A file over 512 KiB, one with many syntax errors, a missing Python 3.8 or newer for .py files, or git objects that could not be read stop the comparison.
  • ⚠️ AGENT_CONFIG_SECRET_UNSCANNED Agent config files were not scanned for committed secrets: `pr-number mode: the checkout is not the pull request head, so its committed agent config files were not read`.
    • Hint: Keep agent config files text, under 512 KiB and inside the repository, and run on a checkout of the pull request head (not PR-number mode or a compare-API diff), so they can be scanned for committed secrets.

🤖 Agent setup (106 files)

Agent setup: 106 files · claude-code

Agent setup files (106)
Path Kind
.claude/agents/pharn-review-lens.md claude-agent
.claude/agents/pharn-stage.md claude-agent
.claude/commands/pharn-build.md claude-command
.claude/commands/pharn-dev-build.md claude-command
.claude/commands/pharn-dev-eval.md claude-command
.claude/commands/pharn-dev-grill.md claude-command
.claude/commands/pharn-dev-memory-promote.md claude-command
.claude/commands/pharn-dev-plan.md claude-command
.claude/commands/pharn-dev-regress.md claude-command
.claude/commands/pharn-dev-review.md claude-command
.claude/commands/pharn-dev-ship.md claude-command
.claude/commands/pharn-dev-verify.md claude-command
.claude/commands/pharn-grill.md claude-command
.claude/commands/pharn-loop-close.md claude-command
.claude/commands/pharn-loop-quick.md claude-command
.claude/commands/pharn-loop.md claude-command
.claude/commands/pharn-memory-promote.md claude-command
.claude/commands/pharn-plan.md claude-command
.claude/commands/pharn-regress.md claude-command
.claude/commands/pharn-review.md claude-command
.claude/commands/pharn-ship-close.md claude-command
.claude/commands/pharn-ship-quick.md claude-command
.claude/commands/pharn-ship-stages.md claude-command
.claude/commands/pharn-ship.md claude-command
.claude/commands/pharn-spec.md claude-command
.claude/commands/pharn-supervise.md claude-command
.claude/commands/pharn-test.md claude-command
.claude/commands/pharn-triage.md claude-command
.claude/commands/pharn-verify.md claude-command
.claude/hooks/enforce-writes-scope.cjs claude-hook
.claude/hooks/enforce-writes-scope.test.cjs claude-hook
.claude/hooks/hook-wiring.test.cjs claude-hook
.claude/hooks/protect-trusted-paths.cjs claude-hook
.claude/hooks/protect-trusted-paths.test.cjs claude-hook
.claude/hooks/require-loop-record.cjs claude-hook
.claude/hooks/require-loop-record.test.cjs claude-hook
.claude/hooks/set-writes-scope.cjs claude-hook
.claude/hooks/set-writes-scope.test.cjs claude-hook
.claude/hooks/writes-scope-release.test.cjs claude-hook
.claude/settings.json claude-settings
.claude/skills/phargus-diagnose/SKILL.md claude-skill
.claude/skills/phargus-diagnose/agents/openai.yaml claude-skill
.claude/skills/phargus-diagnose/references/compatibility.md claude-skill
.claude/skills/phargus-diagnose/references/data.md claude-skill
.claude/skills/phargus-diagnose/references/diagnosis.md claude-skill
.claude/skills/phargus-diagnose/references/tools.md claude-skill
.claude/skills/phargus-diagnose/scripts/capture.mjs claude-skill
.claude/skills/phargus-diagnose/scripts/operations.mjs claude-skill
.claude/skills/phargus-diagnose/scripts/phargus.mjs claude-skill
.claude/skills/phargus-diagnose/scripts/records.mjs claude-skill
…and 56 more files

pharn-ci 0.10.0 · report schema v2 · coverage format lcov

…n and SHIP.md (GATE 2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@PrzemekGalarowicz
PrzemekGalarowicz merged commit 9422b97 into main Nov 17, 2026
8 checks passed
@PrzemekGalarowicz
PrzemekGalarowicz deleted the przemek/setter-names-dropped-bullets branch November 17, 2026 14:05
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