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
{{ message }}
Repository navigation
T3 approval is process-wide state (not safe for concurrent or embedded use) #28
Status: Verified during the Pick Your AI rollout (reproduced, or read directly in the code).
Part of epic: Epic: Make co-owner (T3) sign-off auditable and safe.
Summary
PR #20 stores the approval in a module-level flag and restores it when main() returns. That fixes the leak between invocations but is still unsafe if two calls run concurrently in one process.
Evidence
config.set_t3_signed_off writes a module global read by check_owner, art_status, footer_status, doctor, topics and org planning.
An independent code review flagged threads/async embedding as unsafe. Not reproduced with a concurrent test (none exists).
Impact
A library embedder running a signed-off and an unsigned call concurrently could let the unsigned one through.
Proposed fix
Carry approval in a contextvars.ContextVar (or pass it explicitly through RepoContext).
Acceptance criteria
Two threads, one signed off and one not, behave independently.
No module-level mutable approval state remains.
Tasks
Each task below is a sub-issue.
Prior work
Prior work: open PR #20 (opt-in --allow-t3 and the Pick Your AI family), open #7 and PR #13 (variant J badges), merged PRs #14 to #19 (icon art-direction path, UTF-8 output, registry-free org health and label planning, Windows test portability, footer URL repair) and closed issues #8 to #12. Nothing here duplicates those; where an item is already handled it is linked, not refiled.
Fresh VM verification: not run. Findings were verified on a Windows host; hosted CI is separate evidence.
Activity