Skip to content

fix(service): parse enriched six-column /graph.md - #62

Merged
ontehfritz merged 4 commits into
mainfrom
fix/parse-enriched-graph-export
Jul 15, 2026
Merged

fix(service): parse enriched six-column /graph.md #62
ontehfritz merged 4 commits into
mainfrom
fix/parse-enriched-graph-export

Conversation

@ontehfritz

@ontehfritz ontehfritz commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Hub graph exports now support enriched node and edge data.
    • Graph references are normalized and invalid or external references are ignored.
    • Duplicate graph edges are automatically removed.
    • Hub graph status information is preserved for world mapping and floor views.
  • Bug Fixes

    • Improved handling of empty or unavailable hub graph data.
    • Updated the graph export integration to support the latest client version.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a589f400-c402-4407-b92f-d0a2bf4372a1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/parse-enriched-graph-export

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
internal/core/service/hub_test.go (1)

84-86: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert the actual node set, not only its length.

A count of two can still pass if one real node is dropped and an edge row replaces it. Compare both expected hubNode values, including their refs and statuses, to fully prove that edge rows are excluded.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/core/service/hub_test.go` around lines 84 - 86, Update the node
assertions in the relevant hub test to compare g.nodes against the two expected
hubNode values, including each node’s refs and statuses, rather than checking
only len(g.nodes). Preserve the verification that edge rows are excluded.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/core/service/hub.go`:
- Line 10: Remove the graphstore import and direct graphstore.ParseExport usage
from the core service in hub.go. Define or use a core-owned outbound port and
DTOs for graph export parsing, inject that port into the relevant hub service,
and move the concrete parsing implementation into the graphstore adapter while
preserving existing behavior.

---

Nitpick comments:
In `@internal/core/service/hub_test.go`:
- Around line 84-86: Update the node assertions in the relevant hub test to
compare g.nodes against the two expected hubNode values, including each node’s
refs and statuses, rather than checking only len(g.nodes). Preserve the
verification that edge rows are excluded.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0350139b-66c2-4762-a988-ec35a1906ff6

📥 Commits

Reviewing files that changed from the base of the PR and between 440aa17 and ac6d9b0.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • go.mod
  • internal/core/service/hub.go
  • internal/core/service/hub_test.go

Comment thread internal/core/service/hub.go Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/core/port/port.go`:
- Around line 198-218: Replace the raw GraphExportNode/GraphExportEdge types and
string-based ParseGraphExport contract in GraphExportParser with domain-owned
references and edges. Move graph.md decoding, mark-endpoint filtering, and URL
normalization into the adapter, then update the hub service to consume the
already-normalized domain values without parsing client-specific strings. Ensure
all ports under internal/core/port use only domain types.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5bf19711-f9e9-484c-a069-d1c5d967a915

📥 Commits

Reviewing files that changed from the base of the PR and between ac6d9b0 and d4fc61e.

📒 Files selected for processing (8)
  • cmd/demarkus-library/main.go
  • internal/adapter/outbound/graphexport/graphexport.go
  • internal/core/port/port.go
  • internal/core/service/floor_test.go
  • internal/core/service/hub.go
  • internal/core/service/hub_test.go
  • internal/core/service/reading.go
  • internal/core/service/worldmap_test.go

Comment thread internal/core/port/port.go

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (1)
internal/core/service/hub_test.go (1)

7-7: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Keep internal/core/service/hub_test.go port-only. Replace graphexport.Parser{} with a local port.GraphExportParser stub here; keep the concrete adapter wiring in adapter/composition tests. The parser behavior already has coverage in internal/adapter/outbound/graphexport/graphexport_test.go.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/core/service/hub_test.go` at line 7, Keep hub_test.go focused on
core ports by replacing the concrete graphexport.Parser usage with a local stub
implementing port.GraphExportParser. Remove the graphexport import and retain
concrete parser wiring only in adapter/composition tests; do not duplicate
parser behavior coverage here.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@internal/core/service/hub_test.go`:
- Line 7: Keep hub_test.go focused on core ports by replacing the concrete
graphexport.Parser usage with a local stub implementing port.GraphExportParser.
Remove the graphexport import and retain concrete parser wiring only in
adapter/composition tests; do not duplicate parser behavior coverage here.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: abe0dd7a-bcf3-4430-9bd2-693787422376

📥 Commits

Reviewing files that changed from the base of the PR and between d4fc61e and cece5b7.

📒 Files selected for processing (7)
  • internal/adapter/outbound/graphexport/graphexport.go
  • internal/adapter/outbound/graphexport/graphexport_test.go
  • internal/core/domain/document.go
  • internal/core/port/port.go
  • internal/core/service/hub.go
  • internal/core/service/hub_test.go
  • internal/core/service/worldmap_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/core/service/worldmap_test.go

@ontehfritz
ontehfritz merged commit 0cc6a57 into main Jul 15, 2026
4 checks passed
@ontehfritz
ontehfritz deleted the fix/parse-enriched-graph-export branch July 15, 2026 13:25
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