Repository navigation
refactor: organize runtime session records and lifecycle owners - #37070
Merged
nwparker merged 1 commit intoNov 1, 2026
Merged
Conversation
nwparker
force-pushed
the
module-organization/pr75-pr78-runtime-session-m1ad332d8
branch
from
November 1, 2026 16:23
9ac9ee8 to
10444df
Compare
nwparker
added a commit
that referenced
this pull request
Nov 2, 2026
…fines them v1.4.246 is the first release cut after #36909, #36979, #37036 and #37070 moved the agent-session modules, so suites that imported the old paths from the newest release failed with ERR_MODULE_NOT_FOUND for every PR running cross-version wire. importReleaseCheckoutModule now resolves a moved module to the path the checked-out release ships, from one table of current and earlier locations, so both the rolling baseline and older pinned refs load. The released-chat writers drop their own per-module existsSync fallbacks for it. v1.4.246 also ships outcome storage, so it reads chats this build writes and closes its own rows with the outcomes marker. The downgrade test pins its refusing window to the two releases before outcome storage, and the upgrade test leaves the marker to the outcome reader, which restoreJournal checks.
nwparker
added a commit
that referenced
this pull request
Nov 2, 2026
…fines them (#37297) * test(cross-version): load moved modules from wherever each release defines them v1.4.246 is the first release cut after #36909, #36979, #37036 and #37070 moved the agent-session modules, so suites that imported the old paths from the newest release failed with ERR_MODULE_NOT_FOUND for every PR running cross-version wire. importReleaseCheckoutModule now resolves a moved module to the path the checked-out release ships, from one table of current and earlier locations, so both the rolling baseline and older pinned refs load. The released-chat writers drop their own per-module existsSync fallbacks for it. v1.4.246 also ships outcome storage, so it reads chats this build writes and closes its own rows with the outcomes marker. The downgrade test pins its refusing window to the two releases before outcome storage, and the upgrade test leaves the marker to the outcome reader, which restoreJournal checks. * test(cross-version): find a moved module by name in the release instead of a path table A table of earlier paths is a list of stale src literals the path-literal ratchet rightly refuses, and needs an entry for every future move. The release checkout itself says where it ships each module: the one file with that name under the same source root. Prunes the three released-chat-writers entries the ratchet baseline grandfathered. * test(cross-version): pin the chat-upgrade writers to the releases before outcome storage v1.4.246 keeps a chat in outcome tables, so its rows hold only the marker and there is no row upgrade to carry on; the newest release stays the reader this build must match.
audichuang
pushed a commit
to audichuang/orca
that referenced
this pull request
Nov 2, 2026
…fines them (stablyai#37297) * test(cross-version): load moved modules from wherever each release defines them v1.4.246 is the first release cut after stablyai#36909, stablyai#36979, stablyai#37036 and stablyai#37070 moved the agent-session modules, so suites that imported the old paths from the newest release failed with ERR_MODULE_NOT_FOUND for every PR running cross-version wire. importReleaseCheckoutModule now resolves a moved module to the path the checked-out release ships, from one table of current and earlier locations, so both the rolling baseline and older pinned refs load. The released-chat writers drop their own per-module existsSync fallbacks for it. v1.4.246 also ships outcome storage, so it reads chats this build writes and closes its own rows with the outcomes marker. The downgrade test pins its refusing window to the two releases before outcome storage, and the upgrade test leaves the marker to the outcome reader, which restoreJournal checks. * test(cross-version): find a moved module by name in the release instead of a path table A table of earlier paths is a list of stale src literals the path-literal ratchet rightly refuses, and needs an entry for every future move. The release checkout itself says where it ships each module: the one file with that name under the same source root. Prunes the three released-chat-writers entries the ratchet baseline grandfathered. * test(cross-version): pin the chat-upgrade writers to the releases before outcome storage v1.4.246 keeps a chat in outcome tables, so its rows hold only the marker and there is no row upgrade to carry on; the newest release stays the reader this build must match. (cherry picked from commit bdd997f)
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.
ELI5
Groups runtime session code into folders so records, dispatch, and lifecycle owners are easier to find. App behavior stays the same.
What Changed
Combines two related batches: 85 file moves (36 production and 49 tests/support), 13 imports redirected to concrete defining owners, and two forwarding exports removed. Updates callers, finite mock keys, test-runner paths, CI selectors, and one embedded esbuild import.
Preserves existing timing values, earlier test-baseline entries, and six historical module paths used against fixed releases. Existing flat CI selectors remain where unmoved files need them.
Why
Keeps session records and lifecycle code with their owners in one coherent refactor. Direct imports avoid barrels and forwarding shims.
Linked Issue
N/A — internal repository organization work; no existing linked issue.
Visual Proof
N/A — module organization and path maintenance only; no visual or interaction change.
Testing
On macOS: 66 focused files / 616 tests passed: 55 runtime files / 477 tests, four released-version compatibility files / 44 tests, six metadata files / 94 tests, and one plain-Node notification fixture / one test. The two affected PR-selection files were rerun after preserving the unmoved-test selector.
Node typecheck, real React Doctor, final changed-code quality, path-literal ratchet, test-runner classification, and normal commit hooks passed. Whole-tree comparisons verify mobile/workflow/cross-version test selection remains unchanged.
Review
Two independent source audits passed: current bodies, defining-owner imports and evaluation, mocks, literals, historical loaders, metadata values, and all refactor residue. Current-main preservation and the unchanged live refactor merge gate are required before merge.
Agent skill upstream boundary
Notes
No runtime API, wire format, platform process behavior, or remote compatibility changes. Folder-workspace and mobile behavior remain unchanged. Tests ran with background launch policy enabled; no desktop UI was presented.
Checklist