Skip to content

Website: dev pipeline mode + task filters#89

Merged
PrzemyslawKlys merged 1 commit intomasterfrom
codex/website-dev-mode
Feb 8, 2026
Merged

Website: dev pipeline mode + task filters#89
PrzemyslawKlys merged 1 commit intomasterfrom
codex/website-dev-mode

Conversation

@PrzemyslawKlys
Copy link
Member

Website/build.ps1: add -Dev/-NoDev, -Only, and -Skip and pass through to powerforge-web pipeline (--dev/--fast/--only/--skip).

This improves local iteration by allowing selective pipeline execution (e.g. -Dev -Skip optimize,doctor).

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

claude bot commented Feb 8, 2026

Claude finished @PrzemyslawKlys's task —— View job


PR Review: Website dev pipeline mode + task filters

Reviewing the changes to add development mode and task filtering capabilities to the website build script.

Todo List:

  • Read and analyze Website/build.ps1 changes
  • Review code quality and PowerShell best practices
  • Check for potential bugs or issues
  • Evaluate performance considerations
  • Assess security concerns
  • Check parameter validation and error handling
  • Provide comprehensive review feedback

Review Feedback

This PR adds useful development workflow features to the build script. The implementation is well-structured and follows PowerShell best practices. Here's my detailed analysis:

Strengths

Code Quality & Best Practices:

  • Excellent parameter documentation with .SYNOPSIS, .PARAMETER, and .EXAMPLE blocks
  • Proper PowerShell parameter declarations with appropriate types ([switch], [int], [string[]])
  • Good use of $ErrorActionPreference = 'Stop' for robust error handling
  • Clean separation of concerns with helper functions (Assert-SiteOutput)
  • Consistent code formatting and naming conventions

Feature Design:

  • Smart default behaviors: -Serve enables dev/fast mode by default with opt-out switches (-NoDev, -NoFast)
  • Flexible parameter handling for task filtering (-Only, -Skip) with support for comma/semicolon separation
  • Logical parameter precedence: explicit -Dev overrides serve defaults

🔍 Minor Observations

Parameter Logic (lines 132-139):
The conditional logic for dev/fast mode is well-implemented:

$UseDev = ($Dev -or ($Serve -and -not $NoDev))
$UseFast = ($Fast -or ($Serve -and -not $NoFast))

This correctly prioritizes explicit flags while providing sensible defaults for serve mode.

Array Handling (lines 140-145):
The parameter validation for $Only and $Skip arrays is robust:

if ($Only -and $Only.Count -gt 0) {
    $pipelineArgs += @('--only', ($Only -join ','))
}

🛡️ Security Assessment

Low Risk: The script safely handles user input:

  • Array parameters are properly joined with commas before passing to external commands
  • No direct string interpolation into command execution
  • Parameters are passed as separate arguments to prevent injection

Performance Considerations

Efficient Implementation:

  • Minimal overhead from new parameters
  • Smart defaults reduce unnecessary pipeline steps in development
  • Task filtering (-Only, -Skip) can significantly improve iteration speed

🧪 Testing Considerations

Missing but Acceptable:
While there are no explicit tests for the new parameters, the script includes:

  • Build validation via Assert-SiteOutput function
  • Error handling with proper exit codes
  • Clear console output for debugging

Suggested Testing:
Consider testing these scenarios manually:

  • ./build.ps1 -Serve -Skip optimize,doctor
  • ./build.ps1 -Only build,verify
  • ./build.ps1 -Dev -NoDev (should use dev mode)

📋 Minor Suggestions

  1. Documentation Enhancement: Consider adding more examples in the help block showing the new parameters:

    # .EXAMPLE
    #     ./build.ps1 -Serve -Skip optimize,doctor
    #     ./build.ps1 -Only build,verify
  2. Parameter Validation: Could add [ValidateNotNullOrEmpty()] to $Only and $Skip if empty arrays should be rejected, though current handling is fine.

Overall Assessment

This is a high-quality PR that adds valuable development workflow improvements. The implementation is:

  • Bug-free: No issues identified
  • Secure: Safe parameter handling
  • Well-documented: Comprehensive help documentation
  • Performance-conscious: Enables selective pipeline execution
  • Maintainable: Clean, readable PowerShell code

The features directly address the stated goal of "improving local iteration by allowing selective pipeline execution" and follow established patterns in the existing codebase.

Recommendation:Approve - Ready to merge.


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: 932567a369

ℹ️ 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".

}

try {
$UseDev = ($Dev -or ($Serve -and -not $NoDev))

Choose a reason for hiding this comment

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

P2 Badge Honor -NoFast when serving with default dev mode

When -Serve is used, $UseDev becomes true unless -NoDev is set, so the script always appends --dev before it ever considers $UseFast. Since this script documents --dev as implying fast mode, ./build.ps1 -Serve -NoFast still runs in fast mode, which breaks the documented contract that -NoFast disables fast mode in serve flows.

Useful? React with 👍 / 👎.

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

Updates the website build script to support a “dev pipeline mode” and task-level filtering, improving local iteration by letting developers run only parts of the PowerForge.Web pipeline.

Changes:

  • Add -Dev / -NoDev switches and default dev behavior when -Serve is used.
  • Add -Only and -Skip task filters and pass them through to powerforge-web pipeline (--only/--skip).
  • Refactor pipeline invocation to a single $pipelineArgs argument list.

Comment on lines +24 to +27
Run only the specified pipeline tasks (comma/semicolon separated), for example: build,verify.

.PARAMETER Skip
Skip the specified pipeline tasks (comma/semicolon separated), for example: optimize,doctor.
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 help text says -Only/-Skip accept comma/semicolon-separated values, but semicolons won’t work as a separator in PowerShell invocation (they terminate the statement unless quoted), and the script does not split ; when building --only/--skip (it just joins the array with ,). Please either remove the semicolon mention from the parameter docs or add parsing that splits incoming strings on ; (and possibly ,) into task names before joining/passing through.

Suggested change
Run only the specified pipeline tasks (comma/semicolon separated), for example: build,verify.
.PARAMETER Skip
Skip the specified pipeline tasks (comma/semicolon separated), for example: optimize,doctor.
Run only the specified pipeline tasks (comma-separated), for example: build,verify.
.PARAMETER Skip
Skip the specified pipeline tasks (comma-separated), for example: optimize,doctor.

Copilot uses AI. Check for mistakes.
@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.75%. Comparing base (f13a2bc) to head (932567a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #89   +/-   ##
=======================================
  Coverage   59.75%   59.75%           
=======================================
  Files         448      448           
  Lines       57814    57814           
  Branches    16563    16563           
=======================================
  Hits        34548    34548           
- Misses      17565    17566    +1     
+ Partials     5701     5700    -1     

☔ 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 ffe9086 into master Feb 8, 2026
19 checks passed
@PrzemyslawKlys PrzemyslawKlys deleted the codex/website-dev-mode branch February 8, 2026 09:16
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