Skip to content

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

Description

@gHashTag

Bug

Three needle files have catch unreachable on allocator operations:

  1. src/needle/hnsw.zig line 121:
new_node.layers.append(self.allocator, std.ArrayList(usize).empty) catch unreachable;
  1. src/needle/vsa.zig line 541:
pointers.append(v) catch unreachable;
  1. src/needle/autonomous_refactor.zig line 489:
result.append(std.heap.page_allocator, std.ascii.toLower(c)) catch unreachable;

Fix

Replace all with try. Ensure containing functions return error unions.

Files

  • src/needle/hnsw.zig — 1 catch unreachable
  • src/needle/vsa.zig — 1 catch unreachable
  • src/needle/autonomous_refactor.zig — 1 catch unreachable

Verification

  • zig build compiles clean

Activity

  1. github-actions commented on Mar 12, 2026

    @github-actions
    Contributor

    🚀 Agent container spawned! Deploying on Railway. Tracking in this issue.

  2. github-actions commented on Mar 12, 2026

    @github-actions
    Contributor

    🚀 Agent container spawned! Deploying on Railway. Tracking in this issue.

  3. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent | 2026-03-12T00:14:13Z
    📋 Step: 1/8 — Authenticating with GitHub
    🔄 Status: AWAKENING
    ⏱️ Elapsed: 0s

  4. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent | 2026-03-12T00:14:14Z
    📋 Step: 1/8 — Authenticating with GitHub
    🔄 Status: AWAKENING
    ⏱️ Elapsed: 1s

  5. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent Dashboard — Issue #274

    Field Value
    Status AWAKENING
    Step 1/8
    Detail Authenticating with GitHub
    Elapsed 0s
    Container agent-274
    Updated 2026-03-12T00:14:13Z
  6. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent Dashboard — Issue #274

    Field Value
    Status AWAKENING
    Step 1/8
    Detail Authenticating with GitHub
    Elapsed 1s
    Container agent-274
    Updated 2026-03-12T00:14:14Z
  7. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent Dashboard — Issue #274

    Field Value
    Status AWAKENING
    Step 2/8
    Detail Creating worktree from bare repository
    Elapsed 4s
    Container agent-274
    Updated 2026-03-12T00:14:17Z
  8. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent | 2026-03-12T00:14:17Z
    📋 Step: 1/8 — Authenticating with GitHub
    🔄 Status: AWAKENING
    ⏱️ Elapsed: 0s

  9. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🌅 Trinity Agent Dashboard — Issue #274

    Field Value
    Status AWAKENING
    Step 2/8
    Detail Creating worktree from bare repository
    Elapsed 5s
    Container agent-274
    Updated 2026-03-12T00:14:18Z
  10. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ☠️ Trinity Agent | 2026-03-12T00:14:18Z
    📋 Step: 2/8 — Container terminated by signal
    🔄 Status: KILLED
    ⏱️ Elapsed: 1s

  11. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ☠️ Trinity Agent Dashboard — Issue #274

    Field Value
    Status KILLED
    Step 2/8
    Detail Container terminated by signal
    Elapsed 1s
    Container agent-274
    Updated 2026-03-12T00:14:18Z
  12. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ☠️ Trinity Agent | 2026-03-12T00:14:23Z
    📋 Step: 3/8 — Container terminated by signal
    🔄 Status: KILLED
    ⏱️ Elapsed: 10s

  13. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    📖 Trinity Agent | 2026-03-12T00:14:23Z
    📋 Step: 3/8 — Reading issue #274
    🔄 Status: READING
    ⏱️ Elapsed: 10s

  14. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    📖 Trinity Agent Dashboard — Issue #274

    Field Value
    Status READING
    Step 3/8
    Detail Reading issue #274
    Elapsed 10s
    Container agent-274
    Updated 2026-03-12T00:14:23Z
  15. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ✅ Trinity Agent Dashboard — Issue #274

    Field Value
    Status DONE
    Step 8/8
    Detail PR created with 1 commits
    Elapsed 251s
    Container agent-274
    Updated 2026-03-12T00:18:24Z
  16. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ⚡ Trinity Agent | 2026-03-12T00:14:27Z
    📋 Step: 4/8 — Claude Code running (timeout: 3600s)
    🔄 Status: CODING
    ⏱️ Elapsed: 14s

  17. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ✅ Agent: Claude | 2026-03-12
    📋 Step: 1/1 — Fix catch unreachable → try
    🔄 Status: DONE

    Thought: Three locations had catch unreachable on allocator operations which could mask OOM errors.

    Action:

    1. src/needle/hnsw.zig:121 → Changed append(...).catch unreachable to try append(...)
    2. src/needle/vsa.zig:541 → Changed bundleVSA return type to !HybridBigInt
    3. src/needle/autonomous_refactor.zig:489 → Changed toLower return type to !std.ArrayList(u8) and propagated through classifyConfidence, classifyScope, classifySafety

    Result: All three files compile clean with zig build-obj.

    Next: PR #276 ready for review.

  18. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🧪 Trinity Agent | 2026-03-12T00:18:08Z
    📋 Step: 5/8 — All files compile clean with zig build-obj.
    🔄 Status: TESTING
    ⏱️ Elapsed: 235s

  19. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🔄 Trinity Agent | 2026-03-12T00:18:11Z
    📋 Step: 5/8 — Self-review (advisory)
    🔄 Status: REVIEWING
    ⏱️ Elapsed: 238s

  20. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🧪 Trinity Agent | 2026-03-12T00:18:17Z
    📋 Step: 6/8 — Checking/creating PR
    🔄 Status: TESTING
    ⏱️ Elapsed: 244s

  21. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    🚀 Trinity Agent | 2026-03-12T00:18:21Z
    📋 Step: 7/8 — PR #276 already exists
    🔄 Status: PR_CREATED
    ⏱️ Elapsed: 248s

  22. gHashTag commented on Mar 12, 2026

    @gHashTag
    OwnerAuthor

    ✅ Trinity Agent | 2026-03-12T00:18:24Z
    📋 Step: 8/8 — PR created with 1 commits
    🔄 Status: DONE
    ⏱️ Elapsed: 251s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:spawnAuto-spawn agent container

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions