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.
StatusReady for decisionTwo workstreams verified; the failed backend exchange remains evidence.
surfaced · ready2 passed · 0 violations
Decision neededPromote thread_b and thread_c?

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

4 judgments need attention · $58.83 recorded cost
Replay-safe token storeGH-49needs human · not startedstale 1d
Reconfirm GH-49 before work starts?
The goal is one day old and no scopes have been dispatched.
cachingGH-51active · 1 running$4.80 open spend
Continue GH-51 after 48s without an event?
thread_b is running, thread_c is pending, and the braid has $4.80 in open spend.
Dashboard reliabilityJIRA-5102surfaced · 2 unresolved~$47 recorded
Set the retry cap and resolve session-state ownership?
The note narrows 400-agent work to two decisions that still block shipping.
Add OAuth loginGH-42surfaced · readyall gates clear
Promote GH-42 with thread_a kept as evidence?
Three workstreams are terminal: two verified and one failed workstream remains evidence.

Scratch

Unsigned local work. Nothing enters braid history until you attach it.

3 sessions · local only
local · unsigned

Attachment queue

3
Review focuslocal · unsigned
Decision needed Attach these sessions as one work unit?

They share the CSV export goal and touch adjacent report scopes.

Consequence Create one draft braid

The selected sessions become signed evidence only after target confirmation.

3 selected · 2,020 events · 3 scopes

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 running, tests pending
active3 of 5
3 threads
1 verified · 1 running · 1 pending
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 verified · 1 failed 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
not started
0 dispatched workstreams
reconfirmgoal pending
1d ago
4 events · $0.00
rate limits GH-38
src/ratelimit · middleware · tests merged with decision record
3 threads
3 verified · merged
sealedrecord verified
3d ago
376k · $3.81
Dashboard reliability JIRA-5102
retry behavior · session-state conflict · 2 findings need judgment
surfaced4 of 5
400 agents
2 workstreams need close review
blocked2 unresolved decisions
6h run
18.4M tokens · about $47