Commit graph

3 commits

Author SHA1 Message Date
jedarden
4320beaf27 fix(bf-50gc): enforce maxEvents limit, fix cross-references and bead collision detection
1. maxEvents limit enforcement:
   - Changed trimming condition from `> maxEvents + TRIM_BATCH_SIZE` to `> maxEvents`
   - Now properly trims to exactly maxEvents when limit is exceeded
   - Fixed: tests "should trim old events when over limit", "should keep most recent events",
     "should use default maxEvents of 10000"

2. Cross-Reference Integration:
   - Modified CrossReferenceManager.processEvent() to create immediate worker->event links
   - This ensures every event creates at least one cross-reference link
   - Fixed: tests "should track cross-references when events are added",
     "should create links between events and workers", "should find linked entities"

3. Bead collision detection:
   - Fixed detectBeadCollision() to include all workers in collision set
   - Added time window check: only detect collision if other worker was active within
     BEAD_COLLISION_WINDOW_MS (60 seconds)
   - Fixed: tests "should detect collision when multiple workers work on same bead",
     "should not detect bead collision outside time window", "should update worker
     collision types for bead collision"

All 103 tests now pass (1 skipped).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 14:33:51 -04:00
jedarden
9938630bdd feat(web): add ErrorGroupPanel with grouped error cards and similar past errors
Port TUI ErrorGroupPanel to React — groups errors by signature with
occurrence count, affected workers, time span, severity badges, and
expandable detail cards. Links to similar past errors from fabric.db
error_history via /api/errors/history/similar endpoint.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 06:16:46 -04:00
jeda
5fab75708f feat(bd-xig): Implement worker collision detection
- Add BeadCollision, TaskCollision, CollisionAlert types
- Extend WorkerInfo to track activeBead and activeDirectories
- Implement bead collision detection ( detectBeadCollision, getBeadCollisions, getWorkerBeadCollisions)
- Implement task collision detection ( detectTaskCollision, getTaskCollisions
- Implement getWorkerTaskCollisions
- Generate collision alerts with suggestions
- Add getCollisionStats for statistics
- Add cleanupStaleCollisions for bead and task collisions
- Create CollisionAlert TUI component

- Add unit tests for collision detection

🚀 Generated with Claude Worker <noreply@anthropic.com>

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-03 13:50:02 +00:00