Repository navigation
refactor(session): split the 2,500-line session by what a job is about - #61
Merged
Merged
Conversation
session.c keeps the worker and the queue; the jobs move to session_auth, session_view, session_read, session_people, session_lists and session_write, sharing session_internal.h, and the no-network stand-in becomes session_stub. No behaviour change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
src/atproto/session.cwas 2,567 lines: the worker, 27 job runners, theirsubmit_calls, the result accessors, and a second copy of the whole interface as a no-network stand-in. It is nowsession.c(256 lines: the thread, the lock, the event hand-off, the queue), with the jobs split by what they are about:session_auth.c,session_view.c(Wolfram views to Indigo's post, actor and notification types),session_read.c,session_people.c,session_lists.candsession_write.c, sharingsession_internal.h. The thirty file-scope statics are oneg_sessionblock, and the stand-in issession_stub.c. Bodies moved verbatim apart from those renames andindigo_session_prefixes on what crosses files. Part of the atomic-files rule;app.candlayout.care next. Part of #53.Verification
The 3DS build (devkitARM, against a Wolfram v0.34.0 build) links with no warnings, and every file also compiles on the host in strict mode with no 3DS (empty for the real ones, the stand-in for
session_stub.c).make testpasses (4019 checks, 0 failures). The host tests do not compile the real session, so the 3DS build and CI are the check; nothing ran on Azahar or a 3DS, where the worker thread is what could regress.Docs
AGENTS.md names the new files.
Changelog: none — an internal reorganisation with no change a player sees.
Checklist
CI gateandflow / conventions)🤖 Generated with Claude Code