Skip to content

Website: serve defaults skip optimize/audit in dev#90

Merged
PrzemyslawKlys merged 1 commit intomasterfrom
codex/serve-default-skip-heavy
Feb 8, 2026
Merged

Website: serve defaults skip optimize/audit in dev#90
PrzemyslawKlys merged 1 commit intomasterfrom
codex/serve-default-skip-heavy

Conversation

@PrzemyslawKlys
Copy link
Member

Default -Serve (dev mode) now skips optimize/audit unless user explicitly passes -Only or -Skip. This makes local iteration much faster on large sites.

Copilot AI review requested due to automatic review settings February 8, 2026 09:23
@claude
Copy link

claude bot commented Feb 8, 2026

Claude finished @PrzemyslawKlys's task —— View job


Code Review Complete ✅

Reviewed PR #90: Website: serve defaults skip optimize/audit in dev

Todo List:

  • Read the modified Website/build.ps1 file
  • Analyze PowerShell script for code quality and best practices
  • Check for potential bugs or logic issues
  • Evaluate performance considerations
  • Review for security concerns
  • Assess test coverage needs
  • Provide comprehensive feedback

Review Feedback

Code Quality & Best Practices

The changes look well-implemented with good PowerShell practices:

  • Clear documentation: The updated .SYNOPSIS and .PARAMETER docs clearly explain the new behavior (Website/build.ps1:8-9)
  • Logical parameter handling: The logic at lines 139-141 properly checks conditions before applying the default skip behavior
  • Consistent style: Follows existing code patterns and variable naming conventions

Logic & Implementation

The core change is sound and addresses the stated goal effectively:

# Lines 139-141: Smart defaults for dev mode
if ($Serve -and $UseDev -and $Only.Count -eq 0 -and $Skip.Count -eq 0) {
    $Skip = @('optimize', 'audit')
}

Strengths:

  • Only applies when all conditions are met (serve + dev + no explicit overrides)
  • Preserves user control via -Only or -Skip parameters
  • Clear intent with helpful comments

Performance Considerations

This change directly addresses performance concerns:

  • Positive impact: Skipping optimize and audit steps will significantly speed up local development iterations
  • Smart defaults: Only applies in development mode, leaving production builds unaffected
  • User override capability: Developers can still run full builds when needed

Security Concerns

No security issues identified:

  • Changes only affect build performance, not security-sensitive operations
  • No new external dependencies or file system operations introduced
  • Existing input validation and error handling remain intact

⚠️ Minor Considerations

  1. Documentation clarity: Consider adding an example to the help text showing how to override the new defaults:

    # Example: Full build in serve mode
    ./build.ps1 -Serve -NoDev
    # or
    ./build.ps1 -Serve -Only build,optimize,audit,verify
  2. Potential confusion: Some users might be surprised that -Serve now behaves differently. The documentation addresses this, but consider mentioning in release notes.

Test Coverage

While this is a build script change:

  • Low risk: The logic is straightforward conditional parameter setting
  • Self-contained: Changes are isolated to the parameter processing section
  • Manual verification: The change can be easily tested by running the script with various parameter combinations

Overall Assessment

✅ Approve - This is a well-thought-out improvement that:

  • Solves a real developer experience problem
  • Maintains backward compatibility through user overrides
  • Follows good PowerShell practices
  • Has clear documentation
  • Poses minimal risk

The change effectively balances development speed with user control, making local iteration much faster while preserving the ability to run full builds when needed.


Copy link

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 adjusts the website build/serve wrapper (Website/build.ps1) so local -Serve runs in dev mode skip the heaviest pipeline steps by default, improving iteration speed unless the user explicitly provides -Only/-Skip.

Changes:

  • Document that -Serve (dev default) skips heavy pipeline steps unless -Only/-Skip is provided.
  • Add logic to auto-populate -Skip when serving in dev mode with no explicit task filters.


.PARAMETER Serve
Build the full pipeline and start the development server.
When `-Serve` uses dev mode (default), it will also skip the heaviest steps (`optimize`,`audit`)
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

audit doesn’t appear to be a pipeline task in Website/pipeline.json (there is an optimize task and a doctor task). The help text here should reference the actual task name(s) being skipped (likely doctor instead of audit) so users aren’t misled.

Suggested change
When `-Serve` uses dev mode (default), it will also skip the heaviest steps (`optimize`,`audit`)
When `-Serve` uses dev mode (default), it will also skip the heaviest steps (`optimize`,`doctor`)

Copilot uses AI. Check for mistakes.
# Keep local serve iterations fast by default.
# Users can override this by explicitly passing -Only or -Skip, or by disabling dev mode (-NoDev).
if ($Serve -and $UseDev -and $Only.Count -eq 0 -and $Skip.Count -eq 0) {
$Skip = @('optimize', 'audit')
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

The default skip list includes 'audit', but Website/pipeline.json has no audit task/step. As a result this won’t skip the intended “heavy” validation step; consider changing this to skip the correct task (e.g., doctor) or updating the pipeline config to match.

Suggested change
$Skip = @('optimize', 'audit')
$Skip = @('optimize', 'doctor')

Copilot uses AI. Check for mistakes.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e75cf80e6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# Keep local serve iterations fast by default.
# Users can override this by explicitly passing -Only or -Skip, or by disabling dev mode (-NoDev).
if ($Serve -and $UseDev -and $Only.Count -eq 0 -and $Skip.Count -eq 0) {
$Skip = @('optimize', 'audit')

Choose a reason for hiding this comment

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

P2 Badge Skip the existing doctor step instead of nonexistent audit

The new default skip list uses audit, but this pipeline only defines optimize and doctor as the heavy tail steps (Website/pipeline.json, task doctor-site), so a plain ./build.ps1 -Serve still runs doctor. That means the change does not actually deliver the intended faster local serve loop and can still trigger expensive rendered checks in dev mode unless users add their own -Skip.

Useful? React with 👍 / 👎.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 8, 2026

@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.74%. Comparing base (ffe9086) to head (e75cf80).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
- Coverage   59.76%   59.74%   -0.02%     
==========================================
  Files         448      448              
  Lines       57814    57814              
  Branches    16563    16563              
==========================================
- Hits        34551    34542       -9     
- Misses      17563    17566       +3     
- Partials     5700     5706       +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.

@PrzemyslawKlys PrzemyslawKlys merged commit 2d6890b into master Feb 8, 2026
19 checks passed
@PrzemyslawKlys PrzemyslawKlys deleted the codex/serve-default-skip-heavy branch February 8, 2026 09:48
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