Repository navigation
feat(journeys): prescale run replays journeys at load - #8
Merged
Merged
Conversation
…est think time and compare
# Conflicts: # CHANGELOG.md # README.md # cli/src/prescale_cli/commands/journeys.py # cli/src/prescale_cli/journeys/replay.py
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.
Stacked on #7 (journey format). This PR's base is #7's branch, so the diff shows only this slice. It gets retargeted to
mainonce #7 merges.When
prescale/journeys/has journeys,prescale runnow replays them at load. Each virtual user walks a whole journey (log in, add to cart, place an order), pauses for each step's think time, then starts again as a new user with its own cookies and values. Each journey is checked once and then ramped on its own, so its verdict doesn't depend on any traffic mix. The report names the journey and the step that break first, with per-step timings. A stale journey isn't load-tested and is listed with the reason.--journey NAMEpicks journeys;--urls(or--path,--from-sitemap) tests URLs exactly as before.Saved runs gain
journeys(one entry per journey: survives, band, culprit step, per-step timings, or the reason it was skipped),verdict.culprit_journeyandconfig.mode: "journeys". All are additive underschema_version: 1. The top-level verdict and stages are the first-to-break journey's, so existing readers keep working.prescale comparetreats a URL run and a journey run as not comparable instead of reporting a regression.How it was verified
Against the example shop (
checkout= login → cart → order; the order draws from a 25-connection pool):--json: verdict survives 20,culprit_journey: checkout. Per step at 30 users: login 65ms with 0% errors, cart 48ms with 0%, order 142ms with 8.3% errors.prescale showre-renders the table from the saved run./checkoutalone survives about 100. Walking the real journey finds the lower breaking point.--json: the note goes to stderr, stdout is only the Result. Every journey stale: "no journey replays against this app…", exit 1.ruff check cli/src: clean ·pytest cli/tests -q: 298 passed. All the pre-existing tests pass unchanged, so URL mode is unaffected.Risk
Tier: risky · Public surface: the Result fields above plus the JSON Schema;
runflags--journey,--urls,--allow-writes,--dir;runswitches to journeys whenprescale/journeys/has files;comparetreats URL and journey runs as not comparable.Rollback: revert. Nothing is written outside local
.prescale/runs, and older readers ignore the extra fields (the schema allows additional properties).Fresh-context review blocked on three bugs. All were reproduced, fixed and pinned by tests:
/accountlooked stale. Redirects are now followed one hop at a time, each hop carrying the run's cookies and passing the same-origin check.--json, notes about stale journeys went to stdout, so the output wasn't valid JSON. They now go to stderr./redirects to an SSO host crashed the ramp in the/preflight. Journey runs skip that probe now, since each journey has already been replayed once.Also from the review:
culprit_journeyis null when nothing broke.--think-timeand launch profiles apply to steps without their ownthink.Notes for review
Generated by Claude Code