Skip to content

refactor: use git-warp API properly — eliminate pass-through wrappers#296

Merged
flyingrobots merged 6 commits intomainfrom
refactor/warp-api-cleanup
Feb 26, 2026
Merged

refactor: use git-warp API properly — eliminate pass-through wrappers#296
flyingrobots merged 6 commits intomainfrom
refactor/warp-api-cleanup

Conversation

@flyingrobots
Copy link
Owner

@flyingrobots flyingrobots commented Feb 26, 2026

Summary

  • Remove 5 pass-through wrapper functions that added zero value over calling the WARP graph directly: getNodes, hasNode, saveGraph, queryEdges, getNodesByPrefix
  • Replace all internal loadGraph() calls with initGraph() (they were identical — WarpGraph.open is idempotent)
  • Keep loadGraph as deprecated alias for public API backward compat
  • Net: -171 lines, +112 lines across ~45 call sites. 579 tests passing.

Problem Statement

git-mind wraps @git-stunts/git-warp in thin abstraction layers that obscure the real API and duplicate capabilities the graph engine already provides. Functions like getNodes(graph) that literally return graph.getNodes() add indirection with zero value.

ADR Compliance (Required)

Relevant ADR(s)

  • None

Compliance Declaration

  • This PR is fully compliant with all checked ADRs.

Architecture Laws Checklist (Hard Gates)

Canonical Truth & Context

  • Graph remains canonical truth (no dual truth with generated files).
  • No hidden worktree coupling introduced in core/domain/materialization paths.
  • Context-sensitive behavior is explicit (--at, --observer, --trust) or deterministically defaulted.
  • Resolved context is surfaced in output metadata where applicable.

Determinism & Provenance

  • Pure query/materialization paths remain deterministic for identical inputs.
  • Mutations/materializations include provenance receipts/envelopes where required.
  • Cache keys (if used) are derived only from semantic inputs + pinned versions.

Artifact Hygiene

  • No forbidden generated artifact paths are tracked.
  • Any generated artifacts intentionally tracked are in allowlisted publish paths only.
  • Pre-commit/CI policy checks updated or confirmed valid.

Contracts & Compatibility

  • Machine-facing outputs are schema-versioned.
  • Breaking contract changes include version bump + migration notes.
  • Backward compatibility impact is documented below.

Extension/Effects Safety (if applicable)

  • Extension behavior does not bypass capability restrictions.
  • Effectful operations use explicit plan/apply semantics and emit receipts.
  • Timeouts/resource bounds are defined for new script/effect paths.

Scope Control

  • PR is single-purpose/cohesive (no unrelated refactors).
  • Any non-essential refactor is split into separate PR(s) or explicitly justified.

Backward Compatibility

  • CLI/API contract changes: Five public API exports removed (getNodes, hasNode, saveGraph, queryEdges, getNodesByPrefix). All have direct WARP API replacements documented in CHANGELOG.
  • Data model/storage changes: None
  • Migration required?: Yes — consumers importing removed symbols must switch to native graph methods.
  • User-facing behavior changes: None — CLI commands unchanged.

Test Plan (Required)

Unit

  • Added/updated tests for changed logic
  • Commands:
npx vitest run  # 579 tests pass, 29 files

Integration

  • Added/updated integration tests
  • Commands:
npx vitest run  # includes integration tests

Determinism

  • Determinism assertions included for relevant paths
  • Method: All existing determinism tests pass unchanged
  • Commands:
npx vitest run

Contract/Schema

  • Schema validation updated/passing
  • Commands:
npx vitest run test/contracts.test.js

Policy Gates

  • Mechanical architecture gates pass
  • Commands:
# Pre-commit hooks run automatically

Security / Trust Impact

  • Threat surface changed?: No
  • Trust policy impact: None
  • Provenance/audit impact: None
  • New failure modes introduced: None

Performance Impact

  • Hot path affected?: No
  • Expected impact (latency/memory/io): Negligible (one fewer stack frame)
  • Benchmarks or profiling evidence: N/A

