test: every real-server cycle writes a recipe and exports through it - #802
Merged
Conversation
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.
Part of the pre-processing epic (#785): the last phase, which puts a recipe into every real-server cycle. A change that alters export output escalates to the cycle scenarios by the checks policy, and until now none of the four walked past the shipped recipe surface.
What changed
The browser cycle (
frontend/app/cycle/cycle.spec.ts) publishes its release with a split — the dialog's own 0.7 / 0.15 / 0.15, which puts two of the three assets in the train fold — and, after the existingyolo11export, walks two more steps. The first writes a recipe on the Dataset's Pre-processing view the way a person does: the empty view's invitation, a name,YOLO11as the target (asserting its hints preselected letterbox 640×640),hflipticked (asserting it made one variant), the first preview row rendered through the real preview route, Save recipe. The second exports through it from the export dialog's recipe picker, meets the lossy consent again, and opens the download: the report names the recipe under a 64-hexrecipe_hash, and both train-fold images have animages/train/<hash>-aug1.pngwith alabels/train/<hash>-aug1.txtbeside them, traced to their source by the report's mapping. The refused-call roster gains the second export's 409 — the consent question, asked once per launch, exactly as before. The zip reader now walks the central directory into a listing so a variant can be found by pattern.The three surface examples each gain a recipe step in their own idiom. HTTP creates the recipe with
POST /projects/{p}/preprocessing-recipes, asserts the first?target=yolo11&recipe=yolo-640launch answers409 LOSSY_EXPORT_NOT_CONSENTED, retries withallow_lossy=true, and reads the report and the-aug1label out of the downloaded zip. MCP callscreate_preprocessing_recipeandlist_preprocessing_recipes, exports withrecipe=andallow_lossy=True, and checks the result'spreprocessingmapping against the files on disk. The shell script runsvisionset recipe create … --resize letterbox:640x640 --augment hflip --variants 1 --target yolo11andexport --target yolo11 --recipe yolo-640 --allow-lossy, then asserts the report and its three train variants throughpython3. Every release in the three examples was already published with a split, so augmentation runs in all of them; eachSummarycarries the hash and the variant, and the smoke tests undertests/examples/pin them.docs/content/examples.mdanddocs/content/mcp-walkthrough.mddescribe the new steps.Found, not fixed
hflipis a seeded coin per variant, so a variant can be byte-identical to its source (the HTTP example's single train image is). The cycles assert on names and the mapping, never on bytes.Stack
Position 6 of the pre-processing stack (#785); based on
mainafter #801.Checks
Targeted while iterating:
uv run python examples/http_end_to_end.py,uv run python examples/mcp_end_to_end.py,uv run bash examples/cli_end_to_end.sh,uv run pytest tests/examples/test_{http,mcp,cli}_end_to_end.py(22 passed),pnpm --filter @visionset/app lint, and the cycle suite (1 passed (32.8s)).Full
bash scripts/check.shon the final tree: