Skip to content

fix: correctness debt β€” 4 surgical bug fixes#92

Merged
jamestexas merged 2 commits intomainfrom
fix/correctness-debt
Mar 13, 2026
Merged

fix: correctness debt β€” 4 surgical bug fixes#92
jamestexas merged 2 commits intomainfrom
fix/correctness-debt

Conversation

@jamestexas
Copy link
Copy Markdown
Contributor

Summary

Four surgical fixes for correctness issues identified in mache scan:

  • mache-j5x: ListChildren missing rows.Err() check β€” database errors during iteration were silently lost
  • mache-jr6: UpdateNodeContent error swallowed during writeback β€” source file modified but graph left stale with no indication
  • mache-4l9: resolveContent FIFO cache race β€” concurrent goroutines could insert duplicate contentKeys entries, causing unbounded cache growth
  • mache-p73: setNestedField unchecked type assertion β€” panics when a dotted path like a.b.c overwrites an intermediate scalar

Test plan

  • task test β€” all tests pass
  • task lint β€” 0 issues

πŸ€– Generated with Claude Code

jamestexas and others added 2 commits March 13, 2026 10:25
…ssertion

- writable_graph.go: check rows.Err() after ListChildren iteration (mache-j5x)
- root.go: log UpdateNodeContent error instead of discarding it (mache-jr6)
- writable_graph.go: re-check cache after lock reacquire to prevent duplicate
  contentKeys entries and unbounded cache growth (mache-4l9)
- sqlite_graph.go: comma-ok type assertion in setNestedField to prevent panic
  when dotted path overwrites a scalar with a nested map (mache-p73)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- composite.go: sort mount names for deterministic root ListChildren (mache-dgg)
- sqlite_resolver.go: return error when JSON record is not a map instead of
  silently producing empty template renders (mache-shf)
- linter.go: defer QueryCursor.Close() to prevent tree-sitter resource leak (mache-lyf)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jamestexas jamestexas merged commit ccd5b4b into main Mar 13, 2026
12 checks passed
@jamestexas jamestexas deleted the fix/correctness-debt branch March 13, 2026 16:33
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.

1 participant