Skip to content

fix(ProposalGC): ABSORBED requires the whole entry in the body, not a 60-char prefix (#2185) - #2197

Open
Bowlerjim wants to merge 1 commit into
danielmiessler:mainfrom
Bowlerjim:fix/2185-proposalgc-absorbed
Open

Bowlerjim wants to merge 1 commit into
danielmiessler:mainfrom
Bowlerjim:fix/2185-proposalgc-absorbed

Conversation

@Bowlerjim

Copy link
Copy Markdown

Fixes #2185.

The header states the invariant: "only three removal classes, each PROVABLE ... it cannot drop a live directive", with ABSORBED defined as "the entry's substantive text already appears verbatim in the file's canonical body". The code tested normalize(entry).slice(0, 60), so any proposal whose first 60 characters appeared in the body was deleted whole.

The colliding case is the ordinary one: the reviewer restates an existing rule in order to extend it. The restatement matches the body, and the extension is destroyed with it. This is not human-gated, since --auto (the documented scheduled entry point) implies --apply.

This requires the entire normalized entry, keeping the 30-character floor.

Verified on a fixture whose body holds a backup rule and whose proposals section holds (a) that rule restated with an added offsite-copy clause and (b) an exact restatement. Before: both classified absorbed, and --apply emptied the section. After: only the exact restatement is removed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PuS77R8a6Lhp7jK6dnwdTh

… 60-char prefix (danielmiessler#2185)

The header states the invariant: "only three removal classes, each PROVABLE
... it cannot drop a live directive", with ABSORBED defined as "the entry's
substantive text already appears verbatim in the file's canonical body".
The code tested `normalize(entry).slice(0, 60)` — any proposal whose first
60 characters appear in the body was deleted whole.

The colliding case is the ordinary one: the reviewer restates an existing
rule in order to extend it. The restatement matches the body, and the
extension is destroyed with it. This is not human-gated: `--auto`, the
documented scheduled entry point, implies `--apply`.

Require the entire normalized entry, keeping the 30-character floor.

Verified on a fixture whose body holds a backup rule and whose proposals
section holds (a) that rule restated with an added offsite-copy clause and
(b) an exact restatement. Before: both classified `absorbed`, and `--apply`
emptied the section. After: only the exact restatement is removed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PuS77R8a6Lhp7jK6dnwdTh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant