Skip to content

fix(workspace): unbreak main after #285/#291/#292 merge collision#305

Merged
coseto6125 merged 1 commit into
mainfrom
fix/unbreak-main-merge-collision
May 21, 2026
Merged

fix(workspace): unbreak main after #285/#291/#292 merge collision#305
coseto6125 merged 1 commit into
mainfrom
fix/unbreak-main-merge-collision

Conversation

@coseto6125
Copy link
Copy Markdown
Owner

@coseto6125 coseto6125 commented May 21, 2026

Summary

main is currently red on 162c52db — `cargo check --workspace --all-targets --all-features` fails with 5 errors. The cause: #285 (T1-4/T1-5/T1-11), #291 (T4-7), and #292 (T7-2) all changed the same schema surface (`Node` struct, `Node.uid` type, `RawSchemaField` fields) but did not rebase against each other, so the merged state has call sites that don't match the merged-state types.

This PR is a forward-only reconciliation — no history rewrite, no force-push. Each fix brings a call site to the shape the original PR author would have written if they had rebased against the other two. End state is identical to a hypothetical "replay the PRs in correct dependency order" branch.

Changes (3 files, ~19 LOC)

  • `post_process/schema_field_mirrors.rs:99-118`
    • Replace `format!()` + `string_pool.add()` UID with `uid::compute(NodeKind::SchemaField, &path_str, Some(owner_name), field_name)` — T1-5 canonical pattern (matches `resolution/builder.rs:372`).
    • Add now-required `content_hash: 0` (synthetic mirror node, no source span — per T7-2 "0 for synthetic nodes" doc convention).
    • Add now-required `owner_class: string_pool.add(owner_name)` (T1-11 rename isolation key — a `Foo.id` SchemaField correctly belongs to class `Foo`).
    • Side effect: drops one heap alloc per SchemaField mirror (no more `format!()` + pool dedup round-trip).
  • `protobuf/parser.rs:101-110`
    • Replace `pool.add(&field_name)` and `pool.add(owner)` with `field_name.into_boxed_str()` and `Box::from(owner.as_str())` — T4-7's chosen Box form.
    • Drop the now-unused `pool` parameter from `extract_proto_fields` + the `StringPool::new()` at the call site (no external callers — verified).
  • `python/parser.rs:17`
    • Add `use ecp_core::pool::StringPool;` — the T5-2 event-topic wire-up at line 1094 references `StringPool::new()` but the import was dropped somewhere during merges.

Audit scope (nothing deferred)

Searched the entire workspace for any related issues hiding behind the same merge collision:

  • All `Node { ... }` literal sites (27 sites across builder.rs, coverage.rs, cypher/executor.rs, process_trace, leiden, test helpers) — all already include `content_hash` and `owner_class` correctly; only `schema_field_mirrors.rs` was missing.
  • All `RawSchemaField { ... }` construction sites (protobuf + `schema_field/extract.rs`) — `schema_field/extract.rs` already uses `name.into()` / `owner.into()` (correct Box); only protobuf needed the migration.
  • All callers of `extract_proto_fields` — none external (one doc-comment-only mention in `tests/protobuf_schema.rs`); signature change safe.
  • All remaining `pool.add(...)` calls in post_process / protobuf / schema_field paths — they're all for `Edge.reason` or `Node.name` (both `StrRef`, correct usage), not stale `RawSchemaField` assignments.
  • `uid::compute` callsite consistency — my new call matches the canonical `(kind, path, owner_class_or_empty, name)` ordering used at `resolution/builder.rs:372` and `commands/coverage.rs:556-661`.

Verification

  • `cargo check --workspace --all-targets --all-features` — clean (was 5 errors before)
  • `cargo clippy --workspace --all-targets --all-features -- -D warnings` — clean
  • `cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::all` — also clean (no pedantic regressions)
  • `cargo test --workspace --no-fail-fast` — 2805 passed, 0 failed, 15 ignored
  • `cargo test --test schema_field_mirror` — 6 passed (covers my schema_field_mirrors.rs edit)
  • `cargo test --test protobuf_schema` — 13 passed (covers my protobuf parser edit)
  • `cargo build -p egent-code-plexus --bin ecp --release` — 0 errors (323 crates)
  • No `NodeKind` / `RelType` / `FrameworkId` enum changes (no rkyv schema disturbance)
  • No `GRAPH_FORMAT_VERSION` bump (binary layout untouched)
  • No hot-path edits (`pre_tool_use::handle`, `compute_hits`, `dispatch_by_mode` untouched)
  • CI on push: Code Quality (Linting & Formatting) now SUCCESS (was the failing job on main)

Three recent PRs landed on main with overlapping schema changes but
were not rebased against each other, leaving main in a state that
fails to compile (CI red on 162c52d):

- #285 (T1-4 + T1-5 + T1-11) — `Node.uid: StrRef → u64`,
  added `Node.owner_class: StrRef`, made `uid::compute` the canonical
  UID source.
- #291 (T4-7 SchemaField + MirrorsField) — added
  `post_process/schema_field_mirrors.rs`, switched
  `RawSchemaField.{name, owner_class}` from `StrRef` to `Box<str>`.
- #292 (T7-2 per-symbol content_hash) — added `Node.content_hash: u64`.

The five resulting compile errors are mechanical: each call site needs
to be brought to the shape the PR author would have written if they
had rebased against the other two. This commit applies that
reconciliation without rewriting history (no force-push to main).

- `post_process/schema_field_mirrors.rs:99-118` — replace the
  `format!()` + `string_pool.add()` UID construction with
  `uid::compute(NodeKind::SchemaField, &path_str, Some(owner_name), field_name)`,
  the T1-5 canonical pattern. Adds the now-required `content_hash: 0`
  (synthetic mirror node, no source span — per T7-2 doc convention) and
  `owner_class: string_pool.add(owner_name)` (T1-11 rename isolation
  key: a SchemaField like `Foo.id` correctly belongs to class `Foo`).
  Side effect: drops one heap allocation per mirror node (no more
  `format!()` String + pool.add round-trip).
- `protobuf/parser.rs:101-110` — replace `pool.add(&field_name)` and
  `pool.add(owner)` (StrRef-returning) with
  `field_name.into_boxed_str()` and `Box::from(owner.as_str())`. Drops
  the now-unused `pool: &mut StringPool` parameter from
  `extract_proto_fields` plus the `StringPool` allocation at the call
  site (3 cosmetic edits in one file).
- `python/parser.rs` — add `use ecp_core::pool::StringPool;` import
  that the existing T5-2 event-topic wire-up at line 1094 already
  assumed.

Verified: `cargo check --workspace --all-targets --all-features`,
`cargo clippy --workspace --all-targets --all-features -- -D warnings`,
and `cargo test --workspace --no-fail-fast` (2805 passed, 15 ignored)
all clean.
@coseto6125 coseto6125 enabled auto-merge (squash) May 21, 2026 18:54
@coseto6125 coseto6125 merged commit 99fa27d into main May 21, 2026
13 checks passed
@coseto6125 coseto6125 deleted the fix/unbreak-main-merge-collision branch May 21, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant