fix: resolve four fishy-logic review findings (search, graph, sync) #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/review-fishy-logic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves the four "fishy logic" findings from the codebase review (Section 2). Four independent, TDD-first fixes — one commit each.
Changes
searchedflag so a zero-result search showsno matches(notpress enter to search) and Enter no longer re-runs a query that already returned nothing. Never-searched state unchanged.BuildIndexkeeps the first page inos.ReadDir(filename-sorted) order for each folded key and warns on stderr, instead of letting the last-walked page silently win.git status --porcelainpreflight now reports stagestatusinstead of the mislabeledadd.rebase-in-progresswhenrebase-merge/rebase-apply/MERGE_HEADis present, so a second sync can't add+commit conflict-marker files.Notes
ByNamebefore the fold-collision check, which (sinceResolvechecksByNamebeforeByNameFold) would have shadowed the deterministic winner and failed the plan's own test. Losers are now skipped from both maps.Verification
go vet ./...clean;go test ./...green across all 7 packages.