Skip to content

fix(sem-annotate): treat added-since-anchor as stale; drop misdiagnosed orphan check (v2.4.4) - #41

Merged
ericfitz merged 1 commit into
mainfrom
fix/sem-annotate-39
Aug 17, 2026
Merged

fix(sem-annotate): treat added-since-anchor as stale; drop misdiagnosed orphan check (v2.4.4)#41
ericfitz merged 1 commit into
mainfrom
fix/sem-annotate-39

Conversation

@ericfitz

Copy link
Copy Markdown
Owner

Fixes #39. Supersedes the #30/#34 diagnosis; retracts the sem#479 upstream note.

What was actually wrong

The tmi DeduplicateGroups marker 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 -- file therefore correctly reports the entity as added, and _parse_changed_entities only counted modified → 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 case stale — the maintainer's cannot-reproduce on Ataraxy-Labs/sem#479 was right.

Changes

  • _parse_changed_entities: added now counts as anchor-invalidating alongside modified (deleted/moved/reordered still keep their marker).
  • Removed sha_reachable() and the v2.4.3 orphaned status: 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).
  • SKILL.md status list updated; docs/upstream/sem-orphaned-anchor-staleness.md replaced with a retraction.
  • dev plugin 2.4.3 → 2.4.4.

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 pytest 838 passed
  • Real-sem repros: anchor-predates-entity (linear, reachable) → alpha: stale (was [] on v2.4.2 and v2.4.3); squash-merge repo with one changed and one untouched entity → only the changed one stale (v2.4.3 flagged both orphaned)

🤖 Generated with Claude Code

https://claude.ai/code/session_01KfrzX6KD4gbTr8KMziUJjt

…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
@ericfitz
ericfitz merged commit 04ed7a1 into main Aug 17, 2026
1 check passed
@ericfitz
ericfitz deleted the fix/sem-annotate-39 branch August 17, 2026 18:28
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.

fix(sem-annotate): anchor predating the entity is classified fresh (sem diff 'added' ignored); v2.4.3 orphaned check misdiagnosed sem#479

1 participant