braid
GH-42 · Add OAuth login
ARArjun Rao

Add OAuth login

GH-42
surfaced · 3 threads woven
◆ braid claim GH-423 threads dispatched from here, disjoint scopes
thread_afailed
Backendsrc/auth/
Intent — replay-safe token exchange under concurrent logins
agent_start · Claude Code
edit + go test ×9
2 attempts rejected
verify failed · 12/14
thread_bpassed
Frontendweb/login/
Intent — sign-in page that starts OAuth + handles callback
agent_start · Codex
build login page
kept: rendered sign-in
verify passed · e2e
thread_cpassed
Teststest/oauth/
Intent — cover valid / expired / replayed / malformed codes
agent_start · Claude Code
table-driven tests
kept: exchange + errors
verify passed · 14/14
Promote → octopus-merge b + c
thread_a woven in as evidence (not merged) · sign · decision record

Add OAuth login

GH-42
Braid state
surfaced3 threadspromotion ready
Execution
4agents636ktokens$7.03cost18mwall-clock
thread / agents
0 3m 6m 9m 12m 15m 18m
tokens · cost
thread_afailed
Backend src/auth/
2 agentsCCCC
Claude Code · refresh-token rotation
Claude Code · single-token reuse
347k $4.57
142k + 205k
thread_bpassed
Frontend web/login/
1 agentCx
Codex · login page · redirect flow
168k $1.34
1 agent
thread_cpassed
Tests test/oauth/
1 agentCC
Claude Code · table-driven tests
121k $1.12
1 agent

Timeline shows agent wall-clock by thread; the right column keeps tokens and cost visible.

Claude Code Codex verify dropped approach
Converged at 16m
octopus-merge b + c · $7.03 total · thread_a retained as evidence

Add OAuth login

GH-42

Work intent

local draft
Set out to do
Ship OAuth redirect/callback and prove token exchange stays replay-safe.
Agents did
Ran backend, frontend, and test threads; kept the failed backend attempt as evidence.
Why
Popup auth and optimistic token reuse failed; redirect flow and table tests survived.

Promote the verified candidate?

Gate statusAll gates clear · 5/52 workstreams passed · 0 violations.
Will not shipthread_a backend exchangeFailed 12 of 14 tests · evidence only.
Follow-upGH-49 · durable token storeResolve before the backend exchange ships.

Choose a disposition.

Add OAuth login

GH-42

The diff, traced back to the braid. Every hunk shows which thread wrote it and whether that thread's verdict held — so you read what changed and why it survived in one place.

src/auth/token.goevidence · not mergedthread_a — 2 attempts rejected, verify failed
- func Exchange(code string) (*Token, error) {- t := refreshInMemory(code) // race under concurrent logins- return t, nil- }
web/login/LoginPage.tsxmergedthread_b — kept, e2e passed
+ export function LoginPage() {+ return <SignInButton onSuccess={handleCallback} />+ }
test/oauth/exchange_test.gomergedthread_c — 14/14
+ func TestExchange_ReplaySafe(t *testing.T) {+ // table-driven: valid, expired, replayed, malformed+ }
main · braidkit/Prototype

Judgment queue

3 judgments need attention · $11.83 recorded cost
!
Replay-safe token storeGH-49needs humanstale 1d
Reconfirm GH-49 before work starts?
The goal is one day old and no scopes have been dispatched.
RecommendedReconfirm the goal and proposed scope.If deferredGH-42's replay-safety follow-up remains unresolved.
Add OAuth loginGH-42surfaced · ready to promoteall gates clear
Promote GH-42 with thread_a kept as evidence?
Three threads are terminal: two passed and one rejected approach remains useful evidence.
RecommendedPromote the braid and preserve thread_a.If deferredThe verified candidate remains surfaced but unsealed.
cachingGH-51active · 1 running$4.80 open spend
Continue GH-51 after 48s without an event?
thread_b is running, thread_c is queued, and the braid has $4.80 in open spend.
RecommendedInspect activity before allowing more spend.If deferredCost may continue while consent remains ambiguous.

Scratch

Unsigned local work waiting to attach into a braid.

3 sessions · explicit attach
local · unsigned

Scratch to attach

3
CSV export work
src/reports · web/reports · test/reports — grouped by repo and adjacent work.
3 selectedchoose target braid before signing · no auto-attach

All braids

Full braid inventory across active, surfaced, promoted, and dropped lifecycle states. Scratch lives separately until attached.

4 braids · 1 ready
main · braidkit/Prototype
sorted by last activity
Issue
Lifecycle
Threads
Gate
Activity
caching GH-51
src/cache · invalidation thread running, tests queued
active3 of 5
3 threads
1 passed · 1 running · 1 queued
blockedterminal boundary open
48s ago
382k · $4.80 open spend
Add OAuth login GH-42
web/login · callback flow · failed backend evidence retained
surfaced4 of 5
3 threads
2 passed · 1 evidence
readyall promote gates clear
18m ago
636k · $7.03
Replay-safe token store GH-49
follow-up discovered from GH-42 thread_a
claimed1 of 5
0 threads
dispatch not started
reconfirmgoal pending
1d ago
4 events · $0.00
rate limits GH-38
src/ratelimit · middleware · tests merged with decision record
3 threads
3 passed · merged
sealedrecord verified
3d ago
376k · $3.81