fix(sem-annotate): treat added-since-anchor as stale; drop misdiagnosed orphan check (v2.4.4) - #41
Merged
Merged
Conversation
…ed orphan check (v2.4.4) The tmi DeduplicateGroups incident (#30) was not a squash-merge/orphaned- anchor problem. Its marker had been hand-written in the same commit that created the file, anchored at then-HEAD -- the parent of the introducing commit -- so `sem diff <anchor>..HEAD -- file` correctly reported the entity as `added`, and _parse_changed_entities, which counted only `modified`, classified it fresh forever. Reproduces in linear history with a fully reachable anchor; the maintainer's cannot-reproduce on Ataraxy-Labs/sem#479 was right (verified: sem 0.21.0 diffs orphaned-but- present bases correctly, and the pre-v2.4.3 scan classified that case stale). - _parse_changed_entities: `added` now counts as anchor-invalidating alongside `modified`. Deleted/moved/reordered still keep their marker. - Remove sha_reachable() and the `orphaned` status from v2.4.3: keyed on a condition that does not cause the failure, and in a squash-merge repo it re-described every branch-written marker after every release. - SKILL.md status list updated; docs/upstream note replaced with a retraction pointing at sem#479's closure and #39. Fixes #39. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KfrzX6KD4gbTr8KMziUJjt
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.
Fixes #39. Supersedes the #30/#34 diagnosis; retracts the sem#479 upstream note.
What was actually wrong
The tmi
DeduplicateGroupsmarker was hand-written in the same commit that created its file, anchored at then-HEAD — the parent of the introducing commit.sem diff <anchor>..HEAD -- filetherefore correctly reports the entity asadded, and_parse_changed_entitiesonly countedmodified→ classified fresh forever. This reproduces in linear history with a fully reachable anchor; squash-merge orphaning was a coincidence (every branch-written anchor is unreachable in that workflow), not the cause. Verified sem 0.21.0 diffs orphaned-but-present bases correctly and the pre-v2.4.3 scan classified that casestale— the maintainer's cannot-reproduce on Ataraxy-Labs/sem#479 was right.Changes
_parse_changed_entities:addednow counts as anchor-invalidating alongsidemodified(deleted/moved/reordered still keep their marker).sha_reachable()and the v2.4.3orphanedstatus: it keyed on a non-causal condition and, in a squash-merge repo, re-described every branch-written marker after every release (an untouched sibling entity was flagged alongside the changed one).docs/upstream/sem-orphaned-anchor-staleness.mdreplaced with a retraction.Cost note
A hand-anchored-at-HEAD marker is now re-described once at the next scan (it becomes
stale), after which it carries a proper anchor. That is one extra describe per hand-written marker, versus v2.4.3's whole-codebase re-describe after each squash.Verification
uv run ruff check .clean;uv run pytest838 passedalpha: stale(was[]on v2.4.2 and v2.4.3); squash-merge repo with one changed and one untouched entity → only the changed onestale(v2.4.3 flagged bothorphaned)🤖 Generated with Claude Code
https://claude.ai/code/session_01KfrzX6KD4gbTr8KMziUJjt