Skip to content

feat: run ontology backfill per cloud character after wiki sync#558

Merged
equationalapplications merged 6 commits into
stagingfrom
feat/ontology-backfill-adoption
Jul 14, 2026
Merged

feat: run ontology backfill per cloud character after wiki sync#558
equationalapplications merged 6 commits into
stagingfrom
feat/ontology-backfill-adoption

Conversation

@equationalapplications

Copy link
Copy Markdown
Owner

Summary

  • Bump @equationalapplications/core-llm-wiki + expo-llm-wiki to ^4.21.0 for runOntologyBackfill
  • After every successful wiki cloud sync, run one best-effort runOntologyBackfill batch per cloud character so cloud-agent-written and pre-ontology facts get okf_type and join the knowledge graph
  • Backfill failures never fail the sync; WikiBusyError swallowed silently; other errors and stalled batches (scanned > 0 && typed === 0) reported to Crashlytics via existing reportWikiOpForCharacter tag family

Test Plan

  • npm test — 992/992 passing (121 suites)
  • npm run typecheck — clean
  • npm run lint:check — clean
  • Self-reviewed via superpowers:code-reviewer subagent — no critical/important issues; addressed minor nits (typed test fixtures, stalled-check comment)
  • Post-merge manual verification in dev: character with cloud-agent-written facts gets them typed after one manual sync, graph traversal returns them (spec §Rollout)

equationalapplications and others added 6 commits July 14, 2026 08:26
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>
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 822e49ae-001a-47b0-96bc-0a60e6f2e9f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-wiki and @equationalapplications/expo-llm-wiki to ^4.21.0.
  • After a successful wikiOrchestrator.syncAll, run a best-effort runOntologyBackfill batch once per cloud character, swallowing WikiBusyError and 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.

@equationalapplications
equationalapplications merged commit b93df88 into staging Jul 14, 2026
4 checks passed
@equationalapplications
equationalapplications deleted the feat/ontology-backfill-adoption branch July 14, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants