Skip to content

fix(seed): give House 2 realistic demo history - #917

Merged
mforce merged 2 commits into
mainfrom
fix/886-demo-house2-history
Sep 21, 2026
Merged

mforce merged 2 commits into
mainfrom
fix/886-demo-house2-history

Conversation

@mforce

@mforce mforce commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Seed 240 historical days for House 2, matching House 1's span while leaving today unrecorded.
  • Lower House 2's baseline to 275 eggs so its seeded production stays below its bird count and the farm lay rate remains plausible.
  • Pin the 240-day count, maximum seeded total, and today-open state in the integration test.

Closes #886

TDD evidence

The focused regression test failed before the seeder change:

Assert.Equal() Failure: Values differ
Expected: 240
Actual:   7

After the fix, the focused test passed 1/1.

Runtime evidence

Before: PR #912's readme-farm Lay Rate frame at 406cc0b shows seven partial days in the fortnight strip. I used that existing frame because it captures the same demo seeder before this change.

After: frames are attached in a PR comment and name head 29cc12f10995a8a77c430361402f8366d056c0ef. The Lay Rate capture asserts 14 recorded days and no partial or unrecorded slots; the viewport-top frames show House 2 still unrecorded today. Frames were captured at 8152610; 29cc12f changes only a seeder comment and a test variable name, so rendered bytes are unchanged.

Demo seeding took about 10 seconds before and 23 seconds after on this host. The full final isolated reset took 83.68 seconds.

Available stock rises from 107,583 eggs in the before frame to 173,458 after because House 2 contributes 233 additional production days. This PR adds no stock-consuming facts; accepting that larger demo inventory is an owner decision.

docs/images/dashboard.png is intentionally unchanged. It can be recaptured on the demo farm after merge as an owner decision.

Verification

  • Cluckwork.Application.Tests: 532 passed
  • Cluckwork.Api.IntegrationTests: 1,851 passed
  • dotnet build Cluckwork.sln: succeeded with 0 warnings and 0 errors
  • Lay Rate capture: 4 passed at 1280x800 and 390x844, light and dark
  • Viewport-top capture: 4 passed at 1280x800 and 390x844, light and dark; only the expected fresh-session 401 probe appeared

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 353fab17-eab7-4f6d-858e-181e2e4ed981


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mforce

mforce commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

After evidence for head 29cc12f. Lay Rate frames show fourteen complete bars; viewport-top frames show House 2 remains unrecorded today.

After at 1280x800, light; House 2 remains unrecorded

After at 1280x800, dark; House 2 remains unrecorded

After at 390x844, light; House 2 remains unrecorded

After at 390x844, dark; House 2 remains unrecorded

After Lay Rate in viewport at 1280x800, light

After Lay Rate in viewport at 1280x800, dark

After Lay Rate in viewport at 390x844, light

After Lay Rate in viewport at 390x844, dark

After Lay Rate card at 1280x800, light

After Lay Rate card at 1280x800, dark

After Lay Rate card at 390x844, light

After Lay Rate card at 390x844, dark

@mforce
mforce force-pushed the fix/886-demo-house2-history branch from 29cc12f to 4ee57c2 Compare September 20, 2026 19:00
@mforce

mforce commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

Review round — resolved at 4ee57c2

Reviewer: Codex (gpt-6-astra via Paseo) over origin/main...fix/886-demo-house2-history at 29cc12f; CodeRabbit is not triggered on this repo.

# Finding Fix
P2 DemoDataSeeder.cs: House 2 was placed 20 weeks ago, so ~100 of its new 240 days predated placement and Reports excluded them from hen-day Placement moved to 40 weeks ago; new literal assertion in DemoSeedTests that no House 2 entry predates placement (red first: Expected: 0 / Actual: 100, then green)
P3 tools/verify/features/dashboard.md and tools/simulation/ui/README.md still described seven hatched demo days / one house with 240 days Both sentences updated

Coordinator finding during capture review (fixed before the PR opened): with 240 days the seeded mortality shrinks House 2 to ~320 birds while its egg totals stayed at 350–372, pushing the Dashboard hen-day figure to 108.2%; baseline lowered to 275 (now 98.1%) and the test pins every seeded total at or below the final bird count.

Verification at 4ee57c2 (autosquashed; tree identical to the pre-rebase tip): Application 532/532, Integration 1,851/1,851, ImagePin 2/2, dotnet build Cluckwork.sln 0 warnings. Frames captured at 8152610; the later commits change placement date, comments and docs only, and the visible 14-day strip and 7-day hen-day windows are unaffected. Seed duration ~10 s → ~23 s.

Owner decisions carried in the body: demo stock rises 107,583 → 173,458 eggs; the README dashboard image may be recaptured after merge. Product defects this round: 1 (placement date). No further Codex trigger unless CI raises something.

@mforce

mforce commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

Addressed both Astra findings at head 4ee57c2665e0537fb94e860745ff6f7b768cdc40.

  • House 2 is now placed 40 weeks ago, before its 240-day entry history. The new guard failed before the fix with Expected: 0 / Actual: 100 pre-placement entries and now passes.
  • Updated the stale Dashboard verification and simulation UI documentation.
  • Verification: Application 532/532; integration 1,851/1,851; ImagePin 2/2; solution build 0 warnings and 0 errors.

No recapture was needed: this changes placement outside the displayed window. The visible 14-day strip and both 7-day hen-day windows are unchanged.

@mforce

mforce commented Sep 20, 2026

Copy link
Copy Markdown
Owner Author

CI at 4ee57c2: the web job failed on src/components/NamedEntityPicker.test.tsx › "commits the active option on Enter" (expected Flock 105, received 105), a keyboard-typing race in a test this PR does not touch (the PR changes the demo seeder and two docs files only); the same job passed on 29cc12f. Re-running the failed job; recorded here so the flake is traceable.

@mforce
mforce merged commit 1472221 into main Sep 21, 2026
27 of 28 checks passed
@mforce
mforce deleted the fix/886-demo-house2-history branch September 21, 2026 01:17
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.

seed: the demo profile gives House 2 only seven days of history, so the fortnight strip renders half partial

1 participant