FiCl Dev Blog한국어

[PR #211·212·213] Server Verification Fixes: Gaps and Hangs When Login and Suspension Overlap

Work completed 2026-11-12 12:19 KST · Published 2026-11-12 22:30 KST · AI model used for the work Claude Sonnet 5.5, Claude Opus 5.5

[PR #211·212·213] Server Verification Fixes: Gaps and Hangs When Login and Suspension OverlapSummary. Date and unit checks with overlapping saves, recovery slipping into a login and Apple identifier check, lock order that made requests wait on each other, and creating the session inside the user row lockPR #211·212·213Server Verification FixesWhen Login and Suspension OverlapJoin "check" and "create" with a lockI ran allthree jobsClaude builtand reviewedCodex wrote testsPR 211PR 212LocksPR 213ⅠPR 211Four in recordsand cycles1Impossible dates, unit changeImpossible dates get 400A unit changewaits for the save2Same module row lockClearing the stocking date anda record save nolonger give 500ⅡPR 212Login and social3Recovery slips into loginRe-read number, hash and statusunder the lock;refuse on change4Apple sub and link tableDifferent sub values get 401;used link rows are deletedⅢLocksWaiting oneach other5Invitation and code reissueBoth now lock user rowthen code row6Two caught by code reviewCodex flagged themissing numberre-check and a wrong refusalⅣPR 213Gap foundreviewing PR 2127Session inside the lockSuspension also cuts offthe session just created8Same DB connectionRemoves the way the pool runsout and hangs the serverKey: the place that checks the status and the placethat creates the session must sit inside one lock.FiCl Dev Blog · Post summary figure
[PR #211·212·213] Server Verification Fixes: Gaps and Hangs When Login and Suspension OverlapSummary. Date and unit checks with overlapping saves, recovery slipping into a login and Apple identifier check, lock order that made requests wait on each other, and creating the session inside the user row lockPR #211·212·213Server Verification FixesWhen Login and Suspension OverlapJoin "check" and "create" with a lockI ran allthree jobsClaude builtand reviewedCodex wrote testsPR 211PR 212LocksPR 213ⅠPR 211Four in recordsand cycles1Impossible dates, unit changeImpossible dates get 400A unit changewaits for the save2Same module row lockClearing the stocking date anda record save nolonger give 500ⅡPR 212Login and social3Recovery slips into loginRe-read number, hash and statusunder the lock;refuse on change4Apple sub and link tableDifferent sub values get 401;used link rows are deletedⅢLocksWaiting oneach other5Invitation and code reissueBoth now lock user rowthen code row6Two caught by code reviewCodex flagged themissing numberre-check and a wrong refusalⅣPR 213Gap foundreviewing PR 2127Session inside the lockSuspension also cuts offthe session just created8Same DB connectionRemoves the way the pool runsout and hangs the serverKey: the place that checks the status and the placethat creates the session must sit inside one lock.FiCl Dev Blog · Post summary figure

These three PRs fix problems from a server code review done on 2026-11-11. PR 211 fixed four problems in server part 2 (records and cycles), and PR 212 fixed six in server part 1 (login, social, invitations). PR 213 fixes one gap found while reviewing PR 212 that lay outside that PR, so I put them in one post.

All three ran on my Windows computer. For PR 211 and 212, a Claude Code session (Claude Sonnet 5.5) implemented, checked and opened the PR, and Codex (gpt-6.1-terra) wrote the tests. The implementation side did not edit the test files. For PR 213, a Claude Code session (Claude Opus 5.5) planned, implemented, checked and opened the PR, and Codex wrote the tests. Because this is login and security code, the lead session (Opus) was set to review PR 212 once more at the end, and PR 213 came out of that review.

There are no real passwords or tokens in this post. It describes only file and function names and behavior.

What could break

Choices and rejected alternatives

How it was checked

At a glance

Group What was done Key point
PR 211 Four problems with dates, units and overlapping saves Same module row lock sets the order
PR 212 Login during recovery, link table cleanup, lock order, Apple sub Re-check number and status under the lock
PR 213 Create the session inside the user row lock Suspension also cuts off the session just created

Who did what

What was not checked

What I learned