mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Global secrets used COALESCE(repo_id, 0), the same key as the Assistant repo (id 0), so same-named values overwrote each other. A new migration rebuilds idx_secrets_scope with a -1 sentinel shared with the upsert target, so databases that already applied the secrets migration upgrade cleanly. Repo env resolution now requires an exact registered git root, so an unregistered nested repository no longer receives its ancestor's secrets.
8 lines
370 B
TypeScript
8 lines
370 B
TypeScript
/**
|
|
* Repo scope stored in place of a NULL `repo_id` for global secrets, so the unique scope index
|
|
* and its conflict target treat every global entry as one scope while repository scopes keep
|
|
* their own. Real repo ids are `0` (the Assistant repository) or positive, so a negative
|
|
* sentinel can never collide with one.
|
|
*/
|
|
export const GLOBAL_SECRETS_SCOPE_ID = -1
|