Skip to content

context instead of output#11

Merged
piqoni merged 1 commit intomainfrom
context_isntead_of_output
Oct 5, 2025
Merged

context instead of output#11
piqoni merged 1 commit intomainfrom
context_isntead_of_output

Conversation

@piqoni
Copy link
Owner

@piqoni piqoni commented Oct 5, 2025

generate-context is more specific

@github-actions
Copy link

github-actions bot commented Oct 5, 2025

∇ Vogte Code Review

Summary:

  • 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:

    • Add:
      • contextFilePtr := flag.String("context-file", "vogte-context.txt", "Context file path")
      • outputPtr := flag.String("output", "", "DEPRECATED: use -context-file and -generate-context")
      • contextGenPtr := flag.Bool("generate-context", false, "Generate context file")
    • After flag.Parse():
      • contextFile := *contextFilePtr
      • 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)."

Verdict: Needs attention


This review was automatically generated by vogte

@piqoni piqoni merged commit 9c9632a into main Oct 5, 2025
2 checks passed
@piqoni piqoni deleted the context_isntead_of_output branch October 5, 2025 15:27
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