Skip to content

goto-instrument: add early output file validation#8784

Open
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-2593-goto-instrument-args
Open

goto-instrument: add early output file validation#8784
tautschnig wants to merge 1 commit intodiffblue:developfrom
tautschnig:fix-2593-goto-instrument-args

Conversation

@tautschnig
Copy link
Copy Markdown
Collaborator

Validate output file presence before expensive analysis operations to prevent wasted computation when command is malformed.

Fixes: #2593

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig force-pushed the fix-2593-goto-instrument-args branch from 6166876 to a8315e7 Compare December 2, 2025 11:39
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 2, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.00%. Comparing base (b191cc1) to head (53fc818).

Files with missing lines Patch % Lines
.../goto-instrument/goto_instrument_parse_options.cpp 66.66% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8784      +/-   ##
===========================================
- Coverage    80.01%   80.00%   -0.01%     
===========================================
  Files         1700     1700              
  Lines       188345   188354       +9     
  Branches        73       73              
===========================================
+ Hits        150696   150699       +3     
- Misses       37649    37655       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tautschnig tautschnig marked this pull request as ready for review December 2, 2025 16:09
Copilot AI review requested due to automatic review settings March 10, 2026 13:37
@tautschnig tautschnig force-pushed the fix-2593-goto-instrument-args branch from a8315e7 to 959d16d Compare March 10, 2026 13:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an early validation step in goto-instrument to ensure an output file is provided for operations that mutate the model, avoiding wasted work when the command line is malformed.

Changes:

  • Introduces a pre-check for missing output filename before running expensive analysis.
  • Whitelists “read-only” operations that don’t require an output file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/goto-instrument/goto_instrument_parse_options.cpp Outdated
Comment thread src/goto-instrument/goto_instrument_parse_options.cpp Outdated
Comment thread src/goto-instrument/goto_instrument_parse_options.cpp Outdated
Validate output file presence before expensive analysis operations to
prevent wasted computation when command is malformed.

Fixes: diffblue#2593
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.

goto-instrument behaviour when not given an output file name

3 participants