fix(session): trust authoritative projection frames

This commit is contained in:
pku-xht committed 2026-08-25 23:18:46 +08:00
1 parent 5fe7dc333f
commit cdba045dfc
14 files changed
+53 -44

No files matched your search

+2 -2
View File
@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write docs/subsystems/session-projection.md
session-projection.md: 289e69e4f03020beed835ff6c7012a4b6934dfe3
session-projection.zh.md: 14b0acd8a7ee3ef33e85ec122fb29625ba352399
session-projection.md: f8cf86c17079b4fbfb528fede1815feb0b4f6918
session-projection.zh.md: 0e61158b0ab37fe8423d2f7c38e9edddbf2cd478
+5 -4
View File
@@ -272,10 +272,11 @@ restoreFloor(checkpoint: ProjectionCheckpoint): number | undefined
/**
* View a checkpoint's rows without any log read: for every registered
* client-visible unit whose row's `ver` matches, serve the schema-validated
* `view` of the schema-validated stored state; mismatched, malformed, or absent rows leave their key
* absent (a cold or listing consumer treats it as not-yet-available and a
* fuller read path refolds it). The zero-I/O rung of the read ladder —
* values are as stale as their rows, never wrong.
* `view` of the schema-validated stored state; mismatched, malformed, or
* absent rows leave their key absent. The current log extent is unknown, so
* returned values are tentative hints: a row may trail the log or overreach
* a crash-repaired truncation. Exact restore validates the cut before using
* a row as authoritative state.
* @param checkpoint - persisted rows for one session (possibly stale or empty).
* @param keys - optional wire keys to view.
* @returns whole values per key with a usable row; empty when none.
+5 -4
View File
@@ -272,10 +272,11 @@ restoreFloor(checkpoint: ProjectionCheckpoint): number | undefined
/**
* View a checkpoint's rows without any log read: for every registered
* client-visible unit whose row's `ver` matches, serve the schema-validated
* `view` of the schema-validated stored state; mismatched, malformed, or absent rows leave their key
* absent (a cold or listing consumer treats it as not-yet-available and a
* fuller read path refolds it). The zero-I/O rung of the read ladder —
* values are as stale as their rows, never wrong.
* `view` of the schema-validated stored state; mismatched, malformed, or
* absent rows leave their key absent. The current log extent is unknown, so
* returned values are tentative hints: a row may trail the log or overreach
* a crash-repaired truncation. Exact restore validates the cut before using
* a row as authoritative state.
* @param checkpoint - persisted rows for one session (possibly stale or empty).
* @param keys - optional wire keys to view.
* @returns whole values per key with a usable row; empty when none.