feat(seed): generate Profile workspace data alongside migrations - #37
Merged
Conversation
The seed script only populated the Migrate workspace, leaving the Profile workspace empty for UI stress-testing. Extend it to also seed profile data: - Standalone org runs across every state — 6 completed (28–305 repos), plus one each of running, paused, and failed. - Two enterprise runs (one completed with 8 child orgs, one still crawling with a live child + inaccessible-org count) that exercise the aggregate roll-up and drill-down. - Per-repo signals are run through the real `analyzeRepo` engine, so the stored considerations / blockers / warnings are genuine, not hand-faked. Signal ranges occasionally trip the size blockers (2 GiB disk, 10/40 GiB release assets) and the warning/info considerations (LFS, packages, webhooks, rulesets, …) for a realistic mix. All rows use a `seed-` id prefix and are deleted+regenerated each run. Parity with the Migrate seed: profile startup recovery now also skips `seed-%` rows (recoverInterruptedProfiles + the list-running queries), so seeded running/enterprise runs survive a dev reboot instead of being failed. Verified: seeded data renders across the Profile feed, enterprise detail (aggregates + inaccessible-orgs banner + child drill-down), and the running run survives boot. Full gate suite green (coverage 89.46/86.74).
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
The seed script (
bun run seed) only populated the Migrate workspace, leaving the Profile workspace empty for UI stress-testing. This extends it to also generate realistic profile data, mirroring the migrate seed's richness.What's seeded
analyzeRepoengine, so the stored considerations / blockers / warnings match what a live crawl records (not hand-faked). Signal ranges occasionally trip the size blockers (2 GiB disk, 10/40 GiB release assets) and the warning/info considerations (LFS, packages, webhooks, rulesets, …) for a realistic mix.All rows use a
seed-id prefix and are deleted + regenerated on each run (existing real data is untouched).Parity fix: keep seeded running data alive across reboot
The Migrate seed's running rows survive a dev reboot because recovery skips
seed-%. The Profile recovery had no such exclusion, so seeded running runs would be failed on first boot. This adds the sameseed-%exclusion to:recoverInterruptedProfiles(both the org and enterprise UPDATEs)listStandaloneRunningProfileRuns/listRunningEnterpriseRuns(so the with-creds resume path doesn't try to crawl fake seeded orgs either)A new
schema.test.tstest asserts seeded running runs are left intact while non-seed runs are still recovered. (Paused runs were already safe — recovery only touchesrunning.)Verification
/api/profilelists all 9 standalone runs with correct states.inaccessible_orgs, and 8 child org runs with drill-down) all render.Files
scripts/seed.ts— profile seeding (the bulk of the change)src/lib/server/profile/schema.ts,store.ts—seed-%recovery exclusion (migrate parity)src/lib/server/profile/schema.test.ts— exclusion test