Observability / Debuggability

  • Errors are actionable and include context.
  • Logs/diagnostics added or updated where needed.
  • git mind status / diagnostics updated if writeback/eventing behavior changed.

Operational Notes

  • Feature flag (if any): None
  • Rollback strategy: Revert commit
  • Operational caveats: None

Linked Issues / Milestones

- Remove getNodes(graph) wrapper — callers use graph.getNodes() directly
- Remove hasNode(graph, id) wrapper — callers use graph.hasNode() directly
- Remove saveGraph(graph) — dead code with zero call sites
- Replace all loadGraph() calls with initGraph() (they were identical)
- Keep loadGraph as deprecated alias for public API backward compat
- Remove queryEdges() — inline filter at CLI call site, tests use graph.getEdges() directly
- Remove getNodesByPrefix() — inline filter at single CLI call site
- Keep getNode() — adds real value (Map→object, prefix classification)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 496e636 and 89d6e36.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • test/review.test.js

Summary by CodeRabbit

  • Breaking Changes

    • Removed public wrapper methods: getNodes(), hasNode(), saveGraph(), queryEdges(), and getNodesByPrefix(). Update your code to use the equivalent methods directly on graph instances instead of these standalone functions.
  • Deprecated

    • loadGraph() is now deprecated. Use initGraph() as the primary method for graph initialization.

Walkthrough

Removes five pass-through wrapper exports (getNodes, hasNode, saveGraph, queryEdges, getNodesByPrefix), marks loadGraph deprecated in favor of initGraph, replaces internal loadGraph(...) calls with initGraph(...) across CLI and core modules, updates tests to use graph instance methods, and bumps package to 5.0.0 with CHANGELOG updated.

Changes

Cohort / File(s) Summary
Changelog & Version
CHANGELOG.md, package.json
Added 5.0.0 Unreleased section describing breaking changes; bumped package version to 5.0.0.
Public API surface
src/index.js, src/graph.js, src/edges.js, src/nodes.js
Removed exported wrappers: getNodes, hasNode, saveGraph, queryEdges, getNodesByPrefix. loadGraph annotated deprecated; initGraph is the canonical initializer.
CLI & Core flow
src/cli/commands.js, src/diff.js
Replaced internal loadGraph(...) usages with initGraph(...) in command handlers and diff orchestration; code now obtains nodes/edges via graph.getNodes() / graph.getEdges() and applies inline filtering.
Edge helpers removal
src/edges.js, test/edges.test.js, test/review.test.js, test/merge.test.js, test/remote.test.js
Deleted queryEdges export and updated call sites/tests to use graph.getEdges() plus inline filters or small test helpers.
Node helpers removal
src/nodes.js, test/nodes.test.js
Deleted getNodes, hasNode, getNodesByPrefix wrappers; callers/tests now use graph.getNodes() / graph.hasNode() and apply in-place prefix filtering.
Tests & mocks
test/*.test.js (edges, graph, hooks, merge, nodes, remote, resolve-context, review)
Replaced loadGraph with initGraph in tests and updated imports/expectations; adapted tests to new instance-method based APIs and deprecated alias behavior where relevant.

Sequence Diagram(s)

(Skipped — changes are API surface removals and call-site replacements; no new multi-component interaction flow added that requires sequence visualization.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🧩 Thin wrappers cut, the surface trimmed and neat,
Init wakes the graph, no middleman to greet.
Tests now call methods, edges filtered in place,
Exports fewer, code with clearer face.
Ship the bump — 5.0.0 strides with steady feet.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title is specific and directly describes the main refactoring effort: eliminating pass-through wrappers and using native WARP API properly, matching the changeset's core purpose.
Description check ✅ Passed Description comprehensively covers all required sections: summary, problem statement, ADR compliance (declared none), architecture laws checklist, scope control, backward compatibility, detailed test plan, security/performance/observability impact, and linked issues.
Linked Issues check ✅ Passed All phase 1 objectives from #295 are met: five pass-through wrappers removed (getNodes, hasNode, saveGraph, queryEdges, getNodesByPrefix), loadGraph replaced with initGraph internally, and loadGraph retained as deprecated alias for backward compatibility.
Out of Scope Changes check ✅ Passed All changes are in-scope with #295: wrapper elimination, loadGraph→initGraph migration, test updates, CHANGELOG additions, and version bump (5.0.0) to signal breaking changes. No unrelated refactors or scope creep detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/warp-api-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 660e297da5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

package.json Outdated
{
"name": "@neuroglyph/git-mind",
"version": "4.0.1",
"version": "4.1.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Publish this API removal as a major version bump

This release removes previously exported symbols (saveGraph, queryEdges, getNodes, hasNode, getNodesByPrefix) from src/index.js, so existing consumers on ^4.0.0 that import any of these names will fail module loading after upgrading (does not provide an export named ...). Since the package version here is only bumped to 4.1.0, this is a SemVer-breaking change shipped as a minor; either keep deprecated re-exports for the 4.x line or bump to 5.0.0.

Useful? React with 👍 / 👎.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Around line 10-23: Add a link definition for the new release tag [4.1.0] at
the bottom link section to match other versions (place it alongside the existing
definitions, e.g., before the `[3.1.0]` link block) so the `[4.1.0]` reference
becomes a proper hyperlink; also rename the "Removed" section heading to
"Breaking" (or add a "Breaking" section) in the `[4.1.0]` release notes to
reflect that the removed wrappers (getNodes(graph), hasNode(graph, id),
saveGraph(graph), queryEdges(graph, filter), getNodesByPrefix(graph, prefix))
are breaking changes while keeping the `loadGraph()`/`initGraph()` note as-is.

In `@package.json`:
- Line 3: Version bump in package.json is incorrect for a breaking change:
update the "version" field from "4.1.0" to "5.0.0" to reflect removal of public
exports; specifically ensure consumers of removed symbols (getNodes, hasNode,
saveGraph, queryEdges, getNodesByPrefix) see a major version increase and update
any changelog/release notes referencing src/index.js to document the removed API
surface.

In `@src/index.js`:
- Around line 6-8: The public API was reduced by removing exports saveGraph,
queryEdges, getNodes, hasNode, and getNodesByPrefix; update consumer docs by
adding a concise MIGRATION.md (and update README/API docs) that lists each
removed symbol and the exact migration snippet: replace queryEdges(...) with
graph.getEdges(... /* apply inline filter */), replace getNodes() with
graph.getNodes(), replace hasNode(id) with graph.hasNode(id), replace
getNodesByPrefix(prefix) with graph.getNodes().filter(id => id.startsWith(prefix
+ ':')), and note saveGraph is removed (dead code) with recommended alternative
or confirmation it's unnecessary; reference the CHANGELOG entry and include
minimal example code for each mapping.

In `@test/review.test.js`:
- Around line 95-96: Extract a small async test helper to avoid repeating the
(await graph.getEdges()).filter(...) pattern: add a helper function named
findEdge (or findEdges) inside the top of the describe/test file that accepts
(graph, from, to, label), calls graph.getEdges(), and returns the filtered
array; then replace the seven occurrences (e.g., the current inline uses in
assertions like const edges = (await graph.getEdges()).filter(e => e.from === X
&& e.to === Y && e.label === Z)) with calls to the helper (await findEdge(graph,
'task:a', 'spec:b', 'implements')) so tests remain identical but duplication is
removed.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 122981a and 660e297.

📒 Files selected for processing (16)
  • CHANGELOG.md
  • package.json
  • src/cli/commands.js
  • src/diff.js
  • src/edges.js
  • src/graph.js
  • src/index.js
  • src/nodes.js
  • test/edges.test.js
  • test/graph.test.js
  • test/hooks.test.js
  • test/merge.test.js
  • test/nodes.test.js
  • test/remote.test.js
  • test/resolve-context.test.js
  • test/review.test.js
💤 Files with no reviewable changes (2)
  • src/edges.js
  • src/nodes.js

CHANGELOG.md Outdated
Comment on lines 10 to 23
## [4.1.0] - 2026-02-25

### Removed

