Add deprecate action and staleness check to BitLesson workflow#188
Open
LukeLIN-web wants to merge 2 commits into
Open
Add deprecate action and staleness check to BitLesson workflow#188LukeLIN-web wants to merge 2 commits into
LukeLIN-web wants to merge 2 commits into
Conversation
BitLesson's knowledge base was effectively append-only: the round stop
gate validates only the Delta format, with no way to retire a superseded
lesson and no check that an existing lesson's cited paths still resolve.
After a refactor, entries silently rot, and a stale lesson handed to an
implementer is worse than none.
deprecate:
- bitlesson-validate-delta.sh accepts `Action: deprecate`, routed through
the existing concrete-ID + Notes checks so it references a real entry.
- Deprecation is a tombstone, not a delete: mark the entry
`Status: deprecated` and keep it for history; bitlesson-select.sh never
selects a deprecated entry.
- Contract text updated across docs/bitlesson.md, commands/start-rlcr-loop.md,
templates/bitlesson.md, setup-rlcr-loop.sh, loop-codex-stop-hook.sh, and
the bitlesson-delta-{invalid,missing} block templates.
staleness:
- New scripts/bitlesson-staleness.sh reports entries whose cited file
references no longer resolve under the project root. Advisory by default,
--strict exits non-zero, deprecated entries skipped.
- Detection is extension-anchored for precision: it ignores prose slashes
and ratios (GO/NO-GO, 248/275), fenced template blocks, and ellipses.
tests:
- +4 validator cases (deprecate) and a new staleness suite (8 cases), both
registered in run-all-tests.sh. Full suite: 2265 pass, 0 fail.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Behavior unchanged (same flags on the real KB, all 8 tests green); ~254 -> 132 lines. - Drop guards now subsumed by extension-anchoring + the path charset (glob/special-char chain, URL `//`, ratio, leading-dash checks). - Replace the per-token `find` + cache with a single repo scan: collect file basenames once, resolve bare filenames via membership test. - Replace the report state machine with an ordered map printed at the end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BitLesson's knowledge base was effectively append-only: the round stop gate validates only the Delta format, with no way to retire a superseded lesson and no check that an existing lesson's cited paths still resolve. After a refactor, entries silently rot, and a stale lesson handed to an implementer is worse than none.
deprecate:
Action: deprecate, routed through the existing concrete-ID + Notes checks so it references a real entry.Status: deprecatedand keep it for history; bitlesson-select.sh never selects a deprecated entry.staleness:
tests: