fix: stop classifying a bare .abcd/ as managed-repo (iss-88)#109
Merged
Conversation
ahoy folder classification computed the strong (managed) signal as `registered || abcdDir || markerFired`, so the mere presence of an `.abcd/` directory promoted a folder to managed-repo even with no index registration and no marker block. A repo carrying a stray `.abcd/` thus overclaimed managed-repo. Drop `.abcd/` from the strong set: only index registration or a marker block promotes to managed. A stray `.abcd/` now reports unmanaged-repo (git repo) or unmanaged-folder (no git). No new FolderKind is introduced. Detector-first: TestClassifyStrayAbcdDirIsNotManaged asserts a bare `.abcd/` is not managed. Two existing tests encoded the old bug: TestClassifyManagedRepoByAbcdDir asserted `.git`+`.abcd` => managed (repurposed to assert unmanaged-repo), and TestDetectHookManifestGap- OnBrokenPlugin relied on a bare `.abcd/` to reach the gap-detection path (now planted a marker block to make the folder genuinely managed). Assisted-by: Claude:claude-opus-4-8
…-classify # Conflicts: # CHANGELOG.md
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.
What
ahoy's
classifytreated the mere presence of an.abcd/directory as a strong "managed" signal (strong = registered || abcdDir || markerFired), so a bare.abcd/with no registration and no marker block overclaimedmanaged-repo. This dropsabcdDirfrom the strong set — a stray.abcd/now reportsunmanaged-repo/unmanaged-folder.Detector-first
TestClassifyStrayAbcdDirIsNotManaged(bare.abcd/, no.git, no marker) asserts the kind is not managed — watched fail, passes after.Preserved
Both remaining strong signals still classify as managed: index registration, and a
<!-- BEGIN ABCD -->marker block.abcdDiris still recorded insignals["abcd_dir"](no dead variable, no JSON-surface change).Two existing tests that encoded the old behaviour were corrected (with the reviewer confirming they don't mask a regression): one flips its expectation to
unmanaged, the other plants a real marker block so its deeper hook-manifest assertion still exercises the managed path.Checks
Full
go test ./...,gofmt -l .,go vet ./...green.ruthless-reviewer: SHIP, no findings (verified the still-managed paths and the two test updates).Ledger: resolves
iss-88(folded into this branch).Assisted-by: Claude:claude-opus-4-8