- **`getNodes(graph)` wrapper** — Use `graph.getNodes()` directly (#295)
- **`hasNode(graph, id)` wrapper** — Use `graph.hasNode(id)` directly (#295)
- **`saveGraph(graph)` wrapper** — Dead code with zero call sites (#295)
- **`queryEdges(graph, filter)` wrapper** — Use `graph.getEdges()` with inline filter (#295)
- **`getNodesByPrefix(graph, prefix)` wrapper** — Use `graph.getNodes()` with `startsWith()` filter (#295)

### Changed

- **All internal `loadGraph()` calls replaced with `initGraph()`** — `loadGraph` kept as deprecated alias for public API backward compatibility (#295)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing [4.1.0] link definition at end of file.

Other versions (3.1.0, 3.0.0, etc.) have corresponding link definitions at the bottom of the file (e.g., line 374-380). The [4.1.0] reference on line 10 will render as plain text, not a hyperlink.

Additionally, if you agree this is a breaking change (removal of public exports), the "Removed" section should be a "Breaking" section to match the pattern used in [3.0.0] (line 151).

Add link definition

Add at line ~374 (before [3.1.0]):

+[4.1.0]: https://github.com/neuroglyph/git-mind/releases/tag/v4.1.0
 [3.1.0]: https://github.com/neuroglyph/git-mind/releases/tag/v3.1.0
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` around lines 10 - 23, Add a link definition for the new release
tag [4.1.0] at the bottom link section to match other versions (place it
alongside the existing definitions, e.g., before the `[3.1.0]` link block) so
the `[4.1.0]` reference becomes a proper hyperlink; also rename the "Removed"
section heading to "Breaking" (or add a "Breaking" section) in the `[4.1.0]`
release notes to reflect that the removed wrappers (getNodes(graph),
hasNode(graph, id), saveGraph(graph), queryEdges(graph, filter),
getNodesByPrefix(graph, prefix)) are breaking changes while keeping the
`loadGraph()`/`initGraph()` note as-is.

package.json Outdated
{
"name": "@neuroglyph/git-mind",
"version": "4.0.1",
"version": "4.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Semver violation: removing public exports requires a MAJOR version bump, not MINOR.

The PR removes getNodes, hasNode, saveGraph, queryEdges, and getNodesByPrefix from the public API (src/index.js). Consumers importing these symbols will encounter runtime errors upon upgrading from 4.0.x to 4.1.0. Per Semantic Versioning, this constitutes a breaking change and mandates a major version increment.

This should be 5.0.0, not 4.1.0.

Proposed fix
-  "version": "4.1.0",
+  "version": "5.0.0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"version": "4.1.0",
"version": "5.0.0",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 3, Version bump in package.json is incorrect for a
breaking change: update the "version" field from "4.1.0" to "5.0.0" to reflect
removal of public exports; specifically ensure consumers of removed symbols
(getNodes, hasNode, saveGraph, queryEdges, getNodesByPrefix) see a major version
increase and update any changelog/release notes referencing src/index.js to
document the removed API surface.

Comment on lines +6 to +8
export { initGraph, loadGraph } from './graph.js';
export { createEdge, removeEdge, EDGE_TYPES } from './edges.js';
export { getNode, setNodeProperty, unsetNodeProperty } from './nodes.js';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Breaking API surface reduction — ensure migration docs are adequate.

Five exports removed:

  • saveGraph — dead code (per CHANGELOG)
  • queryEdgesgraph.getEdges() with inline filter
  • getNodesgraph.getNodes()
  • hasNodegraph.hasNode(id)
  • getNodesByPrefixgraph.getNodes() + filter(id => id.startsWith(prefix + ':'))

The CHANGELOG documents the migration paths. Confirm the README or API docs are updated for consumers, or consider adding a MIGRATION.md for this release.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/index.js` around lines 6 - 8, The public API was reduced by removing
exports saveGraph, queryEdges, getNodes, hasNode, and getNodesByPrefix; update
consumer docs by adding a concise MIGRATION.md (and update README/API docs) that
lists each removed symbol and the exact migration snippet: replace
queryEdges(...) with graph.getEdges(... /* apply inline filter */), replace
getNodes() with graph.getNodes(), replace hasNode(id) with graph.hasNode(id),
replace getNodesByPrefix(prefix) with graph.getNodes().filter(id =>
id.startsWith(prefix + ':')), and note saveGraph is removed (dead code) with
recommended alternative or confirmation it's unnecessary; reference the
CHANGELOG entry and include minimal example code for each mapping.

- Removing public API exports is a breaking change per semver
- Sync package-lock.json version with package.json
- Update edges.js module header (removed "querying")
- Rename "Removed" → "Breaking" heading in CHANGELOG for 5.0.0
- Add [5.0.0] link definition at bottom of CHANGELOG
- Extract findEdges() test helper in review.test.js to reduce duplication
@flyingrobots
Copy link
Owner Author

Addressing Review Feedback

✅ Semver violation (package.json) — CodeRabbit Critical + Codex P1

Already fixed in 496e636 — version bumped to 5.0.0.

✅ CHANGELOG link definition + "Breaking" heading — CodeRabbit Minor

Fixed in 398ea7d:

  • Renamed ### Removed### Breaking for the 5.0.0 entry
  • Added [5.0.0] link definition at bottom of CHANGELOG

✅ Test helper extraction (test/review.test.js) — CodeRabbit Trivial

Fixed in 398ea7d — extracted findEdges() helper, replacing 7 duplicate inline filter expressions.

✅ Migration docs (src/index.js) — CodeRabbit Trivial

The CHANGELOG ### Breaking section in 5.0.0 documents each removed symbol with its native API replacement. This is an internal tool without external consumers, so a separate MIGRATION.md is not warranted.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/edges.js (1)

65-69: ⚠️ Potential issue | 🟠 Major

removeEdge lacks input validation — this is a correctness bug, not just an API asymmetry.

createEdge validates source, target, type, and confidence by calling validateEdge() before touching the graph. removeEdge accepts raw parameters with zero validation. This means:

  1. Typos in edge types (e.g., "implments" instead of "implements") silently succeed or fail unpredictably.
  2. Malformed node IDs bypass the prefix:identifier grammar check entirely.
  3. Callers get no error feedback if they attempt to remove a non-existent edge.

Fix: reuse the existing validateEdge() function to match createEdge's defensive posture.

🛡️ Corrected fix
 /**
  * Remove an edge from the graph.
  *
  * `@param` {import('@git-stunts/git-warp').default} graph
  * `@param` {string} source
  * `@param` {string} target
  * `@param` {string} type
  * `@returns` {Promise<void>}
  */
 export async function removeEdge(graph, source, target, type) {
+  const result = validateEdge(source, target, type);
+  if (!result.valid) {
+    throw new Error(result.errors.join('; '));
+  }
   const patch = await graph.createPatch();
   patch.removeEdge(source, target, type);
   await patch.commit();
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/edges.js` around lines 65 - 69, removeEdge currently mutates the graph
without validating inputs; update removeEdge to call the existing
validateEdge(...) (the same function used by createEdge) on source, target and
type before creating a patch so malformed node IDs or typos are rejected early;
if validateEdge requires a confidence param, pass undefined or an appropriate
default; only proceed to graph.createPatch() and patch.removeEdge(...) after
validation succeeds so invalid input throws instead of silently producing
unpredictable behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Line 10: The changelog references inline link labels like [5.0.0], [4.0.1],
[4.0.0], [3.3.0], and [3.2.0] but lacks the corresponding reference link
definitions, so add Markdown link definitions for each missing version (e.g.,
`[5.0.0]: <URL>` etc.) near the existing link-definition section—insert them
just before the existing `[3.1.0]` link definition to keep ordering consistent;
ensure each definition points to the correct release URL or commit/compare URL
and uses the exact label names shown in the file.

---

Outside diff comments:
In `@src/edges.js`:
- Around line 65-69: removeEdge currently mutates the graph without validating
inputs; update removeEdge to call the existing validateEdge(...) (the same
function used by createEdge) on source, target and type before creating a patch
so malformed node IDs or typos are rejected early; if validateEdge requires a
confidence param, pass undefined or an appropriate default; only proceed to
graph.createPatch() and patch.removeEdge(...) after validation succeeds so
invalid input throws instead of silently producing unpredictable behavior.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 660e297 and 496e636.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • CHANGELOG.md
  • package.json
  • src/edges.js

@flyingrobots
Copy link
Owner Author

@coderabbitai review please 🥕

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

@flyingrobots Excellent work addressing all the feedback systematically!

Semver bump to 5.0.0 — proper breaking-change signal
CHANGELOG ### Breaking section with link definition
Test helper extraction — DRY wins in test/review.test.js
Migration guidance — CHANGELOG documents every removed symbol with its native API replacement

I'll conduct a comprehensive review of the refactoring now. Initiating GOD-TIER PEDANTIC MODE 🥕


🧠 Learnings used
Learnt from: CR
Repo: flyingrobots/git-mind PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-24T22:40:26.134Z
Learning: Applies to {package.json,**/*.{js,mjs}} : Use `git-stunts/git-warp` (local path) as core dependency for CRDT graph on Git
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@flyingrobots
Copy link
Owner Author

Round 2 feedback

✅ Missing CHANGELOG link definitions — Fixed in 89d6e36. Added [4.0.1], [4.0.0], [3.3.0], [3.2.0] (pre-existing gaps, not introduced by this PR, but fixed opportunistically).

↗️ removeEdge validation (outside diff range) — This is pre-existing behavior, not introduced by this PR. The comment is outside the diff range. Filed as a valid observation but out of scope for this refactor. Could be addressed in a follow-up.

@flyingrobots
Copy link
Owner Author

@coderabbitai review please 🥕

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

@flyingrobots Initiating ROUND 3 — ZERO MERCY DEEP SCAN 🥕

Round 2 feedback disposition:
✅ CHANGELOG link definitions — 89d6e36 backfilled [4.0.1], [4.0.0], [3.3.0], [3.2.0]
removeEdge validation — correctly scoped as pre-existing, deferred

Scanning the full refactoring surface across ~45 call sites:

  • Wrapper elimination integrity (5 removed exports)
  • loadGraph()initGraph() migration completeness
  • Native API adoption consistency
  • Test coverage preservation (579 passing tests)
  • Backward compatibility boundary (deprecated loadGraph alias)

Executing comprehensive review now.


🧠 Learnings used
Learnt from: CR
Repo: flyingrobots/git-mind PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-24T22:40:26.134Z
Learning: Applies to {package.json,**/*.{js,mjs}} : Use `git-stunts/git-warp` (local path) as core dependency for CRDT graph on Git
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@flyingrobots
Copy link
Owner Author

@coderabbitai review please 🥕

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

@flyingrobots Initiating ROUND 4 — RELENTLESS PRECISION AUDIT 🥕

Prior rounds recap:
✅ Round 1: Semver, CHANGELOG structure, test DRY, migration docs
✅ Round 2: CHANGELOG link backfill, out-of-scope validation noted
✅ Round 3: Full refactoring surface scan

Executing comprehensive incremental review of all changes since last scan:

  • Wrapper elimination completeness verification
  • initGraph() migration consistency across 45+ call sites
  • Native API adoption pattern validation
  • Test coverage boundary checks (579 tests)
  • Breaking change contract enforcement

Deploying MAXIMUM SCRUTINY now.


🧠 Learnings used
Learnt from: CR
Repo: flyingrobots/git-mind PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-24T22:40:26.134Z
Learning: Applies to {package.json,**/*.{js,mjs}} : Use `git-stunts/git-warp` (local path) as core dependency for CRDT graph on Git
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@flyingrobots flyingrobots merged commit e50d285 into main Feb 26, 2026
4 of 5 checks passed
@flyingrobots flyingrobots deleted the refactor/warp-api-cleanup branch February 26, 2026 04:10
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.

refactor: use git-warp API properly — eliminate pass-through wrappers

1 participant