Skip to content

feat(knowledge): derive entity Timelines from records instead of page prose - #187676

Merged
jalehman merged 8 commits into
mainfrom
openclaw-4cb/derived-entity-timeline
Oct 30, 2026
Merged

jalehman merged 8 commits into
mainfrom
openclaw-4cb/derived-entity-timeline

Conversation

@jalehman

@jalehman jalehman commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: Knowledge entity pages stop accepting new information once their agent-written ## Timeline section 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_timeline gains group: "source" (entity required): rows come from relationships between the entity and a source page, and from claims that name the entity with a source_page. A row's note is the body of that relationship (attended for meeting participants, discusses otherwise), 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 as links and 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 discusses note 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.
  • Retirement trial on the live vault: one person page's 50-entry written Timeline was retired by the skill steps (15 source notes, 10 dated event claims; the other 25 entries already had notes). The derived Timeline went from 42 to 52 rows and covered every entry, then the section was deleted (page 12,848 → 2,264 chars).
  • Live operator Gateway running this branch (Knowledge only): Graham McBain's derived Timeline returned 45 source rows; after the link fix, 9 of the first 20 notes carry resolved links, checked in the Control UI by the operator.
  • Isolated Gateway built from this branch with a synthetic vault (no real data). Before = origin/main record page bundle, after = this branch. No browser page errors.

Before (no derived Timeline):

Before: Riley Chen record page

After (desktop):

After: Riley Chen record page with derived Timeline

After, page still carrying a written Timeline (shown alongside until retired):

After: Morgan Hale record page

After (420px):

After: mobile width

Screenshots predate a review fix that only changes which rows appear in edge cases (past-dated claims, superseded notes), not the layout.

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation plugin: knowledge size: XL labels Oct 29, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Derives 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.

  • Before: The record page shows connections and claims without a derived Timeline.
  • After: The Timeline shows the launch note with “Credits Riley with the Atlas rollout checklist,” without adding that text to Riley’s page body.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused implementation with inspected product proof and resolved prior findings; broad CI is still pending.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The isolated Gateway screenshots exercise entity-record Timelines on desktop and mobile, including coexistence with legacy prose; the existing-vault retirement trial and operator Gateway results cover the record-backed behavior, while later edge-case repairs have focused service-level regression coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Written entity Timelines consume the page-body budget until further page updates are rejected.
Reason: The supplied maintainer-authored direction moves derived history out of authored prose while preserving existing records and offering incremental retirement.

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
Reviewed head: ac6f9f8084fdf000af1468af3754424ccd7b404b

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not show the added regression test failing on the base.
Agent review details

How this fits together

Knowledge’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]
Loading

Technical review

Best 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

  • Authored entity Timelines and reciprocal page links changes intended behavior with a stated reason (65ad180: The bundled import carried profiles with sourced, reverse-chronological Timeline prose and contextual links; the earlier standalone introduction is not established.)
  • Page-body budget and extraction guidance keeps the original intent (ff2d718: Keep pages within a useful read size, allow oversized pages to shrink, and move independently meaningful sections without dropping content.)
  • Ungrouped temporal queries and source-event folding keeps the original intent (65ad180: Structured occurrence queries avoid inferred prose dates and fold explicit same-date source-event representations; the existing path remains available.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Josh Lehman: Raw commit 65ad180 adds extensions/knowledge/src/chronicle.ts:26 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 65ad18005286; files: extensions/knowledge/src/chronicle.ts)
  • RoboClaw: Raw commit ff2d718 adds extensions/knowledge/src/page-budget.ts:280 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ff2d7187a57c; files: extensions/knowledge/src/page-budget.ts)
  • Peter Steinberger: Raw commit f799664 adds extensions/knowledge/src/page-budget.ts:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: f799664c9b32; files: extensions/knowledge/src/page-budget.ts)

PR surface

Source +401, Tests +163, Docs +498. Total +1062 across 67 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 9 438 37 +401
Tests 2 168 5 +163
Docs 56 875 377 +498
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 67 1481 419 +1062

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The change addresses bounded Knowledge page-growth failures while preserving existing budget enforcement and stored content.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-29T13:37:58.588Z sha 9061698 :: needs changes before merge. :: [P2] Verify retirement against records that grouping does not hide | [P2] Preserve source references on standalone grouped claims
  • reviewed 2026-10-29T23:10:44.198Z sha 16c3974 :: needs changes before merge. :: [P2] Resolve source-event dates independently of entity membership | [P2] Preserve distinct event dates in the budget recovery message

Reviewed October 29, 2026, 7:22 PM ET / 23:22 UTC (Revision 3).

@clawsweeper clawsweeper Bot removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Oct 29, 2026
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 29, 2026
…d route budget errors through Timeline retirement
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 29, 2026
@jalehman
jalehman merged commit cffc912 into main Oct 30, 2026
109 checks passed
@jalehman
jalehman deleted the openclaw-4cb/derived-entity-timeline branch October 30, 2026 00:28
@jalehman

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 30, 2026
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. plugin: knowledge proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant