Fix stale timeout message and deduplicate duration parsing#1
Open
TadiMadz wants to merge 1 commit into
Open
Conversation
CodexEmbeddedAuth: the device-code timeout error message hardcoded "15 minutes" instead of deriving the value from maxDeviceCodeWaitSeconds. If the constant were ever changed the message would silently lie. GooseAppModel: the environment-variable + CLI-flag parsing pattern for capture durations was copy-pasted four times. Extract it into a private nonisolated static helper (durationFromEnvironment) so the logic lives in one place and each call site reads as self-documenting data.
|
+1 works for me |
goamorim
added a commit
to goamorim/goose
that referenced
this pull request
Jun 3, 2026
tigercraft4
referenced
this pull request
in tigercraft4/goose
Jun 5, 2026
8 tasks
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
Two small maintainability fixes, no behaviour changes.
1.
CodexEmbeddedAuth.swift— timeout message now derived from its constantThe error thrown when device-code login times out hardcoded the string
"15 minutes"rather than reading frommaxDeviceCodeWaitSeconds. If the constant were ever bumped the message would silently show the wrong value.Before:
After:
2.
GooseAppModel.swift— deduplicate env-var / CLI-flag duration parsingThe same
ProcessInfolookup pattern (check env var → check CLI flag → return default) was copy-pasted verbatim four times for the four auto-start capture durations. A fix or edge case would have to be applied to all four independently.Extracted into a
private nonisolated static func durationFromEnvironment(envVar:cliPrefix:fallback:). Each call site is now a single self-documenting expression. Behaviour is identical.Test plan
maxDeviceCodeWaitSecondsis changed