Skip to content

feat(recognition): publish the screenshot recognition gallery from master updates - #12

Merged
nichinichisou0609 merged 1 commit into
mainfrom
feat/recognition-gallery
Oct 3, 2026
Merged

nichinichisou0609 merged 1 commit into
mainfrom
feat/recognition-gallery

Conversation

@nichinichisou0609

Copy link
Copy Markdown

Summary

  • Adds .github/workflows/recognition.yml with .github/scripts/recognition.py: on masterdata-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 pointer recognition/current.json written last.
  • Publication is create-only and resumable, reads every object back over public HTTP (bytes, SHA-256, Content-Type, CORS) before the pointer moves, only advances the pointer from the bundle a build started from, and never publishes a gallery that lacks a published card.
  • Pinned runtime files (OpenCV.js and its WASM, ONNX Runtime Web, the field model) are listed in .github/recognition-runtime.json and come from the draft release recognition-runtime-1 when the bucket lacks them.
  • RECOGNITION_PUBLISH (repository variable, unset: dry runs only) switches uploads on; the existing STORY_S3_* secrets are reused.
  • Docs: .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.py
  • Manual workflow_dispatch with dry_run=true, then a publishing run after RECOGNITION_PUBLISH=true.

…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.
@nichinichisou0609
nichinichisou0609 merged commit 9e74d93 into main Oct 3, 2026
6 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