-
Notifications
You must be signed in to change notification settings - Fork 2
fix(kb): align populate-kb.ts seed entries with canonical documentation #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -176,10 +176,10 @@ const entities: EntityDef[] = [ | |||||
| type: "adr", | ||||||
| id: "ADR-002", | ||||||
| properties: { | ||||||
| title: "Use Bun/Node.js as CLI wrapper around SWI-Prolog subprocess", | ||||||
| title: "Public API exports via re-export modules", | ||||||
| status: "accepted", | ||||||
| source: "scripts/populate-kb.ts", | ||||||
| tags: ["cli", "bun", "nodejs"], | ||||||
| source: "documentation/adr/ADR-002.md", | ||||||
| tags: ["architecture", "publishing", "exports"], | ||||||
| }, | ||||||
| }, | ||||||
| { | ||||||
|
|
@@ -242,7 +242,7 @@ const entities: EntityDef[] = [ | |||||
| properties: { | ||||||
| title: | ||||||
| "vscode-full-features: full VS Code extension with graph visualization", | ||||||
| status: "inactive", | ||||||
| status: "active", | ||||||
| source: "documentation/flags/FLAG-001.md", | ||||||
| tags: ["vscode", "deferred", "post-v0"], | ||||||
|
||||||
| tags: ["vscode", "deferred", "post-v0"], | |
| tags: ["vscode", "deferred", "graph"], |
Copilot
AI
Apr 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation/scenarios/SCEN-001.md includes created_at/updated_at and multiple links (which become relationships). This seed upsert does not include timestamps or relationships, and entity upsert retracts all triples for the entity URI; if populate-kb.ts runs after doc-sync it can wipe SCEN-001’s outgoing relationships and replace canonical timestamps with new defaults. To make execution order truly idempotent, seed the canonical timestamps and the relationships derived from links (or change the upsert flow to preserve existing timestamps/relationships when updating).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even with the title/source/tags aligned, this seed entry will still overwrite canonical metadata from
documentation/adr/ADR-002.md(e.g.,created_at/updated_at) becausehandleKbUpsertfills missing timestamps and the Prolog upsert retracts all existing triples for the entity before re-asserting. If the goal is execution-order idempotence vs doc-sync, include the canonical timestamps (and any other fields you want preserved) in the seeded properties, or adjust the upsert path to preserve existingcreated_aton updates.