Skip to content

fix(knowledge): stabilize mutation timestamps - #403

Merged
akoita merged 1 commit into
mainfrom
codex/issue-389-host-mutation-diagnosis
Sep 15, 2026
Merged

akoita merged 1 commit into
mainfrom
codex/issue-389-host-mutation-diagnosis

Conversation

@akoita

@akoita akoita commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Outcome

Keep candidate-knowledge application timestamps nondecreasing when the wall clock moves backward, preventing valid follow-up mutations from tripping storage anti-rollback validation.

Refs #389. #389 remains open until post-merge validation confirms the main revision.

Evidence

A deterministic one-hour backward-clock case reproduced the previously captured StorageValidationError: checkedAt preceded the persisted refresh observation. The regression now passes through a service-local monotonic timestamp source.

Scope

  • add a focused monotonic timestamp helper
  • wire candidate-knowledge service-generated timestamps through it
  • preserve invalid timestamp passthrough and storage validation
  • cover helper behavior and the real file-refresh boundary
  • update the v0.9 roadmap

Validation

  • focused application + desktop host: 175/175 tests
  • pnpm validate: 105/105 Vitest files, 1,596/1,596 tests, 54/54 release/security tests
  • architecture hotspot: packages/application/src/knowledge-base.ts remains at 6,168 lines

Limitations

This fixes the proven within-service wall-clock regression mechanism. It does not weaken storage anti-rollback checks or claim that every earlier intermittent mutation failure had the same cause.

@akoita
akoita merged commit 94e49bf into main Sep 15, 2026
7 checks passed
@akoita
akoita deleted the codex/issue-389-host-mutation-diagnosis branch September 15, 2026 01:20
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