You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaces -output string flag with a -generate-context boolean and hardcodes the context file to vogte-context.txt. This is a breaking CLI change and reduces flexibility. Risk: medium due to backwards compatibility and potential behavior change in review/CLI modes.
Findings:
[Severity: High] main.go:~22 — Breaking flag removal (-output)
Explanation: Removing the -output flag will break existing users/scripts; passing -output now errors (“flag provided but not defined”). Previously, users could specify a custom output path for review/CLI modes. Now there’s no way to change the file name or location and existing workflows will fail.
Suggestion: Keep a deprecated -output flag that maps to the new behavior. Also add a -context-file string flag for specifying the path while -generate-context controls mode. Example patch:
if *outputPtr != "": log.Println("Warning: -output is deprecated; use -context-file and -generate-context"); contextFile = *outputPtr; contextGen = true
Use contextFile for app.New, cli.RunReview, and cli.Run
Trigger CLI mode if contextGen or output provided.
[Severity: Medium] main.go:~38 — Hardcoded output filename reduces flexibility
Explanation: The filename is now fixed to vogte-context.txt for both review and CLI runs. Users can’t select a different path/name. In review mode, this is a change from previously user-controlled output path to a fixed one, which can cause file collisions or workflow incompatibilities.
Suggestion: Introduce -context-file as above. Use a const default (const defaultContextFile = "vogte-context.txt") for clarity.
[Severity: Medium] main.go:~45 — Behavior change in review mode output path
Explanation: cli.RunReview now always writes to vogte-context.txt; previously it used the user-provided -output path. This is a silent change that may break integrations expecting output at a specific location.
Suggestion: Use the chosen contextFile (from -context-file or deprecated -output). Update docs and help text accordingly.
[Severity: Low] main.go:~31 — Mode gating semantics changed
Explanation: Previously CLI mode was gated by “user explicitly passed -output”. Now it’s gated by -generate-context. Functionally similar, but any documentation/tests relying on -output to trigger CLI mode must be updated.
Suggestion: Update tests and documentation to reflect -generate-context. If you keep -output (deprecated), also treat its presence as a trigger for CLI mode for compatibility.
[Severity: Low] main.go:~22 — Help/usage clarity
Explanation: The new flag’s help text implies an action but doesn’t indicate how to change the destination or that it triggers a mode.
Suggestion: Update to: "Generate context file. Use -context-file to specify the path (default: vogte-context.txt)."
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
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.
generate-context is more specific