refactor: resolve 4 file-level dependency 2-cycles (architecture backlog) #32

Open
opened 2026-07-20 22:38:58 +02:00 by buildagent · 1 comment
Member

From the 2026-07-20 brainstorm architecture lens (_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md) — real cycles in the current codebase, verified over symbol_edges. Not bugs (declined for the v0.5.19 fix round), but each is a pair of files that cannot be edited independently:

  1. crates/cli/src/main.rs ↔ crates/cli/src/link.rs
  2. crates/cli/src/main.rs ↔ crates/cli/src/doctor.rs
  3. crates/indexer/src/db.rs ↔ crates/indexer/src/migrations.rs
  4. crates/daemon/src/access.rs ↔ crates/daemon/src/local_index.rs

(A fifth, in the ruby test fixtures user.rb ↔ post.rb, is intentional fixture content.)

Suggested direction: extract the shared surface each pair trades (e.g. cli main's arg structs vs subcommand entry points; db.rs's open/pragma helpers vs migrations' run) so the edges point one way. Once #28 (detect_cycles) ships, its conformance mode can enforce cycle-freedom in CI.

From the 2026-07-20 brainstorm architecture lens (`_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md`) — real cycles in the current codebase, verified over `symbol_edges`. Not bugs (declined for the v0.5.19 fix round), but each is a pair of files that cannot be edited independently: 1. `crates/cli/src/main.rs ↔ crates/cli/src/link.rs` 2. `crates/cli/src/main.rs ↔ crates/cli/src/doctor.rs` 3. `crates/indexer/src/db.rs ↔ crates/indexer/src/migrations.rs` 4. `crates/daemon/src/access.rs ↔ crates/daemon/src/local_index.rs` (A fifth, in the ruby test fixtures `user.rb ↔ post.rb`, is intentional fixture content.) Suggested direction: extract the shared surface each pair trades (e.g. cli main's arg structs vs subcommand entry points; db.rs's open/pragma helpers vs migrations' run) so the edges point one way. Once #28 (detect_cycles) ships, its conformance mode can enforce cycle-freedom in CI.
Author
Member

Triage: P3 internal architecture backlog

Keep this as tech debt, separate from the agent-product roadmap. Do not refactor solely to satisfy a cycle metric: verify each direction represents harmful ownership coupling and that extraction produces a simpler one-way boundary.

After #28 exists, use it to record the baseline and prove each change removes a production SCC without creating another. The intentional Ruby fixture cycle should remain explicitly excluded/labeled.

### Triage: P3 internal architecture backlog Keep this as tech debt, separate from the agent-product roadmap. Do not refactor solely to satisfy a cycle metric: verify each direction represents harmful ownership coupling and that extraction produces a simpler one-way boundary. After #28 exists, use it to record the baseline and prove each change removes a production SCC without creating another. The intentional Ruby fixture cycle should remain explicitly excluded/labeled.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
h-dv/code-index#32
No description provided.