test: add production-scale reorder fixture and deterministic failure reproduction - #992
Open
devin-ai-integration[bot] wants to merge 4 commits into
Open
test: add production-scale reorder fixture and deterministic failure reproduction#992devin-ai-integration[bot] wants to merge 4 commits into
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
…reproduction Establishes the epic #975 fixture: 80 sibling categories, 600 sibling images, mixed root and nested scopes, duplicate sort_order values, with idempotent CLI seeding, backend integration tests against real PostgreSQL, and frontend latency-injected regression tests reproducing the silent-drop, stale-refresh-overwrite, and partial-persistence failures. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…arent Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #976 (first sub-issue of epic #975).
Adds the deterministic, production-scale reorder fixture and the regression scaffolding the rest of the epic builds on:
backend/app/reorder_fixture.py—build_fixture_spec()/seed_reorder_fixture()/purge_reorder_fixture()plus a CLI (python -m app.reorder_fixture [--purge]). Deterministic IDs in reserved high ranges (9_100_000+categories,9_200_000+images) andRF-prefixed names; 80 sibling categories, 600 sibling images, mixed root scope, 4-level nested scope, and duplicatesort_ordervalues in every scope. Seeding purges first, so it is idempotent with no manual cleanup.backend/tests/test_reorder_fixture.py— spec tests (always run) + PostgreSQL integration tests gated onREORDER_FIXTURE_DATABASE_URL: idempotent reseed, purge, and a full 80-category authoritative-order round-trip through the realreorder_categoriesendpoint. Twoxfail(strict=True)regressions document current bugs and will flip to failures when fixed:.github/workflows/ci.yaml—backend-testsnow runs apostgres:16-alpineservice, applies Alembic migrations, and setsREORDER_FIXTURE_DATABASE_URLso the integration tests run in CI.frontend/tests/helpers/reorderFixture.ts— mirrored deterministic generators +createDeferred()for injecting latency into category/image persistence and refreshes independently.frontend/tests/components/SortableTileGridReorderRegression.test.tsx— passing baselines (695-tile render, 20 consecutive awaited reorders) and threeit.fails(...)regressions asserting the desired behaviour:reorderInFlightRefearly return);docs/reorder-fixture.md— fixture-loading workflow, scenario mapping, and observed timings at fixture scale (linked from README).Needs human verification
None — but note the navigation-away-during-save and reload-and-compare journeys are documented as browser-level (Playwright) scenarios to be driven against a fixture-seeded environment; they are not automated in this PR.
Testing
backend:poetry run pytest— 940 passed, 2 xfailed, coverage 86%.frontend:npm test— 1323 passed, 3 expected fail;npm run format:checkclean.Link to Devin session: https://app.devin.ai/sessions/414754bd88374dc693f47100ac269e78