[codex] Add KB timeline operations and artifact publishing - #23
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 673aadadcb
ℹ️ 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".
|
|
||
|
|
||
| def _concept_argument(value: str) -> ConceptId: | ||
| return ConceptId(slugify(value.removeprefix("concept:"))) |
There was a problem hiding this comment.
Do not slugify concept filters before matching
For concepts that contain spaces or other punctuation (for example the repository already allows frontmatter concepts such as agent editing), this helper converts the user input to agent-editing, but events_for_concept() checks exact membership against event.concepts, which are populated directly from frontmatter. As a result tea-kb timeline "agent editing" and tea-kb viz concept "agent editing" produce empty timelines even though matching events exist.
Useful? React with 👍 / 👎.
|
|
||
|
|
||
| def _concept_slug(concept: object) -> str: | ||
| return str(concept).removeprefix("concept:").replace(":", "-") |
There was a problem hiding this comment.
Use the SVG slug rules for site index links
When a major concept contains spaces or punctuation, these links no longer match the files generated by concept_timeline_svg_artifacts(): the SVG renderer slugifies with slugify() in src/tea_kb/viz/svg.py, while this helper only replaces colons. A concept like agent editing would generate concept-timeline-agent-editing-light.svg, but the site index links to concept-timeline-agent editing-light.svg, leaving broken links in the published graph browser.
Useful? React with 👍 / 👎.
Summary
tea-kb touch <node-id>to update a node'supdated:frontmatter date without editing other metadata.tea-kb timeline [concept]andtea-kb viz concept <concept>for timeline inspection and concept-specific SVG regeneration.tea-kb validate --check-updated-sinceso changed source notes cannot keep stale timeline metadata.graph/generated/index.html, CI artifact upload, and a GitHub Pages workflow for browsing generated graph artifacts.Validation
uv run ruff checkuv run ruff format --checkuv run pyrightuv run pytestuv run tea-kb validateuv run tea-kb validate --check-updated-since origin/main --strictuv run tea-kb build --check