Follow-up from the codex/pg-authz-repo PR review. Current PR is no longer blocked for merge; this issue tracks the remaining P2/P3 quality work that can be handled after merge or before final release.
Context
The correctness blockers have been addressed: PG awaken binding schema/repo, thread/run grant schema, storage-first awaken binding writes, authz reload fallback behavior, and PG/testcontainer coverage are now aligned.
Remaining work is about reload performance, contract clarity, parity coverage, and merge hygiene.
Follow-ups
Acceptance criteria
- Authz reload can rebuild scope ancestry without hydrating labels/attrs/assignees/nested workflow data on SQL backends.
- SQLite and PG contract tests cover awaken binding delete/count semantics.
- The fallback behavior for unsupported awaken binding backends is documented or made robust to partial implementations.
- Changed-file Unicode control/bidi scanning is reproducible and documented or enforced.
Follow-up from the
codex/pg-authz-repoPR review. Current PR is no longer blocked for merge; this issue tracks the remaining P2/P3 quality work that can be handled after merge or before final release.Context
The correctness blockers have been addressed: PG awaken binding schema/repo, thread/run grant schema, storage-first awaken binding writes, authz reload fallback behavior, and PG/testcontainer coverage are now aligned.
Remaining work is about reload performance, contract clarity, parity coverage, and merge hygiene.
Follow-ups
Add a lightweight authz scope-link loader.
authz_sync::collect_storage_scope_linkscurrently rebuilds scope links through generic list/search repo APIs such assearch_documents(&DocFilter::default()),list_tasks(&TaskFilter::default()),list_projects,list_collections,list_cycles, andlist_agent_defs.(child_scope, parent_scope)IDs.Add explicit
AwakenBindingRepodelete/count contract tests for SQLite and PG.delete_awaken_thread_binding(thread_id)removes only that thread binding andget_awaken_thread_binding_optreturnsNoneafterward.delete_awaken_run_binding(run_id)removes only that run binding.delete_awaken_run_bindings_for_thread(thread_id)returns the correct count and does not affect runs on other threads.Clarify/guard the
AwakenBindingRepounsupported fallback contract.StoreError::Unsupportedfor the whole family.authz_syncfallback handling explicitly per-family/per-method so a future partial backend cannot merge storage links with stale SQLite fallback links.Add or document a raw-diff Unicode control/bidi scan before merge.
Acceptance criteria