Commit Graph

19 Commits

Author SHA1 Message Date
Peter Steinberger 468dc55a39 fix(matrix): silence empty inbound dedupe migration receipt on fresh installs (#122808)
On a pristine profile, onboarding/doctor printed "Auto-migrated legacy
state: Recorded Matrix inbound dedupe migration completion (0 SQLite
roots, 0 JSON roots scanned)" even though nothing was migrated. Keep
the durable empty-scan receipt (it still prevents later historical
databases from being opened) but only emit the user-visible change line
when at least one SQLite/JSON root was scanned.
2026-08-12 13:56:04 -07:00
Peter Steinberger 8cb53c7b55 perf(doctor): keep bundled doctor contract closures dependency-light (#120698)
* perf(doctor): keep bundled doctor contract closures dependency-light

Doctor contract enumeration cold-loads each plugin's doctor-contract-api
closure via jiti, so a static value import of openclaw/plugin-sdk/runtime-doctor
pulled the state-db/kysely graph (~4.3s per closure) into
listPluginDoctorLegacyConfigRules / listPluginDoctorStateMigrationEntries.

- migrate all light doctor-contract closures (66 files) to the
  dependency-light openclaw/plugin-sdk/runtime-doctor-migrations subpath
- voice-call: load detect/repairOpenClawStateDatabaseSchema* lazily inside
  the migration bodies; keep only a type-only static runtime-doctor import
- matrix: split pure credential record shapes/normalizers into
  credentials-state.ts so the doctor closure no longer imports the sync
  plugin-state store through credentials-read
- guard: doctor-contract-closure-guard.test.ts now forbids static value
  imports of runtime-doctor in closures alongside agent-runtime

* fix(matrix): keep credential revocation record type module-local

Knip production scan flags the export as consumer-less; the type is only
referenced by the exported union and revocation guard signature.
2026-08-08 17:51:31 -07:00
joshavant 7051d94f79 test(matrix): keep temp tracker plugin-local 2026-07-30 16:07:51 -05:00
joshavant f36bfabf89 test(matrix): use temp directory tracker 2026-07-30 16:07:51 -05:00
Benjamin Badejo aa8fbb7f3c fix(matrix): reserve dedupe migration capacity 2026-07-30 16:07:51 -05:00
Benjamin Badejo 505d7b9f52 fix(state): preserve doctor import TTL 2026-07-30 16:07:51 -05:00
Benjamin Badejo d25e89d1ee fix(matrix): preserve migrated dedupe retention order 2026-07-30 16:07:51 -05:00
Benjamin Badejo 080cbb1693 fix(matrix): fail closed on incomplete dedupe census 2026-07-30 16:07:51 -05:00
Benjamin Badejo cb95f6e9e8 fix(matrix): checkpoint completed dedupe migration 2026-07-30 16:07:51 -05:00
Benjamin Badejo 8155f64b64 fix(matrix): migrate dedupe from legacy state databases 2026-07-30 16:07:51 -05:00
Peter Steinberger d893f79ccc fix(matrix): preserve encryption keys across snapshot upgrades (#112919)
* fix(matrix): migrate legacy crypto snapshots via doctor

* fix(matrix): harden snapshot migration failures

* fix(matrix): preserve unreadable crypto snapshots

* test(matrix): consolidate crypto snapshot coverage
2026-07-23 02:25:52 -04:00
Peter Steinberger 83d82c9302 refactor(channels): persist runtime state in plugin SQLite (#109380)
* refactor(channels): move reef, msteams, matrix, zalouser file state to SQLite with doctor imports

* fix(channels): harden SQLite state migrations

* test(reef): use SQLite flow stores in receipt suites

* fix(reef): validate restored request policy

* fix(reef): retain replay state through relay window

* docs(reef): describe durable state import

* fix(reef): honor configured legacy state path

* chore: leave changelog to release flow

* fix(reef): use managed temp root in flow tests

* fix(matrix): omit undefined device id from state
2026-07-16 17:05:28 -07:00
Peter Steinberger c46cc1e2d4 refactor(channels): unify inbound replay protection (#109117)
* refactor(channels): unify inbound replay-guard orchestration on shared factory

* fix(plugin-sdk): bind replay-guard settlement to claim handles

* fix(plugin-sdk): claim-handle settlement (rest)

* fix(discord): align skipped queue cleanup

* style(feishu): simplify bot menu claim settlement

* refactor(plugin-sdk): extract replay dedupe contracts
2026-07-16 08:46:34 -07:00
Peter Steinberger 80399ed19b refactor(matrix): trim internal exports (#107126) 2026-07-13 21:33:55 -07:00
Peter Steinberger 4da0eb19c5 fix(state): converge legacy startup migrations (#107002)
* fix(state): converge legacy startup migrations

Co-authored-by: Eva <eva@100yen.org>

* refactor(state): split legacy migration helpers

* fix(memory): persist legacy source acknowledgements

* fix(state): remove stale migration imports

* fix(memory): recognize numbered migration archives

* fix(matrix): downgrade archived migration residue

* fix(memory): satisfy migration lint

---------

Co-authored-by: Eva <eva@100yen.org>
2026-07-13 20:05:24 -07:00
Peter Steinberger de282b4d0d refactor(matrix): adopt core claimable dedupe with doctor-owned state migration (#104391)
* refactor(matrix): adopt core claimable dedupe for inbound events

* fix(matrix): migrate legacy inbound dedupe markers via doctor

* fix(matrix): single-pool dedupe namespace and capacity-aware legacy import

* fix(matrix): keep unreadable legacy dedupe JSON in place during doctor import
2026-07-11 03:38:54 -07:00
Vincent Koc 1a3ded761e refactor(matrix): move storage metadata into sqlite 2026-06-19 01:20:06 +08:00
Peter Steinberger 0566b96927 refactor(matrix): store crypto sidecars in sqlite (#91100) 2026-06-06 23:57:10 -07:00
Peter Steinberger e8348c0dc8 refactor(matrix): store sync cache in sqlite
Move Matrix sync cache state into plugin SQLite storage, with startup and doctor migrations for readable legacy bot-storage.json files.\n\nVerification: focused Matrix and QA tests passed locally; focused touched-file oxlint and git diff --check passed; autoreview clean. CI failures are current main/unrelated: lint/type/madge/gateway-watch issues outside the Matrix diff.
2026-06-06 22:17:41 -07:00