feat(SUP-1498): add graph-friendly gbrain page fields#20
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
226cf12 to
ff91e29
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff91e29f63
ℹ️ 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".
| function graphFieldEntries(item) { | ||
| const entries = []; | ||
| for (const field of GRAPH_FRONTMATTER_FIELDS) { | ||
| const values = asStringList(graphFieldValue(item, field)); |
There was a problem hiding this comment.
Preserve numeric founded values
When a manifest records founded as a JSON number, e.g. "founded": 2020, this conversion drops it because asStringList only accepts strings or string arrays. Since founded is a newly documented graph field and years are naturally represented as numbers in JSON, those company pages will be generated without the expected founded frontmatter/graph metadata; either coerce scalar numbers for this field or validate/reject them with a clear warning.
Useful? React with 👍 / 👎.
ff91e29 to
97081b6
Compare
Summary
This is a stacked PR on top of #19 /
sup-1496-gbrain-path-resolverfor SUP-1498 under the SUP-1425 JarVOS/OpenClaw memory migration goal.It extends
@jarvos/gbrainpage generation so curated import manifests can produce GBrain-friendly graph structure directly in generated markdown. Optional graph fields can be supplied directly on a manifest item or undergraph/relationships, then rendered into YAML frontmatter and a## Graph Linkswikilink section.Changes
aliases,company,companies,founded,key_people,partner,investors,lead,attendees,related,see_also,source, andsources.## Graph Linkssection for relationship fields so GBrain can extract wikilinks from the page body.source:toprovenance:to avoid colliding with GBrain's typedsourcefrontmatter field.graph, andrelationshipsmanifest shapes.Validation
node --check modules/jarvos-gbrain/src/index.js && node --test modules/jarvos-gbrain/test/*.test.jsnpm test --prefix modules/jarvos-gbrainnode modules/jarvos-gbrain/scripts/jarvos-gbrain.js doctorgbrain frontmatter validate <sample> --jsonreturnedok: true.links_created: 3,pages_processed: 4.node tests/modules-smoke-test.jsbash scripts/smoke-test.shnpm testgit diff --checkNotes
This is intentionally stacked because #19 establishes the path resolver alignment that this work builds on.