test(fixtures): restore artifacts-library fixture with assertions - #8673
Conversation
Seed a version-two release checklist widget, a pagination markdown document, and a queue badge SVG using the current artifact metadata and version layout. The consumer test seeds an isolated home, exercises ArtifactStore.list() and ArtifactStore.get(), verifies all kinds and the widget's current version, and retrieves its retained v1 content through the version-read path.
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsThe diff is entirely test-fixture data plus one test that reads through the real No findings. [OPUS-REVIEWED] d5ff4a5 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of The diff is a self-contained fixture restoration: three artifact directories matching Design-Verdict: PASS Fixture restoration wired to the production reader, so schema drift now fails a test instead of silently breaking the library; no design concerns. [DESIGN-REVIEWED] d5ff4a5 |
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: |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of All evidence gathered. The fixture, its consumer test, and the read paths check out; two premise-level notes remain (framing and an undeclared config). Final review: First-Principles-Verdict: CONCERNS Fixture and test both earn their place, but "restore" has no in-repo referent and the fixture's pod-boot defaults ship undeclared. What this change shipsIntent: give pod operators and tests a pre-seeded artifact library, guarded by a test driving the real reader — ADDITION.
Watch
[FIRST-PRINCIPLES-REVIEWED] d5ff4a5 |
chenmingwei23
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (13 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: test(fixtures) restore artifacts-library fixture data plus one test assertion file, no runtime code.
dwu96
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (13 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/artifacts-library data tree plus one new test/ consumer test; no existing file modified and no runtime code path changed.
Summary
Restores the
artifacts-librarypod fixture and gives it a consumer test that drives the production artifact reader. The fixture seeds three artifacts covering the kinds the store distinguishes: a version-twowidget(release checklist), amarkdowndocument (pagination design), and ansvg(queue badge).Consumer test
test/test_fixture_artifacts_library.pyseeds the fixture into an isolated home and exercises the realArtifactStore, not a hand-rolled parser:ArtifactStore.list()— returns all three artifacts with the expected slugs, names, and kinds.ArtifactStore.get()— returns the release checklist at its current version (v2), confirming the current-pointer resolution.This makes the fixture load-bearing: a schema drift in
meta.jsonfails the test rather than silently producing an artifact library the dashboard cannot open.Schema repairs
The archived fixture predated several
meta.jsonschema changes. Repaired to match what the current reader expects:eventslist (created,iterated) withtype,version,by, andts, plus theevents_backfilledflag.version_kinds— per-version kind map ({"1": "widget", "2": "widget"}), so a version read resolves its own kind instead of inheriting the current one.source,source_path,source_root,source_copy_only,auto_registered,kind_auto,fork_metadata,publication,webapp_metadata.created_at/updated_at/ eventtsin full microsecond ISO-8601 with offset (2026-01-15T09:00:00.000000+00:00), matching what the writer emits.Verification
.venv/bin/python -m pytestover the fixture test plus the three seeding/registry suites — 125 passed:test/test_fixture_artifacts_library.pytest/test_pod_scenarios_command.pytest/test_pod_seed_scenarios.pytest/test_seed.pyThis fixture's name is longer than the
SCENARIOcolumn header, so it widens the rendered table. The registry-tolerant scenarios test from #8222 absorbs that without a column-width assertion — confirmed green here.Gates on the touched test file:
isort --check-only,flake8,black --check --target-version py310all clean.Backend-only fixture and test; no user-visible surface changes, so no screenshots.
Pattern harvest
Not generalizable: fixture restoration validated against current production readers; no new rule.