Skip to content

fix: recover failed repeated semantic source drift safely - #278

Merged
acidkill merged 3 commits into
mainfrom
codex/semantic-stale-recovery-repeat
Sep 25, 2026
Merged

acidkill merged 3 commits into
mainfrom
codex/semantic-stale-recovery-repeat

Conversation

@acidkill

Copy link
Copy Markdown
Owner

Summary

Allow explicit, audited stale-source recovery when a semantic discovery checkpoint fails again after an earlier recovery. This unblocks the production run with 19/20 strategies complete without silently discarding progress.

Changes

  • Accept failed only with the existing version-3 source manifest, fresh source-change proof, zero semantic graph effects, exact prior audit history, lease and CAS fences.
  • Atomically change failed to paused while resetting only unapplied discovery; preserve original reference time and other strategy counters.
  • Support a repeated prior stale-source marker and exact committed retries.
  • Add negative unit cases and a SurrealDB 3.2.4 CAS integration regression.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Tests

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual production recovery: pending independent review and CI

PYTHONPATH=src SURREALDB_URL=ws://127.0.0.1:18082/rpc SURREALDB_USER=root SURREALDB_PASS=root pytest -q tests/integration/test_surrealdb_semantic_recovery_cas.py tests/unit/test_stale_semantic_recovery_repeat.py tests/unit/test_surrealdb_consolidation_state.py: 20 passed against disposable local SurrealDB 3.2.4. Ruff and mypy passed on the implementation commit; CI is authoritative for the final head.

Checklist

  • Code follows project style
  • Tests prove the fix
  • Independent PR review and green CI before merge
  • Documentation/changelog: no public API or release change; internal exceptional recovery path only

Related Issues

Production run 770a1a98-1483-419c-a72c-9a21cfce7c74 is failed in semantic_link_discovery_neurons; no graph-effect counters were applied.

@acidkill
acidkill merged commit 23e40c3 into main Sep 25, 2026
9 checks passed
@acidkill
acidkill deleted the codex/semantic-stale-recovery-repeat branch September 25, 2026 05:39
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.

1 participant