Skip to content

The demo survey learns what everyone spent the quarter on - #31

Merged
AllTerrainDeveloper merged 1 commit into
mainfrom
feature/demo-repeater
Aug 21, 2026
Merged

AllTerrainDeveloper merged 1 commit into
mainfrom
feature/demo-repeater

Conversation

@AllTerrainDeveloper

Copy link
Copy Markdown
Owner

Now that repeaters report in analytics (#30), the demo data has to show it — a report feature nobody can see against the seeded survey is a feature nobody knows exists.

What the survey gains

  • A repeater — "What did you spend the quarter on?", itemLabel "Project", 1–4 rows of: name (text), hours a week (number, required, 1–40), and outcome (Shipped / Still in flight / Quietly shelved).
  • A computed total — sum( {projects.hours} ) — never posted by the generator, always recomputed by the pipeline, so its histogram is a distribution the seeder never wrote directly.

The population stays deliberate

  • Unhappier people carry more projects at once (rows-per-entry gets a slope, not a spike).
  • Hours split a believable week across the cards — the computed total lands around 30 whatever the count.
  • Outcomes track morale: happy people shipped, unhappy people watched things get quietly shelved.
  • One project name in eight is blank, so the sub-field's per-row response rate is visibly under 100.

Seen on the 8889 QA site (removed + reseeded 500 entries)

  • Rows-per-entry: 162 / 157 / 113 / 50 across 1–4 projects, mean 2.11.
  • "What was it called?": 88% answered · 899 of 1015 rows — the per-row denominator wording working.
  • "Hours a week it took": pooled histogram over 1015 rows, mean 14.14.
  • "Where did it land?": Shipped 44% · Still in flight 39% · Quietly shelved 17%.
  • "Weekly hours across your projects": server-computed bell centred on 30 (mean 29.78).
  • The team cross-tab picks the total up as a metric column automatically.

Tests

  • The survey-normalisation and report-coverage tests now assert the repeater, its sub-shapes, and the aggregate formula.
  • New end-to-end test: every seeded entry's stored project_hours equals the sum of its rows' hours — proving the pipeline, not the generator, computed it.
  • Population-variety test for the rows: counts spread, all three outcomes reached, some (not most) names blank.
  • Full suite: 692 PHPUnit green, PHPCS clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp

The pulse survey gains a repeater — the quarter's projects, one card each:
a name, weekly hours, and where it landed — plus a total computed by
sum( {projects.hours} ), so the demo exercises every per-row panel the
report just learned to draw and runs the aggregate grammar through the
real pipeline five hundred times.

The population stays deliberate: unhappier people carry more projects at
once, happy people shipped theirs, hours split a believable week across
however many cards, and one project name in eight is blank so the
sub-field's per-row response rate is visibly not 100.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp
@AllTerrainDeveloper
AllTerrainDeveloper merged commit 00fb5c1 into main Aug 21, 2026
3 checks passed
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.

1 participant