Skip to content

refactor: organize runtime session records and lifecycle owners - #37070

Merged
nwparker merged 1 commit into
mainfrom
module-organization/pr75-pr78-runtime-session-m1ad332d8
Nov 1, 2026
Merged

nwparker merged 1 commit into
mainfrom
module-organization/pr75-pr78-runtime-session-m1ad332d8

Conversation

@nwparker

@nwparker nwparker commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 243 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​690 $\color{#cf222e}{\Huge{\mathbf{−}}}$​684 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6
Prod 153 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​439 $\color{#cf222e}{\Huge{\mathbf{−}}}$​415 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​24

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

  • I manually tested these changes locally
  • Existing automated tests and selectors updated for moved paths; no new behavior to test

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

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

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

  • Focused on runtime session ownership (two related batches)
  • Explained what changed and why
  • Visual proof is N/A with reason
  • Reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path impact considered
  • Focused local checks pass; applicable hosted CI must pass before merge

@nwparker
nwparker force-pushed the module-organization/pr75-pr78-runtime-session-m1ad332d8 branch from 9ac9ee8 to 10444df Compare November 1, 2026 16:23
@nwparker
nwparker merged commit a82538c into main Nov 1, 2026
79 checks passed
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant