feat(demo): randomized, persona-based sample data with a real 6-month arc - #6
Merged
Merged
Conversation
Rework the sample-data generators around three ideas: a fresh seed makes a fresh org (name, scale, growth rate all seeded per run) while staying pure and clock-free; an org archetype parameter picks between the sprawling enterprise (every rule category fires) and a lean startup (2-3 clean workspaces/projects, 1-2 minor findings); and a monthsAgo parameter gives each run a deliberate shape — compounding growth toward the present, a decaying legacy workload, and one runaway-agent incident month that spikes the Agent Platform's cache writes. The OpenAI side gets the curated treatment the Anthropic side already had: a per-project completions workload table with one named project per rule story, light background traffic on the non-completions services, and costs derived from the same token volumes at pricing-table rates.
startDemo now draws one random seed per click and threads it, the chosen persona, and monthsAgo through all six monthly generator calls — randomness lives in the UI layer only. A small two-option picker under the sample-data button selects between the sprawling enterprise and the lean startup.
Byte-identity with explicit seeds for both personas and vendors, different seeds producing different orgs, one org per run, at least 6 distinct rule categories per vendor for the enterprise, at most 3 modest findings per vendor for the startup, strictly increasing enterprise spend outside the incident month, and the incident month's cache-write spike vs neighbors.
Fresh org every click, coherent within a run, two personas — replacing the same-org-every-run description, and bumping the test count to 96.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Reworks the demo engine so every "Try with sample data" click generates a fresh org while each run stays internally coherent, with a two-archetype persona picker on the home page.
startDemodraws one seed per click (Date.now()) and threads it through all six monthly calls.demoAnthropic/demoOpenAIstay pure and clock-free — same(year, month, seed, persona, monthsAgo)in, byte-identical data out.DEMO_SEEDremains the default so tests stay deterministic.monthsAgo = 2— a runaway agent loop that ~4×'s the Agent Platform's cache writes and visibly bumps that month's spend — while the Legacy Summarizer decays ~20%/mo. Startup grows a gentle 3–6%/mo. The analytics forecast finally has a real slope to fit.One note: the mini-downgrade story uses
o1-minirather thangpt-4obecauseprOpenAI("gpt-4o-mini")substring-matches thegpt-4otable entry first, so a gpt-4o→mini repricing nets $0 and the rule can never fire on gpt-4o rows. The engine is untouched per the constraints; probably worth a follow-up fix in the pricing lookup.Checklist
startDemo, generators pure; purity pinned by test)"enterprise" | "startup"parameter + Ink/Moss-styled picker under the sample-data buttonmonthsAgoparameter)Verification:
npm run type-check,npm run lint,npm run format:check,npm test(96 tests) all pass. Docs updated (README "Run it", PRODUCT.md "Where it stands").