fix: self-heal user identity hash drift - #1
njf-strike wants to merge 2 commits into
Conversation
njf-strike
left a comment
There was a problem hiding this comment.
Ownership decision from the Core AI sandbox recovery path:
LN-Zap/obotowns the Obot code patch.- This PR should merge before publishing a fork image.
- The fork image tag shape should be
sandbox-<commit-sha>. zap-aiowns live contract/evidence checks for the sandbox behavior.zap-infrastructureshould consume the published fork image as theOBOT_BASE_IMAGEfor the finalobot-oss-okta-providerimage, not rebuild Obot source itself.
This keeps the patch owned and reviewable here, while leaving image assembly and environment pinning in the existing infra/GitOps pipeline.
njf-strike
left a comment
There was a problem hiding this comment.
Release gate decision: keep this PR as the fork-code review. After it merges, publish the fork image from the merged commit with tag shape sandbox-<commit-sha>. zap-infrastructure then consumes that image as the base for the final provider image.
|
Closing this public linked-fork PR as superseded. The active path is now the private detached repo PR: LN-Zap/obot-core-ai#1. The release image should come from ghcr.io/ln-zap/obot-core-ai:sandbox-, then zap-infrastructure layers the Okta provider assets and publishes the final deployable image. No merge or image publication should happen from this public fork path. |
Summary
This carries the Obot user-hash self-heal patch in the LN-Zap owned fork instead of relying on upstream Obot to accept or release it.
The patch repairs stale user hash fields during normal identity reconciliation. If an existing user row belongs to the provider identity but has a stale
hashed_usernameorhashed_email,ensureIdentityupdates those deterministic hash fields inside the existing transaction.UpdateUseralso keepshashed_usernamesynchronized whenusernamechanges.This draft also adds a fork-owned sandbox image workflow so, after merge, we can publish
ghcr.io/ln-zap/obot:sandbox-<commit-sha>without depending on the inherited branch-name image tags.Why We Own This Patch
The Core AI sandbox recovery path needs this behavior on our timeline. The upstream PR and issue were closed intentionally as not planned for this effort; this fork is the controlled patch surface for the image we deploy.
What Changed
HashedUsernameandHashedEmailfor existing users duringensureIdentity.HashedUsernamewhenUpdateUserchangesUsername.hashed_username.sandbox-<commit-sha>shape.Validation
All commands pass locally. Commits
b2d9a87eandac7b842fare signed.Integration Note
This PR should stay draft until we explicitly decide to merge and publish the fork image. After merge, the resulting
maincommit becomes the source forghcr.io/ln-zap/obot:sandbox-<commit-sha>.The hosted Core AI sandbox image still needs a zap-infrastructure follow-up that consumes that fork image as its Obot base and layers the Okta provider guard on top. Until that image path changes, the deployed provider guard is active but the Obot binary self-heal is not yet in the running image.