Skip to content

Conversation

@boneskull
Copy link
Owner

  • Remove validate command implementation and tests
  • Remove command registration from CLI
  • Remove ValidateCommandArgs interface
  • Update documentation (README.md and ARCHITECTURE.md)

Internal validation methods (engine.validate, loader.validate, config.validate)
remain intact for use by other commands like run.

Copilot AI review requested due to automatic review settings October 19, 2025 06:49
@boneskull boneskull force-pushed the feature/remove-validate-command branch from 1b3d607 to 4adce12 Compare October 19, 2025 06:49
Copy link
Contributor

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

This PR refactors the codebase by removing the standalone validate command from the CLI interface while preserving internal validation functionality for use by other commands like run. The change simplifies the CLI surface area by eliminating a redundant command that duplicated validation logic already present in the execution flow.

Key changes:

  • Removed the validate command implementation and associated test suite
  • Cleaned up CLI command registration and type definitions
  • Updated documentation to reflect the removed command

Reviewed Changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/contract/validate-command.test.ts Removed comprehensive test suite for the validate command
src/types/cli.ts Removed ValidateCommandArgs interface definition
src/cli/index.ts Removed validate command registration and import
src/cli/commands/validate.ts Removed entire validate command implementation (~683 lines)
README.md Removed validation command documentation section
ARCHITECTURE.md Removed validation command from removal candidates section

@boneskull boneskull force-pushed the feature/remove-validate-command branch from 4adce12 to b1fd1af Compare October 19, 2025 08:16
Copilot AI review requested due to automatic review settings October 19, 2025 08:20
@boneskull boneskull force-pushed the feature/remove-validate-command branch from b1fd1af to ddc4538 Compare October 19, 2025 08:20
Copy link
Contributor

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@boneskull boneskull force-pushed the feature/remove-validate-command branch from ddc4538 to 02b8b0e Compare October 19, 2025 20:14
Copilot AI review requested due to automatic review settings October 19, 2025 20:22
@boneskull boneskull force-pushed the feature/remove-validate-command branch from 02b8b0e to 1ef4dc4 Compare October 19, 2025 20:22
Copy link
Contributor

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@boneskull boneskull force-pushed the feature/remove-validate-command branch from 1ef4dc4 to 90356d9 Compare October 19, 2025 20:37
Copilot AI review requested due to automatic review settings October 19, 2025 20:44
@boneskull boneskull force-pushed the feature/remove-validate-command branch from 90356d9 to 620e93f Compare October 19, 2025 20:44
Copy link
Contributor

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@boneskull boneskull force-pushed the feature/remove-validate-command branch from 620e93f to 1a5c916 Compare October 19, 2025 21:33
Copilot AI review requested due to automatic review settings October 19, 2025 21:47
@boneskull boneskull force-pushed the feature/remove-validate-command branch from 1a5c916 to 3d611b8 Compare October 19, 2025 21:47
Copy link
Contributor

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

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

// (though we can't be too strict due to warmup, process startup, etc)
expect(duration1, 'to be less than', duration2);
// Allow for 50% variance to account for system overhead and variability
expect(duration1, 'to be less than', duration2 * 1.5);
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

[nitpick] The magic number 1.5 should be extracted as a named constant like TIMING_VARIANCE_TOLERANCE to improve code readability and maintainability.

Copilot uses AI. Check for mistakes.
readonly exclude: string[];
/** Default number of iterations per task */
readonly iterations: number;
/** How to limit benchmark execution: 'time', 'iterations', 'any', or 'all' */
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

[nitpick] The union type values are reordered alphabetically which is good, but the comment should also reflect this order for consistency: 'all', 'any', 'iterations', or 'time'.

Suggested change
/** How to limit benchmark execution: 'time', 'iterations', 'any', or 'all' */
/** How to limit benchmark execution: 'all', 'any', 'iterations', or 'time' */

Copilot uses AI. Check for mistakes.
readonly i?: number;
/** Number of iterations */
readonly iterations?: number;
/** How to limit benchmark execution */
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

[nitpick] The comment is less descriptive than the corresponding comment in core.ts. For consistency, it should include the specific options: 'How to limit benchmark execution: 'all', 'any', 'iterations', or 'time''.

Suggested change
/** How to limit benchmark execution */
/** How to limit benchmark execution: 'all', 'any', 'iterations', or 'time' */

Copilot uses AI. Check for mistakes.
Comment on lines 708 to 712
// Both must be met - tinybench default behavior
effectiveTime = Math.min(config.time || 1000, 2000);
effectiveIterations = 1; // Minimal iterations so time is the limiting factor
break;

case 'iterations':
// Iterations is the limit, use minimal time
effectiveTime = 1;
effectiveIterations = config.iterations;
break;
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

[nitpick] The magic numbers 1000 and 2000 should be extracted as named constants like DEFAULT_TIME_MS and MAX_TIME_MS to improve code maintainability and make the logic clearer.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings October 19, 2025 22:08
@boneskull boneskull force-pushed the feature/remove-validate-command branch from 5c137e0 to 27bfd5d Compare October 19, 2025 22:08
Copy link
Contributor

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

}

// Always write to stdout when no output path is specified
// The quiet flag only affects progress messages (stderr), not data output
Copy link

Copilot AI Oct 19, 2025

Choose a reason for hiding this comment

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

The comment should clarify that this behavior only applies when no output path is specified, since the function name and context suggest this is specifically for stdout output.

Suggested change
// The quiet flag only affects progress messages (stderr), not data output
// When no output path is specified (i.e., writing to stdout), the quiet flag only affects progress messages (stderr), not CSV data output

Copilot uses AI. Check for mistakes.
- Remove validate command implementation and tests
- Remove command registration from CLI
- Remove ValidateCommandArgs interface
- Update documentation (README.md and ARCHITECTURE.md)

Internal validation methods (engine.validate, loader.validate, config.validate)
remain intact for use by other commands like run.

# Conflicts:
#	README.md
# Conflicts:
#	test/integration/quiet-mode.test.ts
@boneskull boneskull force-pushed the feature/remove-validate-command branch from 27bfd5d to d183d30 Compare October 19, 2025 22:08
@boneskull boneskull merged commit 5960b1b into main Oct 19, 2025
6 checks passed
@boneskull boneskull deleted the feature/remove-validate-command branch October 20, 2025 18:38
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.

2 participants