Skip to content

feat(replay): compare canonical observations - #625

Merged
ketor merged 1 commit into
dingodb:mainfrom
ketor:lr/sto18-replay-eval-df500248
Nov 28, 2026
Merged

ketor merged 1 commit into
dingodb:mainfrom
ketor:lr/sto18-replay-eval-df500248

Conversation

@ketor

@ketor ketor commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a bounded offline comparator for validated replay observations. compare_replay_traces() independently validates each capture, retains exact input-file SHA-256/byte identities and source-qualified capture/generation/sequence event IDs, then compares complete canonical JSON bytes.

Only capture_id and measured capture/wall/monotonic timestamps are excluded. Generation, sequence, ordered items/pages, keys, statuses, retention, payload descriptors and extension fields remain significant. Canonical bytes, not Python/raw-object coercion or hash-only equality, determine equality; nested False/0, True/1 and -0.0/0.0 stay distinct.

Missing, empty, duplicate, mixed, malformed and unknown-inventory inputs do not establish semantic equality. Unknown inventory is unknown; comparison is not_established with semantic_equal = null. The existing validate_replay_trace() eight-field result shape and trace schema v1 are unchanged. Capture remains optional and disabled by default.

Changed files

  • CHANGELOG.md
  • docs/design/replay-trace.md
  • integration/common/src/dfkv_common/replay_trace.py
  • test/python/run_sto18_replay_trace_validation.py
  • test/python/test_sto18_replay_trace.py

No transport, storage-startup, connector, health-map or production configuration implementation changes are included.

Current exact source identity

  • Head: 5dfd47b4b35dc671387bed6c4555b1e1aee841d4
  • Tree: c4d18e7ffc27489e98c2a88b723950e673775241
  • Parent / current-main observation: 235d8676fc65bb37a695163ef83fa7c6d46a0bdc
  • Current-head CI run: 46197336452 — completed / success, 13/13 jobs, all with head_sha = 5dfd47b4b35dc671387bed6c4555b1e1aee841d4.

That is COMPLETE PUBLIC CI ONLY, not itself a merge decision or production approval.

Only that existing five-file patch was replayed onto this base. All five file blobs and exact delta bytes are unchanged; patch ID is d6a4fc12bd246b0aae7b6b74d9275f9a587a6e04.

Older 6c6cf72…, fdc77bd…, 1b09be09… and efc751cd… sources, raw full runs and CI are retained as separate historical evidence. They are not reused as this head's results.

This is a draft, not a ready/review, queue, merge, release or deployment request.

Current focused checks (separate invocations)

  • 8 native ReplayTrace tests / 8 passed.
  • 20 Python tests / 20 passed with current native fixtures supplied.
  • Separate focused run: 18 PASS + 2 explicit opt-in skips without those two fixture inputs. Those two fixture cases executed in the native-fixture invocation; counts are not additive coverage.
  • Known-empty-declared fixture: 47 records, 15 batch I/O, generations 0-15, 15 rotations, 0 drops and 47 unique event IDs. Recorder generations are not membership epochs or lineage IDs.
  • Unknown-inventory fixture: 15 records / 13 batch I/O, yielding unknown, not_established, semantic_equal = null rather than known-empty or false equivalence.
  • Different current capture IDs and complete raw input hashes coexist with equal retained canonical observations when every included field matches. Raw inputs are not claimed byte-identical.

Behavioral mutations against the real current fixture distinguish nested False/0, True/1, -0.0/0.0, status values, retention parameters, requested lengths, payload descriptors and extension fields. Generation/order contract failures and empty/missing/duplicate/mixed/unknown inputs return no equality verdict. Existing focused cases also exercise valid-generation mismatch, item reorder, disabled observation and open-failure behavior.

Current exact full-regression evidence

A separately acquired current-main full for the exact 5dfd47b4… candidate completed completed/0 with corrected direct CTest/JUnit adjudication: 2122 discovered, 2116 executed, 2017 PASS, 99 SKIP, 0 FAIL. Eight ReplayTrace rows and python_replay_trace_validation all executed and passed; an expanded same-head validation additionally records the new comparator case and 20/20 Python. Six maintained TSV-skip labels were explicitly retained as corrections from direct per-case JUnit PASS evidence; the remaining 99 skips are not promoted to passes or hardware coverage.

Retained artifacts include the complete per-case JUnit XML/results, full logs, source and bundle identities, ownership lifecycle, manifest checks and source hashes. The result coordinator released the exclusive full-regression claim normally; no later full is claimed here.

Boundary and remaining gates

Focused native evidence uses in-memory TraceTransport observation and native recorder/rotation paths. It does not establish native C ABI/server behavior, external storage, RDMA/network hardware, payload/tensor parity or a live cache result.

Canonical observation comparison does not establish chain manifests, lineage, ownership epochs, live warm behavior, eviction, cold promotion, production hit rate, giant-model warm readback, M3 or M5 completion.

The exact current head now has complete public CI and its own current-main raw full-regression evidence. Independent final integration review and parent-controlled ready/queue decisions remain before merge. No older CI/full result is relabeled as this head's check.

@ketor
ketor force-pushed the lr/sto18-replay-eval-df500248 branch 3 times, most recently from 1b09be0 to efc751c Compare November 28, 2026 21:39
- Preserve exact input hashes and source/generation/sequence event identities.
- Compare canonical JSON without coercing types or inferring cache lineage.
- Return no equality verdict for invalid or unknown-inventory captures.
@ketor
ketor force-pushed the lr/sto18-replay-eval-df500248 branch from efc751c to 5dfd47b Compare November 28, 2026 22:34
@ketor
ketor marked this pull request as ready for review November 28, 2026 23:13
@ketor
ketor added this pull request to the merge queue Nov 28, 2026
Merged via the queue into dingodb:main with commit 2b82c79 Nov 28, 2026
13 checks passed
@ketor
ketor deleted the lr/sto18-replay-eval-df500248 branch November 28, 2026 23:22
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