Skip to content

fix(core): parallelize PreToolUse hooks, backfill extraction, dedupe MAGE mapping - #6297

Merged
bug-ops merged 1 commit into
mainfrom
fix/6259-agent-tier-arch-fixes
Jul 14, 2026
Merged

fix(core): parallelize PreToolUse hooks, backfill extraction, dedupe MAGE mapping#6297
bug-ops merged 1 commit into
mainfrom
fix/6259-agent-tier-arch-fixes

Conversation

@bug-ops

@bug-ops bug-ops commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

Three independent architecture-review findings in crates/zeph-core/src/agent/, all P2, no dependencies between them, filed by the same review pass and grouped into one PR.

Review notes

A review pass caught a factually incorrect safety comment introduced for #6261: the original comment attributed graph_backfill's concurrency safety to EntityResolver::lock_name, but extract_and_store builds a fresh EntityResolver (and a fresh, empty name_locks map) per call, so lock_name never spans the 4 concurrent calls in a batch. The comment now correctly cites the DB-level UNIQUE constraint + ON CONFLICT upsert as the actual safety mechanism. graph_backfill passes embedding_store=None, so the one non-transactional path (Qdrant fuzzy match) is skipped entirely for backfill.

Test plan

Closes #6259
Closes #6261
Closes #6272

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate bug Something isn't working size/XL Extra large PR (500+ lines) labels Jul 14, 2026
@bug-ops
bug-ops enabled auto-merge (squash) July 14, 2026 20:38
…upe MAGE signal mapping

Three independent architecture-review findings in the agent turn loop:
PreToolUse hooks fired sequentially per tier (mirrors the already-fixed
PostToolUse twin, #6128); graph_backfill extracted entities strictly
sequentially despite the store's per-entity upsert already making
concurrent extraction safe; begin_turn re-derived the MAGE signal type
from a raw code instead of matching the already-computed RiskSignal enum.

Closes #6259
Closes #6261
Closes #6272
@bug-ops
bug-ops force-pushed the fix/6259-agent-tier-arch-fixes branch from cd65bb9 to 210a9a9 Compare July 14, 2026 20:38
@bug-ops
bug-ops merged commit 8b5bc72 into main Jul 14, 2026
43 checks passed
@bug-ops
bug-ops deleted the fix/6259-agent-tier-arch-fixes branch July 14, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

1 participant