Use idiomatic Effect services for orchestration and open launching#2583
Closed
cursor[bot] wants to merge 4 commits intomainfrom
Closed
Use idiomatic Effect services for orchestration and open launching#2583cursor[bot] wants to merge 4 commits intomainfrom
cursor[bot] wants to merge 4 commits intomainfrom
Conversation
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
328bf03 to
2e8b874
Compare
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 Changed
DateTime.now/DateTime.formatIsofor orchestration-generated timestamps.Random.nextUUIDv4for orchestration event IDs instead ofcrypto.randomUUID().ChildProcessSpawnerinstead of nativenode:child_process.spawn.TestClock, deterministicRandom.Random, and a mocked child process spawner.Why
This keeps orchestration timestamps and IDs testable through Effect services, and makes detached editor launching mockable without running real child processes in unit tests.
UI Changes
None.
Checklist
Verification:
bun fmtbun lintbun typecheckbun run test src/open.test.ts src/orchestration/decider.clock.test.tsbun run test src/orchestration/decider.clock.test.tsNote
Use Effect services for time, UUID generation, and process spawning in orchestration and open launching
new Date().toISOString()andcrypto.randomUUID()in decider.ts with EffectDateTimeandRandom.nextUUIDv4, making timestamps and event IDs controllable via Effect layers in tests.launchDetachedin open.ts to use the EffectChildProcessSpawnerservice instead of Node'schild_process.spawndirectly, with explicit stdio ignore and shell mode on Windows.openBrowsernow returnsvoidinstead of the underlying library's return value.Macroscope summarized 328bf03. (Automatic summaries will resume when PR exits draft mode or review begins).