test(fixtures): restore memory-populated fixture with assertions - #8674
Conversation
Seed preferences, projects, semantic memory, two history days, and three learned corrections in one deterministic fixture. Exercise the production lesson and markdown readers to prove every text layer is non-empty and distinct, all lesson fields parse, and seeded-home cleanup is hermetic. SQLite vector stores are deliberately excluded because reproducible binary fixtures require a dedicated builder.
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Additive fixture matching every existing convention (schema-version, config shape, production [DESIGN-REVIEWED] 00d1309 |
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: |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsAll APIs the test uses exist and behave as asserted. This PR adds only inert test-fixture data and one consumer test under No findings. [OPUS-REVIEWED] 00d1309 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of All evidence gathered — contract read, patch and intent read, consumers and siblings counted in the repo. Final review: First-Principles-Verdict: CONCERNS Restoring the fixture earns its place, but it re-ships What this change shipsIntent: give the shipped seed-scenario set a home where every text memory layer is populated, pinned by the consumer test whose absence got the fixture removed — an ADDITION.
Watch
Subtractions
[FIRST-PRINCIPLES-REVIEWED] 00d1309 |
dwu96
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (9 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, SAST annotations clean, security checklist all-NO, AI reviewers green. Category: purely additive test fixture — new tests_fixtures/memory-populated data tree plus one new test/ consumer test; no existing file modified and no runtime code path changed.
Summary
Restores the
memory-populatedseed fixture so every text-backed memory layer is non-empty at once,and adds the consumer test that was missing. The fixture seeds
preferences.md,projects.md,semantic.md, two dated history days (2026-01-14,2026-01-15), and alessons.jsonlcarryingthree learned corrections.
Vector stores (
memory.db,memory_index.db) stay out, per the SQLite deferral already recorded inrich/README.md: reproducible binary fixtures need a dedicated builder. The fixture asserts theirabsence rather than leaving it implicit.
Consumer test
test/test_fixture_memory_populated.pydrives the real production readers instead of re-parsing thefixture files itself:
LessonStore.load_all()— asserts all three lessons round-trip with every field exact(
rule,negative,ts,category,repo_scope), so a schema drift in the store fails here.MemoryStore.markdown_snapshot()— asserts the history set is exactly the two seeded dates, andthat preferences / projects / semantic / both history days are each non-empty and mutually
distinct (
len(set(layers)) == len(layers)), which catches a reader that silently returns the samecontent for two layers.
assert not list(home.rglob("*.db"))— pins the deliberate SQLite exclusion.assert not Path(home).exists()after the context exits — provesseeded_homecleanup is hermetic.Schema repairs
The restored fixture data had to be brought back onto the current
Lessonschema before theproduction reader would accept it:
tsvalues were numeric epoch floats; they are nowISO-8601 strings (
2026-01-16T00:00:00+00:00), matching whatLessonStorereads and returns.categoryfield added. Two lessons aretool, one ispreference.repo_scopefield added. Explicitlynullon two lessons and"src/kiro_crew"on the third,so both the scoped and unscoped branches are represented rather than only the default.
Verification
Run in the worktree venv, on the rebased head:
test/test_fixture_memory_populated.py+test/test_pod_scenarios_command.py+test/test_pod_seed_scenarios.py+test/test_seed.py— 125 passed. The registry-tolerantscenarios test from fix: return complete pod scenario descriptions #8222 is in main and passes with this fixture registered.
isort --check-only,flake8, andblack --check --target-version py310all clean.src/kiro_crew/tests_fixtures/memory-populated/plustest/test_fixture_memory_populated.py. Nothing else, 138 insertions, no deletions.Backend-only; no user-visible surface changes, so no screenshots.
Pattern harvest
Not generalizable: fixture restoration validated against current production readers; no new rule.