Repository navigation
feat(recognition): publish the screenshot recognition gallery from master updates - #12
Merged
Merged
Conversation
…ster updates Add a workflow that keeps the card box's screenshot recognition current in the story site's bucket. On masterdata-updated, a daily schedule or a manual dispatch it takes the union of every enabled region's Member and Snap cards, checks each card's artwork from the asset service, computes the RootSIFT gallery with pinned OpenCV, and publishes everything content-addressed under assets/<sha256>.<ext>: dependencies first, then the gallery and field manifests, then the bundle manifest, and last the small recognition/current.json pointer that names it. Publication is create-only and resumable: existing objects with matching bytes, Content-Type and CORS are kept, differing ones stop the run, and every object is read back over public HTTP before the pointer moves. The pointer only advances from the bundle a build started from, and only to a gallery that keeps every published card. Pinned runtime files (OpenCV, ONNX Runtime, the field model) come from a draft release when the bucket lacks them. RECOGNITION_PUBLISH switches uploads on; the existing STORY_S3 secrets are reused.
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.
Summary
.github/workflows/recognition.ymlwith.github/scripts/recognition.py: onmasterdata-updated, a daily schedule or a manual dispatch it builds the card box's screenshot recognition gallery from the union of every enabled region's Member and Snap cards and publishes it content-addressed into the story site's bucket (assets/<sha256>.<ext>), with the mutable pointerrecognition/current.jsonwritten last..github/recognition-runtime.jsonand come from the draft releaserecognition-runtime-1when the bucket lacks them.RECOGNITION_PUBLISH(repository variable, unset: dry runs only) switches uploads on; the existingSTORY_S3_*secrets are reused..github/RECOGNITION.md. Self-test:.github/scripts/test_recognition.py(synthetic data, also run by CI).Test plan
python -m pytest -q .github/scripts/test_recognition.pyworkflow_dispatchwithdry_run=true, then a publishing run afterRECOGNITION_PUBLISH=true.