Repository navigation
feat(knowledge): derive entity Timelines from records instead of page prose - #187676
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesDerives entity Timelines from dated sources, relationship notes, and claims, and guides agents through retiring written Timeline sections. Example: Riley Chen has an Atlas launch note dated October 2, 2026.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR addresses a concrete Knowledge page-growth problem that remains on main; the prior findings are resolved, and no new blocking defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherKnowledge’s existing scoped temporal-query owner reads eligible vault records and its SQLite projection, then returns Timeline rows to agent tools and the Control UI. flowchart TD
A[Vault pages claims and relationships] --> B[Scoped eligible records]
B --> C[Existing temporal index]
C --> D[Source grouping]
B --> D
D --> E[Timeline query response]
E --> F[Entity record page]
E --> G[Agent tools]
Technical reviewBest possible solution: Keep Timeline derivation in the existing temporal owner and retire written sections through verified, revision-fenced edits. Do we have a high-confidence way to reproduce the issue? Current source rejects page growth beyond the budget, and the existing skills instruct agents to append written Timeline entries; the PR supplies a concrete affected-vault report, without a reviewer-run reproduction. Is this the best way to solve the issue? Source grouping reuses the existing temporal index, eligibility filtering, publication operations, and Markdown renderer; the added grouping and UI modules serve distinct responsibilities without introducing another persisted owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fa50197d0fb2. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +401, Tests +163, Docs +498. Total +1062 across 67 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed October 29, 2026, 7:22 PM ET / 23:22 UTC (Revision 3). |
…and verify retired claims directly
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…d route budget errors through Timeline retirement
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
… prose (openclaw#187676) * feat(knowledge): derive entity Timeline rows by source * feat(knowledge): show derived Timeline on entity record pages * docs(knowledge): replace written Timelines with source notes in skills * fix(knowledge): keep past-dated claims and every retired Timeline entry * fix(knowledge): render Timeline notes as Markdown with resolved links * docs(knowledge): retire written Timelines on source notes and in consolidation runs * fix(knowledge): keep source references on standalone Timeline claims and verify retired claims directly * fix(knowledge): date sources by their event claim for every entity and route budget errors through Timeline retirement
What Problem This Solves
Fixes: Knowledge entity pages stop accepting new information once their agent-written
## Timelinesection pushes them past the page size budget (eight of the most-linked people pages in a real vault currently refuse new Timeline lines; the Timeline is 57% of entity page text overall).User Impact
User impact: an entity's Timeline is now built from records (one row per dated source, with that source's note about the entity and its claim count) and shown on the record page, so it no longer grows the page body. Agents stop writing Timeline lines and retire existing written Timeline sections as they edit pages; no bulk migration runs. Until a page's written section is retired, the record page shows both.
Why This Change Was Made
Every written Timeline entry's date and link already existed as a claim or relationship, so the Timeline can be derived instead of authored.
knowledge_timelinegainsgroup: "source"(entity required): rows come from relationships between the entity and a source page, and from claims that name the entity with asource_page. A row's note is the body of that relationship (attendedfor meeting participants,discussesotherwise), falling back to the source's event claim. Claims with no dated source, or dated apart from their source, keep their own rows. Row notes render as Markdown: wikilinks to records in scope are returned aslinksand open the record, and internal comments are hidden.Skills now save a source's contribution to an entity as that one-sentence relationship body. When an agent edits a page that still has a written Timeline, or a write is rejected for size, it turns each entry into a
discussesnote or an event claim, checks every entry now appears in the derived rows, then deletes the section (shrinking edits always pass the budget; revision history keeps the text). The budget rejection message says never to extract a written Timeline to another page.Evidence
pnpm test extensions/knowledge: 59 files, 444 tests passed, including a new grouping test (notes, source-event fallback, standalone and past-dated claims, superseded notes, date range and paging, input validation) and the updated budget-message assertion.pnpm check:changed: extension typecheck and test typecheck pass; changed Knowledge files are lint-clean. Remaining lint/dead-export reports were in files outside this change.node scripts/sync-skill-references.mjs --check: generated skill references in sync.origin/mainrecord page bundle, after = this branch. No browser page errors.Before (no derived Timeline):
After (desktop):
After, page still carrying a written Timeline (shown alongside until retired):
After (420px):
Screenshots predate a review fix that only changes which rows appear in edge cases (past-dated claims, superseded notes), not the layout.