Repository navigation
Conversation
…ires #11317 requires session entries to carry every declared required field. #11193 added the retention fixtures before that validation branch was cut, so those fixtures still wrote the older payload shapes. Each pull request passed alone: #11193 did not include write validation, and #11317 did not include these new tests. Use the shared minimal-data helper for test-only writes, while preserving malformed on-disk cases after validation. Fixes #11439
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify the pre-existing [DESIGN-REVIEWED] 5d9d875 |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
|
Coverage note, measured on origin/main at 3195475. The #11317 break spans TWO test files, not one:
and This PR touches #11445 covers both files plus |
|
Superseded by #11445 (same fix, all four test files). |
Summary
Restores the ledger retention and permanent-delete tests after session-entry write validation made their pre-validation fixture payloads invalid.
Problem / Motivation
#11317requires every declared session-entry field beforeLedger.appendwrites bytes. The retention fixtures added by#11193still write the older payload shapes, so main fails before those tests reach the retention behavior they are meant to check.Why it matters
The merged branch is red on deterministic test failures. Those failures hide the retention and deletion guarantees behind fixture-construction errors.
What changed (motivation → approach → change)
Production validation stays unchanged. The affected test fixtures use
test/ledger_type_helpers.py::minimal_datato fill required fields they do not exercise, while keeping the agent, owner, slot, lifecycle state, and tool result values each test does exercise.The two tests for malformed stored close records first use the validated writer, then replace only the on-disk payload. They still prove the reader handles damaged history without weakening the write boundary.
#11193(e65ec3ece7)#11317(039d3e83d7)#11193without seeing those new tests.Tests
04727ebe0f:test/test_ledger_retention.py test/test_remove_slot_for_history_key.pyproduced45 failed, 160 passed.205 passed.542 passed, 1 failed. The remainingtest_a_crew_append_is_untouched_by_the_registryfailure reproduces on clean base04727ebe0fand touches neither file in this change.scripts/check_black_formatting.pypassed after commit.Manual verification
N/A. These are isolated fixture writes and the targeted unit tests exercise the complete change.
Related Issues
Fixes #11439
Pattern harvest
Not generalizable: cross-PR merge race (#11317 tightened write validation; #11193's new tests were cut before it). The validator that caught it is the right guard.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)