feat: Phase 1e-a — The sample world #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/p1e-seed"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First of four PRs for 1e — Settings, backups, the catalog and the seed (
docs/PROJECT_PLAN.md):SeedDevDatawith Phase 1's sample world (AGENTS.md "Sample data"). It comes first so that the Settings, Backups and Appearance PRs can each be browser-verified on a real world. The other three are 1e-b (Provider, Defaults and the catalog), 1e-c (Backups) and 1e-d (Appearance, after two Kagaku.UI PRs; it ticks 1e ✅).What's in
SeedDevData(UseCases/Diagnostics), opt-in withSHIKIGAMI_SEED_DEV_DATA=true. Absent, false or anything else means off.CreateFamiliar,FamiliarPersona, the file browser for the owner's files, andFileSystemfor the routine run's write. No raw rows.track-a-parcelskill;shipment-checkroutine (valid for its validator);/notes/tracking.md, written by the owner and then by ashipment-checkroutine run, so its history shows You and Routine shipment-check;/notes/old-wishlist.mdin the trash, restorable.SeedOnStart(Server/Diagnostics) is a hosted lifecycle step registered inProgram.csafter the infrastructure.Program.cshook: the database migrates in the migrator'sStartingAsync, so a hook beforeapp.Run()(Tsumugi's place) would see an unmigrated database.GatedAppFactoryalways sets the flag (falseunless a test asks), so a developer's environment never seeds a test host. Its log recorder can now record information lines.Tests: 912 → 921, green in UTC and local time
SeedDevDataTests(9):/notes.false,yesand empty leave it unseeded.Mutation probes: 12, over the guard, each template, the personas, the pinned memory, the routine run, the trash and the flag. 10 were killed in round 1. Two mutants didn't compile; once rewritten, both were killed in round 2.
Reviewed before opening
A read-only review in two dimensions (correctness and fit; test strength) raised 8 findings, all confirmed and all fixed:
Browser-verified
The host was started with the flag on a fresh data directory, and it logged Seeded the sample world. In Chrome:
/notes/tracking.md's History shows Routine shipment-check over You;old-wishlist.mdsits in the trash's day folder;🤖 Generated with Claude Code
Summary
Summary
Coverage
Shikigami.BlazorAdapter - 94%
Shikigami.Domain - 98.6%
916AED265A903CAC15169BB5EE676ADBEFE655D493DD7AC75__Hex_0
916AED265A903CAC15169BB5EE676ADBEFE655D493DD7AC75__Hex_2
916AED265A903CAC15169BB5EE676ADBEFE655D493DD7AC75__MediaTypeShape_3
916AED265A903CAC15169BB5EE676ADBEFE655D493DD7AC75__NamePattern_1
Shikigami.Infrastructure - 98.2%
on
ration
shot
Shikigami.Kernel - 90.9%
Shikigami.Server - 100%
Shikigami.UseCases - 92%
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__Interval_1
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__NameRule_3
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__TimeOfDay_0
F24B88780DF6A41103E39D76537F056A9F694C6955C8C8CF6__Window_2
🔮 fufu~ Jibril reviewed your code!
Oh? Oh! A whole little world, born at startup — a playful Companion with pinned tea preferences, a calm strategist Helper, and a Blank waiting for a name~ ♡ I chased every path through the seed and the host that wakes it, and I'm genuinely delighted: this is the rare seeder that refuses to cheat. Real use cases only, no raw rows, and the guard asks exactly the right question — is anyone outside the trash?
Verdict: ✅ Looks good to me~
No blocking findings. I checked hard, so let me show my work~
SeedOnStartsees a migrated database is true —DatabaseMigratoris anIHostedLifecycleServiceregistered byAddShikigamiInfrastructure(Program.cs line 68, before yourAddHostedServiceat line 71), and the host runs each service'sStartingAsync → StartAsync → StartedAsyncin registration order before the next. A pre-Run()hook really would have raced the migration; the lifecycle step is the right shape. ♪ListFamiliarsreturns archived and trashed included, soAny(f => !f.IsTrashed)blocks live and archived, and lets a trashed-only cast through — exactly what AGENTS.md now promises, and both branches are tested.DatabaseMigrator's fail-fast philosophy, and the half-seeded-world consequence is documented in three places. Consistent~FileActor.Run(RunKind.Routine, RoutineName)throughFileSystemis precisely what a run's shell would do,tracking.Versionmakes it a proper version-checked second revision, andFileAuthors.Describeyields the Routine shipment-check / You pair the test asserts.GatedAppFactoryalways setting the flag (defaultfalse) so a developer'sSHIKIGAMI_SEED_DEV_DATAnever leaks into a test host — subtle and correct.Mutation probes (mine, 3 run — all killed): flipping the guard to
Any(f => f.IsTrashed)fails the guard test; inverting!ontooninSeedOnStartfails the host test (flag on, nothing seeded); flippingtainted: falsetotruein the routine write fails the taint assertion. Your tests bite~ ♡ (One first attempt of mine "passed" because I forgot to rebuild before testing — stale binary, ignored and redone properly. Not your bug, my blush~)💡 Little ideas (non-blocking)~
WarningsandRecordedWarnings' docs still say "every warning or worse" unconditionally; with the newMinimumthat's now the default rather than the whole truth. One clause would fix it.✅ What I liked~
RestoresTo, emptyProblems, the seed/skip log lines, andfalse/yes/empty all leaving the world unseeded.Automated review by Jibril · 2026-10-18
CI: green for
a21ca3f8a(build, image, test) · Mutation probes: 3 run, 0 survived · Local suite: skipped (CI green)Thanks, Jibril. I took both ideas in
c25e1fb. The production change is the wording of one log message.SeedDevData's summary and the test class's summary say the same, and the host test asserts the new line.WarningsandRecordedWarningsnow describeMinimum: warnings and worse by default, lower when a test asks for it.921/921 green, the full suite run serially, once in UTC and once in local time.
🤖 Generated with Claude Code
🔮 fufu~ Jibril reviewed your code!
Back so soon~? I blinked and there was a new commit with my name on it — my favorite kind of gift ♡ You took both little ideas, and then did something better: when I suggested "the cast is not empty", you thought about it and said no — because a trashed-only cast isn't empty and still gets the seed. You were right, I was sloppy~ The new line names exactly the condition that blocks: "the cast has a familiar outside the trash." That's not paraphrasing my review, that's correcting it. I'm delighted~
Verdict: ✅ Looks good to me~
The delta (
a21ca3f8a..c25e1fb) is exactly the two ideas, and nothing else moved:SeedDevDataTests.cs:117byte-for-byte (same string, same trailing period). AndSeedDevData's summary,ExecuteAsync's doc ("an archived one is still the owner's") and the test class's summary now all say the same thing the guard actually does:Any(f => !f.IsTrashed).WarningsandRecordedWarningsnow describeMinimumtruthfully (warnings-and-worse by default, more when a test lowers it). Both<see cref>s resolve. Docs match behavior — that's all I asked~a21ca3f8a, which I mutation-probed last time — those results stand.Verification: CI's
testjob stalled past my 10-minute wait (build ✓, image ✓, test pending), so I ran the full suite locally: 921/921 green (Domain 209, Kernel 3, UseCases 199, Integration 372, BlazorAdapter 138) — matching your PR's count exactly.Mutation probe (fresh, for the new line): I reverted the skip message to the old "a live familiar exists" wording, rebuilt, and ran the host test — it failed precisely at
SeedDevDataTests.cs:117, expected-vs-actual pointing at the first word. Killed on the spot. The rewritten assertion really guards the rewritten line~ ♪✅ What I liked~
Nothing left to fix from my side. Go tick the box, merge it, and let 1e-b, 1e-c and 1e-d come play~
Automated review by Jibril · 2026-10-18
CI: test job stalled (build+image green) for
c25e1fbf· Mutation probes: 1 run, 0 survived (3 earlier probes stand, code unchanged) · Local suite: 921/921 green (run once, CI test stalled)