Skip to content

fix(needle): catch unreachable → try in hnsw.zig, vsa.zig, autonomous_refactor.zig#276

Merged
gHashTag merged 1 commit intomainfrom
feat/issue-274
Mar 12, 2026
Merged

fix(needle): catch unreachable → try in hnsw.zig, vsa.zig, autonomous_refactor.zig#276
gHashTag merged 1 commit intomainfrom
feat/issue-274

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

Summary

  • Replace catch unreachable with try in three needle files for proper error handling
  • Update function signatures to return error unions where needed
  • Propagate errors through classification helper functions

Changes

File Line Fix
src/needle/hnsw.zig 121 append now uses try
src/needle/vsa.zig 541 bundleVSA now returns !HybridBigInt
src/needle/autonomous_refactor.zig 489 toLower now returns !std.ArrayList(u8)

The autonomous_refactor.zig changes required updating:

  • classifyConfidence → returns !f32
  • classifyScope → returns !RefactorScope
  • classifySafety → returns !SafetyLevel
  • analyzeIntent calls now use try

Verification

All three files compile clean with zig build-obj.

Closes #274

🤖 Generated with Claude Code

…_refactor.zig (#274)

Replace catch unreachable with proper error handling:
- hnsw.zig:121 - append to layers now uses try
- vsa.zig:541 - bundleVSA now returns error union
- autonomous_refactor.zig:489 - toLower now returns error union
  - Updated classifyConfidence/classifyScope/classifySafety to propagate errors
  - Updated analyzeIntent to use try for classification calls

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gHashTag gHashTag merged commit c4e2381 into main Mar 12, 2026
5 of 6 checks passed
@gHashTag gHashTag deleted the feat/issue-274 branch March 12, 2026 00:24
gHashTag pushed a commit that referenced this pull request Mar 12, 2026
PR #276: hnsw + vsa + autonomous_refactor 3x → try
PR #277: ann_brute_simd + ann_lsh_ternary 3x → try
Total: 57 autonomous agent PRs, needle/ catch unreachable = ZERO.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Mar 18, 2026
…_refactor.zig (#274) (#276)

Closes #274. 3x catch unreachable → try in hnsw, vsa, autonomous_refactor.
gHashTag pushed a commit that referenced this pull request Mar 18, 2026
PR #276: hnsw + vsa + autonomous_refactor 3x → try
PR #277: ann_brute_simd + ann_lsh_ternary 3x → try
Total: 57 autonomous agent PRs, needle/ catch unreachable = ZERO.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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(needle): catch unreachable → try in hnsw.zig, vsa.zig, autonomous_refactor.zig

1 participant