test(fixtures): restore apps-installed fixture with assertions - #8675
Conversation
Seed fixture-notes as an enabled local app with gateway-managed resources, gateway lifecycle metadata, a valid app manifest, and app-scoped notes data. Prove the production app manager lists the seeded app with the expected identity and state and resolves its seeded data file.
Design Review (Fable 5) — ✅ PASSDesign-level review of The verification checks out: the fixture's Design-Verdict: PASS Fixture is validated through the production readers it exists to serve, with schema fields verified against the manager's current persisted record. [DESIGN-REVIEWED] d096bf9 |
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: |
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) — ✅ PASSPremise-level review of All checks are done. The fixture's schema fields match what First-Principles-Verdict: PASS A data-only seed scenario the registry mechanism was built to absorb, validated through the production readers instead of by re-reading itself. What this change shipsIntent: give operators and app-manager tests a seedable home containing one installed non-builtin app — a FIX by the author's framing (restoring a pre-split fixture), functionally an ADDITION of one scenario.
Every item is declared in the description; the registry suite ( WatchThe byte-for-byte seed-fidelity contract is parametrized over hardcoded names, not the registry: 5 literal lists in [FIRST-PRINCIPLES-REVIEWED] d096bf9 |
chenmingwei23
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (6 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 apps-installed 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 (6 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/apps-installed data tree plus one new test/ consumer test; no existing file modified and no runtime code path changed.
Summary
Restores the
apps-installedseed fixture, which seeds aKIROCREW_HOMEcontaining onelocally installed app rather than a bare home:
config.json— an onboarded home (default workspacedefault->workspace, dark theme,host
127.0.0.1, UTC).apps/fixture-notes/installed.json— the persisted install record:enabled: true,origin: local,resources: gateway,lifecycle: gateway.apps/fixture-notes/app.json— a valid app manifest (name, displayName, version,description, author).
apps/fixture-notes/data/notes.md— app-scoped data, so the data-dir resolver has a realfile to find.
fixture.yaml— fixture metadata atschema-version: 2026-04-28.The point of the fixture is to give app-manager consumers a non-builtin subject: an
enabled local app with gateway-managed resources and gateway lifecycle metadata.
Consumer test
test/test_fixture_apps_installed.pydrives the production readers only — it never re-readsthe fixture files it seeded, so the fixture is validated through the code path real callers
use:
kiro_crew.apps.manager.list_apps()— assertsfixture-notesis listed withenabled is True,origin == "local",resources == "gateway",lifecycle == "gateway", and a parsedmanifest["name"] == "fixture-notes".kiro_crew.apps.manager.app_data_dir("fixture-notes")— asserts the resolver locates theseeded
notes.md.Both run inside
kiro_crew.testing.fixtures.seeded_home("apps-installed"), so a schema theproduction reader rejects fails the test instead of passing silently.
Schema repairs
The install record drifted from what the app manager now persists. Repaired against the
preserved pre-split copy:
installed_atrenamed toinstalledAt(camelCase, matching the persisted key).displayName,schemaVersion,dev,defaultOnBackfilled.Everything else in the pre-split copy is preserved as-is.
Verification
.venv/bin/python -m pytest test/test_fixture_apps_installed.py test/test_pod_scenarios_command.py test/test_pod_seed_scenarios.py test/test_seed.py -q125 passed, 0 failed.
The acceptance criterion is that this passes with the fixture present:
mainalreadycarries the registry-tolerant scenarios test from #8222, and the scenario/seed suites
enumerate the fixture registry, so a malformed or unregistered fixture would surface there
rather than only in its own test.
Style gates on the touched test file, all clean:
isort --check-only,flake8,black --check --target-version py310.Pattern harvest
Not generalizable: fixture restoration validated against current production readers; no new rule.
Backend-only change, no screenshots: the diff adds test fixture data under
src/kiro_crew/tests_fixtures/apps-installed/plus one test file undertest/. No dashboard,CLI-output, or other user-visible surface is touched.