Repository navigation
test(migrations): make checkpoint rehash fixture deterministic - #115269
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 11:48 AM ET / 15:48 UTC. ClawSweeper reviewWhat this changesThe PR makes the audit checkpoint rehash test deterministic by updating stored file metadata from the rewritten archive while deliberately preserving its stale content hash. Merge readinessKeep this draft PR open: it is a narrow, test-only repair paired with an open bug report, and its author association plus the Priority: P2 Review scores
Verification
How this fits togetherAudit-log migration detection uses cheap file metadata and a stored content hash to decide whether an archived audit file must be rehashed. This test constructs a metadata-match/hash-mismatch checkpoint so the migration detector is proven to hash the archive rather than incorrectly treating it as current. flowchart LR
A[Raw audit archive] --> B[File stat metadata]
C[Stored raw-archive checkpoint] --> D[Checkpoint comparison]
B --> D
D --> E[Content rehash decision]
E --> F[Detected migration source]
G[Deterministic test fixture] --> C
Before merge
Agent review detailsSecurityNone. PR surfaceTests +17. Total +17 across 1 file. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or refresh this focused test repair on current Do we have a high-confidence way to reproduce the issue? Yes, at source level: the paired report supplies a concrete macOS command, assertion failure, and timestamp-rounding mechanism, although this read-only review did not execute the test locally. Is this the best way to solve the issue? Yes, based on the supplied diff: directly updating the stored checkpoint metadata while preserving the stale hash tests the production invariant without depending on filesystem timestamp precision. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4e8c2c5248b0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Rank-up move reviewed: I am not rebasing solely for conflict-free behind-main drift. The PR is already out of draft, head |
|
Merged via squash.
|
…etwork-none * origin/main: fix(macos): signed rebuild no longer stalls on app shutdown (#103957) fix(agents): prevent repeated Code Mode output across waits (#115213) refactor(ui): split Profile (identity) from Usage (statistics) (#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (#115229) fix(cli): reject malformed infer model refs (#115225) feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (#115264) test(migrations): avoid mtime precision in checkpoint fixture (#115269) test(signal): verify archive limits without malformed tar (#115270) test(ui): reset config route hash between cases fix(talk): remove unsupported Codex OAuth realtime
…-20260728 * origin/main: fix(macos): signed rebuild no longer stalls on app shutdown (#103957) fix(agents): prevent repeated Code Mode output across waits (#115213) refactor(ui): split Profile (identity) from Usage (statistics) (#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (#115229) fix(cli): reject malformed infer model refs (#115225) feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (#115264) test(migrations): avoid mtime precision in checkpoint fixture (#115269) test(signal): verify archive limits without malformed tar (#115270) test(ui): reset config route hash between cases fix(talk): remove unsupported Codex OAuth realtime
* origin/main: (199 commits) refactor(workboard): tidy Control UI card execution helpers (openclaw#115195) perf(agents): amortize history-limit eviction with hysteresis (openclaw#115273) (openclaw#115281) fix: schema-version refusal blames a downgrade that never happened and cannot identify the stale install (openclaw#115232) fix: restore Fish completion after global CLI options (openclaw#115222) refactor(agents): collapse the client-tool catalog branch (openclaw#115212) fix(macos): signed rebuild no longer stalls on app shutdown (openclaw#103957) fix(agents): prevent repeated Code Mode output across waits (openclaw#115213) refactor(ui): split Profile (identity) from Usage (statistics) (openclaw#115245) fix(channels): report a channel that cannot receive as unhealthy instead of connected (openclaw#115229) fix(cli): reject malformed infer model refs (openclaw#115225) feat(ui): finish the Lobsterdex at 42 with wild variants, squish fix, and blink variance (openclaw#115264) test(migrations): avoid mtime precision in checkpoint fixture (openclaw#115269) test(signal): verify archive limits without malformed tar (openclaw#115270) refactor(sessions): isolate legacy transcript fixtures (openclaw#115231) fix(discord): clear pending launch watchdog (openclaw#115100) fix(agents): stop quadratic subagent prompt rendering (openclaw#115263) fix(memory-core): recover dreaming cron reconciliation (openclaw#115174) fix(qa-lab): filter incompatible channel scenarios (openclaw#115087) fix(android): respect locale in compact labels test(i18n): prove iOS discovery catalog ownership ...
Summary
mtimerestoration in the audit checkpoint rehash testFixes #115268
Verification
node scripts/run-vitest.mjs src/infra/state-migrations.audit-logs.test.ts -t "rehashes a checkpointed raw archive before treating it as clean"(1 passed, 18 skipped)node scripts/run-vitest.mjs src/infra/state-migrations.audit-logs.test.ts(19 passed)./node_modules/.bin/oxfmt --check src/infra/state-migrations.audit-logs.test.tsgit diff --checkRisk
Test-only. The fixture now constructs the metadata/hash mismatch directly instead of depending on filesystem timestamp precision.