Skip to content

perf(classifiers): PII NER still timing out at 30s in --features full builds — metal feature not included in 'full' #2538

@bug-ops

Description

@bug-ops

Summary

The PII NER model (piiranha) continues to time out with timeout_ms=30000 during memory_search calls even after PR #2518 added input truncation. Root cause: the full feature bundle does not include metal, so candle runs on CPU only on macOS Apple Silicon.

Observed (CI-357, 2026-03-31, v0.18.1)

WARN zeph_core::agent::tool_execution: PII NER timed out, regex only timeout_ms=30000 tool=memory_search

Consistently triggers when running cargo run --features full -- --config testing.toml.

Root Cause

#2396 fixed Device::Cpu hardcoding by adding device::detect_device() which uses Metal when the metal feature is enabled. However, the full feature bundle in Cargo.toml does NOT include metal:

full = ["desktop", "ide", "server", "chat", "pdf", "stt", "acp-unstable", "experiments", 
        "guardrail", "policy-enforcer", "context-compression", "bundled-skills", 
        "scheduler", "classifiers"]  # <-- metal missing

On Apple Silicon, without Metal acceleration, the piiranha model load time (~1.1 GB) exceeds 30s on CPU.

Impact

  • PII NER is effectively non-functional in --features full builds on macOS without adding --features metal manually
  • Regex-only fallback means structured PII (CITY, PERSON, ORG) is not detected
  • Testing CI uses --features full exclusively — NER gap is never caught in CI

Fix Options

  1. Add metal to the full feature bundle (makes it macOS-specific): full = [..., "metal"]
  2. Add platform-specific full alias: full-macos = ["full", "metal"]
  3. Add metal to desktop or ml bundle
  4. Document in CI instructions: on macOS, use --features full,metal for testing

Option 4 is lowest risk and avoids cross-platform issues. Updating CLAUDE.md testing commands would be sufficient.

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexitybugSomething isn't workingsecuritySecurity-related issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions