Repository navigation
Check the mode before starting and shut down when run returns - #164
Merged
Merged
Conversation
An unsupported mode used to load the data and start the time, auto-save and usage reporting services before being rejected, leaving a process that never exited. The mode is now checked before the application is constructed, and start() shuts the application down once run returns (end of input, or player mode without a test world). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Self-review rubric (scored against
Observations:
The change is ready to merge on the green local and CI runs. This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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.
Summary
Interakt#mainnow picks the user with the new staticInterakt.createUser(args, out)before the application is constructed, so a missing or unsupported mode prints its message and returns without loading data, starting the time, auto-save or usage reporting services, or sending a startup event.Interakt#start(user)runsonStartup,runand thenshutdownApplication, so whenrunreturns (end of input, or player mode with notestworld) the data is saved, usage reporting is closed and the process exits instead of being kept alive by the non-daemon auto-save thread.startinstead ofmain.Notes
web/java/BrowserMain.javacallsInterakt.main(new String[] {"console"})and is unaffected apart from the shutdown at end of input. The CI smoke run ends withquit, so it never reaches that path.testworld, the new actor is added to persistent data before the world lookup fails, so the shutdown save persists that unplaced actor. The auto-save already did the same before this change; it is left alone here as out of scope.Test plan
mvn -B clean test: 206 tests run, 0 failures, 0 errors.InteraktTest: each supported mode (case-insensitive) gives the right user, an unsupported mode and a missing mode each print their message and give null, andstartruns startup, then the session, then shutdown when input ends.Interakt.javachange stashed,InteraktTestfails (compile errors on the missingcreateUser/start); with it restored, all 6 tests pass.Closes #159
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson