Skip to content

fix(markedup): preserve semantic relationships after module bump - #26

Merged
Clarit-AI merged 1 commit into
mainfrom
kha298-markedup-integration
May 26, 2026
Merged

fix(markedup): preserve semantic relationships after module bump#26
Clarit-AI merged 1 commit into
mainfrom
kha298-markedup-integration

Conversation

@Clarit-AI

Copy link
Copy Markdown
Owner

Summary

  • Bumps MarkedUp to v0.0.0-20260419063450-0c5745b5a986.
  • Adds SemanticRelationships to Plexium manifest metadata and enricher transfer.
  • Updates Tier 2 model enrichment test to assert wikilink relationships and semantic NER edges separately.
  • Normalizes MarkedUp config keys because Viper lowercases map keys.
  • Converts generated confidence frontmatter from strings to numeric values.

Test plan

  • git diff --check
  • gofmt clean
  • go test ./internal/manifest ./internal/plugins/markedup ./internal/plugins/bootstrap ./internal/convert ./validation ./cmd/plexium
  • go test ./... (1020 passed, 33 packages)

Notes

  • This is a prerequisite compatibility fix for KHA-298.
  • Live Tier 2 model enrichment and daemon phase remain deferred.
  • KHA-299 should use this as evidence that rolling MarkedUp main needs compatibility tests or pinned releases.

🤖 Generated with Claude Code

- bump github.com/Clarit-AI/markedup to latest main
- preserve Tier 2 SemanticRelationships in manifest metadata
- keep wikilink Relationships separate from semantic NER edges
- normalize markedup config keys for Viper-lowercased YAML maps
- emit numeric confidence values compatible with MarkedUp schema

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Plexium Wiki Check

  • Changed files: 9 (1 source)
  • Wiki updated: No
  • Wiki debt: 0 entries
  • Result: ✅ Passes
  • Deterministic lint: emitted findings on the freshly initialized wiki; see workflow logs.

@kilo-code-bot

kilo-code-bot Bot commented May 26, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0

Changes Overview

The PR makes four cohesive changes:

  1. Dependency Update (go.mod/go.sum): Bumps markedup to a newer commit and adds golang.org/x/term — routine dependency maintenance.

  2. SemanticRelationships Field (internal/manifest/manifest.go): Adds a new SemanticRelationships field to PageEntry, GraphMetadata, and all related plumbing (ApplyGraphMetadata, hasGraphFields, GraphMetadataForPage, GraphMetadataSemanticEqual). This allows the enricher to distinguish semantic/NER-derived relationships from structural wikilink relationships. The implementation is consistent and complete.

  3. Config Key Normalization (internal/plugins/markedup/config.go): Adds a normalizeKeys helper that lowercases all map keys recursively before parsing. This compensates for Viper lowercasing YAML keys during unmarshaling, ensuring config keys passed as camelCase (e.g., autoEnrich) work correctly regardless of how they're provided. The rejectUnknownKeys helper also gains a strings.ToLower guard for the same reason.

  4. Numeric Confidence in Frontmatter (internal/convert/ingest.go, internal/convert/lint.go): Converts hardcoded confidence strings ("high", "medium", "low") to numeric values (0.9, 0.5, 0.1). Since Confidence is typed as float64 in the manifest structs, this aligns the generated frontmatter with the schema.

  5. Test Refinement (internal/plugins/markedup/enricher_modelenrich_test.go): Updates the Tier 2 enrichment test to assert that wikilink relationships survive in entry.Relationships while NER-derived edges appear in the new SemanticRelationships field. Adds [[b]] to the fixture to provide a real wikilink to detect.

  6. Contract Test Update (validation/contract_test.go): Reflects the new SemanticRelationships field in the expected struct field map.

Quality Observations

  • All new fields are properly plumbed through the entire stack (manifest structs → enrichment transfer → equality checks → tests).
  • The normalizeKeys approach is sound for handling mixed-case config keys.
  • The GraphMetadataSemanticEqual update correctly compares the new slice field.
  • Tests pass according to the PR description.

Notes

  • This PR is a prerequisite for KHA-298 and unblocks future MarkedUp compatibility work (KHA-299).
  • Live Tier 2 model enrichment and daemon phase remain deferred per the PR notes.
Files Reviewed (6 files)
  • go.mod / go.sum - dependency updates
  • internal/convert/ingest.go - numeric confidence
  • internal/convert/lint.go - numeric confidence
  • internal/manifest/manifest.go - SemanticRelationships field
  • internal/plugins/markedup/config.go - key normalization
  • internal/plugins/markedup/enricher.go - enrichment transfer
  • internal/plugins/markedup/enricher_modelenrich_test.go - test updates
  • validation/contract_test.go - contract updates

Reviewed by minimax-m2.7 · 504,267 tokens

@Clarit-AI
Clarit-AI merged commit ed2a09b into main May 26, 2026
3 checks passed
@Clarit-AI
Clarit-AI deleted the kha298-markedup-integration branch May 26, 2026 22:23
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.

2 participants