Skip to content

test(fixtures): restore artifacts-library fixture with assertions - #8673

Merged
chenmingwei23 merged 1 commit into
mainfrom
fx/fixture-artifacts-library
Sep 5, 2026
Merged

test(fixtures): restore artifacts-library fixture with assertions#8673
chenmingwei23 merged 1 commit into
mainfrom
fx/fixture-artifacts-library

Conversation

@pepmach

@pepmach pepmach commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Restores the artifacts-library pod 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-two widget (release checklist), a markdown document (pagination design), and an svg (queue badge).

Consumer test

test/test_fixture_artifacts_library.py seeds the fixture into an isolated home and exercises the real ArtifactStore, 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.
  • Version-read path — retrieves the retained v1 content for the same artifact, confirming history is readable and was not clobbered by the v2 write.

This makes the fixture load-bearing: a schema drift in meta.json fails the test rather than silently producing an artifact library the dashboard cannot open.

Schema repairs

The archived fixture predated several meta.json schema changes. Repaired to match what the current reader expects:

  • Lifecycle events — each artifact carries an events list (created, iterated) with type, version, by, and ts, plus the events_backfilled flag.
  • version_kinds — per-version kind map ({"1": "widget", "2": "widget"}), so a version read resolves its own kind instead of inheriting the current one.
  • Provenance fieldssource, source_path, source_root, source_copy_only, auto_registered, kind_auto, fork_metadata, publication, webapp_metadata.
  • Microsecond timestampscreated_at / updated_at / event ts in full microsecond ISO-8601 with offset (2026-01-15T09:00:00.000000+00:00), matching what the writer emits.

Verification

.venv/bin/python -m pytest over the fixture test plus the three seeding/registry suites — 125 passed:

Suite Role
test/test_fixture_artifacts_library.py 1 test — the new consumer test
test/test_pod_scenarios_command.py scenario listing / rendering
test/test_pod_seed_scenarios.py every shipped fixture seeds into a fresh home
test/test_seed.py seeding mechanics

This fixture's name is longer than the SCENARIO column 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 py310 all 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.

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.
@pepmach
pepmach requested a review from a team as a code owner September 5, 2026 06:25
@pepmach
pepmach requested a review from bolichen97 September 5, 2026 06:25
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed d5ff4a5e49f0f6a25f9a96fb8d94e1c5a794e8bd — this comment is updated in place on each push.

Review details

The diff is entirely test-fixture data plus one test that reads through the real ArtifactStore. I verified the store's get() behavior against the fixture layout: empty source_path reads current.html, version=1 reads versions/v1.html, version_kinds restores kind — the assertions hold (release-checklist v2 current.html contains "Contributors credited", v1 does not). No production code, security boundary, or path/command construction is touched. The discovery pass found no candidates, and falsification confirms there is nothing behavioral to report.

No findings.

[OPUS-REVIEWED] d5ff4a5

Verdict parsed from the review's SHA-scoped output markers for commit d5ff4a5e49f0f6a25f9a96fb8d94e1c5a794e8bd.

False positive or not applicable? A repository writer can comment:
/ai-review override fable d5ff4a5e49f0f6a25f9a96fb8d94e1c5a794e8bd: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of d5ff4a5e49f0f6a25f9a96fb8d94e1c5a794e8bd — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

The diff is a self-contained fixture restoration: three artifact directories matching ArtifactStore's documented layout (meta.json + current.html + versions/), a fixture.yaml/config.json pod matching the existing empty/minimal/rich fixture pattern, and one consumer test that drives the production ArtifactStore through seeded_home. The test covers list, current-pointer resolution (v2), and the retained-v1 read — exactly what the description claims. The fixture's hand-authored meta.json schema-drift risk is precisely what the consumer test neutralizes, and the on-disk fixture (vs. generating via the writer at test time) is justified by the pod's demo-seeding role. Nothing undocumented is smuggled in; no public surface, schema, or default changes; fully reversible.

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

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of d5ff4a5e49f0f6a25f9a96fb8d94e1c5a794e8bd and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] d5ff4a5

False positive or not applicable? A repository writer can comment:
/ai-review override gpt d5ff4a5e49f0f6a25f9a96fb8d94e1c5a794e8bd: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of d5ff4a5e49f0f6a25f9a96fb8d94e1c5a794e8bd — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 ships

Intent: give pod operators and tests a pre-seeded artifact library, guarded by a test driving the real reader — ADDITION.

  1. kirocrew pod scenarios gains an artifacts-library scenario, seedable via --seed — justified
  2. A seeded pod opens with three artifacts: versioned widget, markdown note, svg badge — justified
  3. New test drives the production ArtifactStore (list, current-pointer, v1 history) over the fixture — justified
  4. A pod seeded with this scenario boots pre-onboarded, dark-themed, interactive-approval (fixture config.json) — undeclared

Watch

  • "Restores the artifacts-library pod fixture" / "The archived fixture predated several schema changes": git log --all -- '*artifacts-library*' over the full (non-shallow) history shows zero prior commits shipping this path, and docs/ greps zero references. The archive is outside this repository, so judge it as a new addition — which it survives: no other fixture ships an artifacts/ tree (checked empty, minimal, rich), and test_pod_seed_scenarios only copies fixtures, never reads them, so the consumer test is meaningfully new, not a second spelling.
  • The description claims "no user-visible surface changes", but item 4 is observable to anyone booting the scenario: config.json sets onboarded: true, theme_mode: dark, approval_mode: interactive. The choices are defensible (an un-onboarded pod hides the library the fixture exists to populate) — they just were never declared. Its "dir" workspace key matches the current WorkspaceConfig(dir=...) schema, unlike minimal's legacy "path", so no repair needed there.

[FIRST-PRINCIPLES-REVIEWED] d5ff4a5

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Sep 5, 2026
@chenmingwei23
chenmingwei23 enabled auto-merge (squash) September 5, 2026 07:05

@chenmingwei23 chenmingwei23 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chenmingwei23
chenmingwei23 merged commit d50cc51 into main Sep 5, 2026
64 checks passed
@chenmingwei23
chenmingwei23 deleted the fx/fixture-artifacts-library branch September 5, 2026 07:05
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 5, 2026

@dwu96 dwu96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

3 participants