Files
Mert Koseoglu 1d7affa353 feat(hooks): classifiers for error/command/duration metadata
Add pure, ABI-bound classifiers that derive per-event metadata from
PostToolUse hook stdin so the bridge can ship full seed-shape parity
with the platform dashboard:

  * classifyError    -> {error_category, error_tool}; 10 categories
                       match seed.ts pickErrorClassification exactly
  * classifyCommand  -> {command_type, command_tool} for Bash calls
  * bucketizeDuration -> fast/medium/slow/timeout bucket on latency_ms

Per the OSS handoff (ANOMALY #3) these columns are not read by the
ingestion engine, but populating them keeps the dashboard rendering
symmetrically with seed and unblocks the bridge's column-parity work.

Tests: 34/34 GREEN. Pattern matrix covers one case per error category,
eight command buckets, four duration buckets, plus null/undefined/
empty-string and tokeniser edge cases (env-var prefix, sudo wrapper).

PRD-context-as-a-service §5 ABI parity.
2026-06-01 09:13:03 +03:00

7.9 KiB