Skip to content

Add .wpcignore support, progress indicators, and timeout handling #112

@noelsaw1

Description

@noelsaw1

Problem

WPCC stalls when scanning large directories due to the Magic String Detector phase processing too many files without progress feedback or timeout handling.

Specific Issue: When scanning AI-DDTK (which embeds WPCC via git subtree), the scanner processes 10K+ files including .git/ history and embedded tool code, causing indefinite hangs.


Requested Features

1. .wpcignore File Support (Priority: High)

Add support for .wpcignore file (like .gitignore) to exclude directories/files from scanning.

Implementation:

  • Read .wpcignore from project root during file discovery
  • Support glob patterns (same syntax as .gitignore)
  • Default exclusions: .git/, node_modules/, vendor/, dist/logs/, dist/reports/

Example .wpcignore:

# Version control
.git/
.svn/

# Dependencies
node_modules/
vendor/

# Build artifacts
dist/
build/
*.min.js
*.min.css

# WPCC output
dist/logs/
dist/reports/

2. Progress Indicators (Priority: Medium)

Show real-time progress during long scans:

  • File count: [Magic String Detector] Processing 1234/5678 files...
  • Time elapsed: Elapsed: 45s
  • Estimated remaining: Est. remaining: 30s

3. Timeout Handling (Priority: Medium)

Add configurable timeouts to prevent indefinite hangs:

  • Per-phase timeout (default: 60s)
  • Total scan timeout (default: 300s)
  • Graceful degradation: skip slow phases, continue with partial results
  • CLI flag: --timeout <seconds>

4. Performance Optimization (Priority: Low)

  • Cache Magic String Detector results per file hash
  • Skip unchanged files on subsequent scans
  • Parallelize file processing where possible

Success Criteria

  • .wpcignore file support implemented and documented
  • Progress indicators show during all scan phases
  • Timeout handling prevents indefinite hangs
  • Scanning large directories (10K+ files) completes or times out gracefully
  • Documentation updated in README and _AI_INSTRUCTIONS.md

Workaround (Current)

Users can manually exclude directories using CLI flags:

wpcc --paths . --exclude "tools/,.git/,node_modules/" --format json

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions