Skip to content

testing: no contract tests for full pipeline on Windows/MSYS; encoding and permission-prompt paths unverified #10

Description

@Stashub

Summary

The plugin has no automated contract tests that exercise the full
setup → spec → plan → start → finalize pipeline on any supported
OS, and specifically not on Windows/MSYS. Core commands are
effectively untested against:

  1. Bash-on-Windows quirks (path separators, line endings, shebang
    resolution, $HOME vs %USERPROFILE%).
  2. PermissionRequest hook behavior on Windows (may differ from macOS).
  3. Deferred tool loading via ToolSearch (see related issue on
    AskUserQuestion).
  4. Non-ASCII file encoding in generated reports — Cyrillic text in
    SPEC.md / KNOWLEDGE.jsonl / FINAL.md risks mojibake if any
    stage assumes UTF-8 but a tool writes CP1251.
  5. Filesystem verification in finalize mode (see related issue on
    ghost-file entries in FINAL.md).
  6. Setup-time placeholder substitution and complete vs partial
    status reporting (see related issue on brewcode-review SKILL.md
    placeholders).

Contract tests exercising the pipeline on each supported OS would
have caught several existing issues automatically before 3.5.2
shipped. Today each Windows user independently re-discovers them.

Proposed scope

Minimum viable contract test suite, one run per supported OS matrix
entry:

1. Setup contract

Run /brewcode:setup on fixture projects (empty, small-JS,
small-Java). Assert:

  • All expected files are created.
  • No residual setup-time placeholders remain in generated files
    (grep -r '{[A-Z_]*}' .claude/skills/ should return 0).
  • Setup exit status matches actual completion — complete only if
    every phase executed, otherwise partial.

2. Full pipeline smoke

Run spec → plan → start → finalize on a minimal fixture task.
Assert:

  • All phases reach completed in the Task API.
  • FINAL.md exists and passes a consistency check:
    • Every file listed in the Artifacts Index exists on disk.
    • Every file on disk under artifacts/ is listed.
    • Test counts in FINAL.md match the actual last test run output.

3. AskUserQuestion deferred-tool fallback

Spawn a subagent without AskUserQuestion pre-loaded in its schema.
Assert the skill either:

  • calls ToolSearch to load the schema, or
  • completes the phase as blocked with a non-success status.

Never skipped + complete.

4. Encoding round-trip

Generate SPEC.md / KNOWLEDGE.jsonl / FINAL.md with non-ASCII
content (Cyrillic test strings). Read them back and assert
byte-identical round-trip, including on CI Windows runners using
git-bash default encoding.

5. Subagent model pinning

Verify that bc-rules-organizer and other post-processing agents
do not silently inherit 1M context from the parent session on
accounts without /extra-usage (see related issue on
brewcode:rules).

Infrastructure

GitHub Actions matrix:

strategy:
  matrix:
    os: [macos-latest, ubuntu-latest, windows-latest]
    include:
      - os: windows-latest
        shell: 'bash'  # git-bash / MSYS2

Gate releases on this matrix passing across all entries declared
as supported platforms.

Why this matters

The plugin's core value proposition is deterministic multi-phase
pipelines with full audit trails. That value collapses if the
underlying tooling fails silently on platforms it's used on.
Contract tests are the only scalable defense — every bug fix to
individual issues will otherwise leak back over time.

Related

  • brewcode:rules silently fails on accounts without /extra-usage
  • /brewcode:setup Phase 5 silently skipped
  • bc-coordinator finalize: FINAL.md lists files that do not exist
  • setup: brewcode-review SKILL.md has ~13 unresolved placeholders
  • Windows: pipeline runs despite macOS-only declaration

A single contract-test suite addressing items 1-3 above at once
would be the highest-leverage investment. It would prevent all five
of the above issues from regressing.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions