feat: run ontology backfill per cloud character after wiki sync#558
Conversation
Adopt expo-llm-wiki 4.21.0 runOntologyBackfill: dep bump plus post-sync trigger in syncWikiForCloud (covers syncAllToCloud and restoreFromCloud). Single batch per character per sync; WikiBusyError swallowed; other errors reported as wiki:<id>:ontology:backfill. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ion spec Review round: report scanned>0/typed==0 batches via existing reportError pathway (tag wiki:<id>:ontology:backfill:stalled) so an unclassifiable backlog looping on the 7-day cooldown is visible in Crashlytics; log full counters in dev builds. Note that sync triggers are foreground-only, so OS background-fetch kill limits do not apply; mid-loop suspension loses at most the in-flight batch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
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: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
Pull request overview
This PR adopts the new runOntologyBackfill capability from expo-llm-wiki/core-llm-wiki and wires it into the post-sync path so that untyped facts (notably cloud-agent writes and pre-ontology facts) get an okf_type and participate in ontology/graph traversal.
Changes:
- Bump
@equationalapplications/core-llm-wikiand@equationalapplications/expo-llm-wikito^4.21.0. - After a successful
wikiOrchestrator.syncAll, run a best-effortrunOntologyBackfillbatch once per cloud character, swallowingWikiBusyErrorand reporting stalled/error cases via existing Crashlytics tagging. - Add focused Jest coverage ensuring backfill triggers, error swallowing/reporting, and “no backfill on failed/busy sync” behavior.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/services/characterSyncService.ts |
Runs ontology backfill per cloud character after successful wiki sync; adds stalled/error telemetry while keeping sync fail-soft. |
__tests__/characterSyncWiki.test.ts |
Adds backfill mocks/helpers and test cases verifying trigger placement and error/stall handling. |
package.json |
Updates wiki packages to versions that include runOntologyBackfill. |
package-lock.json |
Lockfile refresh reflecting the dependency bump. |
docs/superpowers/specs/2026-07-14-ontology-backfill-adoption-design.md |
Design/spec documenting rationale, trigger placement, cadence, telemetry, and test plan. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
@equationalapplications/core-llm-wiki+expo-llm-wikito^4.21.0forrunOntologyBackfillrunOntologyBackfillbatch per cloud character so cloud-agent-written and pre-ontology facts getokf_typeand join the knowledge graphWikiBusyErrorswallowed silently; other errors and stalled batches (scanned > 0 && typed === 0) reported to Crashlytics via existingreportWikiOpForCharactertag familyTest Plan
npm test— 992/992 passing (121 suites)npm run typecheck— cleannpm run lint:check— clean