You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Production OCRKit already resolves its model through the stable release channel, but a newly promoted model is not loaded until the production container is recreated. The current operational path therefore has a manual last mile: publish/promote a verified model, access the host, recreate OCRKit, then manually confirm which model actually loaded.
This makes it easy for production to remain on an older model even when newer verified artifacts already exist.
Goal
Provide one controlled production rollout operation for an already-promoted stable model that recreates/restarts OCRKit as required, verifies that the intended immutable manifest/model is loaded, runs a representative recognition smoke check, and leaves a clear rollback path.
Do not implement in-process hot model swapping unless repository evidence shows it is necessary. A controlled container recreate/restart is acceptable and preferred when it preserves the current simple runtime model.
Target flow
candidate published
→ explicit promotion to stable (#8)
→ explicit production rollout
→ recreate/restart OCRKit
→ model manifest download + checksum/load verification
→ health verification
→ assert loaded model_version/manifest == promoted target
→ released-HUD recognition smoke
→ success
Candidate publication alone must never trigger production rollout.
Rollout boundary
The implementation should reuse the existing deployment topology and secrets rather than introducing a new deployment control plane. Determine the safest mechanism from the current repository/deployment reality (for example existing CI/CD, an approved remote deployment action, or host-side deployment tooling).
Requirements:
no manual per-model edit of OCRKIT_MODEL_MANIFEST_KEY for normal releases;
stable release-channel selection remains the production source;
model artifacts remain immutable and verified;
application image and model artifact lifecycles remain independent: a model-only rollout must not require rebuilding the OCRKit application image unless application code also changed;
production secrets, R2 credentials, service tokens, screenshots, and private OCR payloads must not be exposed in Actions output or committed evidence.
Verification
A deployment/recreate or HTTP 200 is not sufficient evidence.
The rollout must verify at minimum:
OCRKit process/service is healthy after restart;
the loaded model_version matches the intended promoted target;
where available, the loaded manifest identity/hash corresponds to the promoted immutable manifest;
the configured OCR engine can initialize and serve recognition;
Prefer reusing #9 compatibility/evaluation tooling rather than implementing a separate recognition test stack.
Failure behavior
If restart, model download, checksum verification, load verification, health verification, or recognition smoke fails:
the rollout must report failure explicitly;
do not mark the model as production-verified;
preserve enough information to identify the attempted stable target;
provide/test the supported rollback operation that repoints stable to a previously verified manifest and reruns the normal rollout path.
Do not silently fall back to an arbitrary model while reporting success.
Rollback
Rollback should be operationally equivalent to:
select previous verified immutable manifest as stable
→ run the same production rollout
→ verify loaded version + recognition smoke
It must not require retraining or republishing the old artifact.
Evidence and platform coordination
This issue owns OCRKit model rollout mechanics and OCR service verification only. Full submission/mastery/title production verification remains in OWBastion/owbastion.com#80 and must use sanitized traceable evidence after the relevant Bastion/OCR compatibility is released.
Do not treat this issue's successful model smoke test as proof that the whole platform business path works.
Acceptance criteria
An explicitly promoted stable model can be rolled out to production through one documented/automated operation without manually editing the model manifest environment per release.
Candidate publication without stable promotion cannot trigger production rollout.
The rollout recreates/restarts the service as needed and verifies the exact intended model_version after startup.
Manifest/artifact checksum and load verification remain fail-closed.
Depends on: #8
Related: #9, OWBastion/owbastion.com#80
Background
Production OCRKit already resolves its model through the stable release channel, but a newly promoted model is not loaded until the production container is recreated. The current operational path therefore has a manual last mile: publish/promote a verified model, access the host, recreate OCRKit, then manually confirm which model actually loaded.
This makes it easy for production to remain on an older model even when newer verified artifacts already exist.
Goal
Provide one controlled production rollout operation for an already-promoted stable model that recreates/restarts OCRKit as required, verifies that the intended immutable manifest/model is loaded, runs a representative recognition smoke check, and leaves a clear rollback path.
Do not implement in-process hot model swapping unless repository evidence shows it is necessary. A controlled container recreate/restart is acceptable and preferred when it preserves the current simple runtime model.
Target flow
Candidate publication alone must never trigger production rollout.
Rollout boundary
The implementation should reuse the existing deployment topology and secrets rather than introducing a new deployment control plane. Determine the safest mechanism from the current repository/deployment reality (for example existing CI/CD, an approved remote deployment action, or host-side deployment tooling).
Requirements:
OCRKIT_MODEL_MANIFEST_KEYfor normal releases;Verification
A deployment/recreate or HTTP 200 is not sufficient evidence.
The rollout must verify at minimum:
model_versionmatches the intended promoted target;Prefer reusing #9 compatibility/evaluation tooling rather than implementing a separate recognition test stack.
Failure behavior
If restart, model download, checksum verification, load verification, health verification, or recognition smoke fails:
Do not silently fall back to an arbitrary model while reporting success.
Rollback
Rollback should be operationally equivalent to:
It must not require retraining or republishing the old artifact.
Evidence and platform coordination
This issue owns OCRKit model rollout mechanics and OCR service verification only. Full submission/mastery/title production verification remains in
OWBastion/owbastion.com#80and must use sanitized traceable evidence after the relevant Bastion/OCR compatibility is released.Do not treat this issue's successful model smoke test as proof that the whole platform business path works.
Acceptance criteria
model_versionafter startup.Non-goals