Skip to content

Investigate CI test failures for monitor validation checks #303

@timogilvie

Description

@timogilvie

Problem

Six monitor validation checks in tests/check-shell.sh pass locally (macOS) but consistently fail in CI (Ubuntu):

  1. HOK-1210 idle-pane-without-approval guard
  2. Planning phase-boundary validation
  3. Coding phase-boundary validation
  4. Aborted-state handling
  5. Review window restoration for PR-backed tasks
  6. Ready phase transition for PR-backed tasks

Evidence

Local testing (macOS):

$ npm run test:shell
✓ All patterns verified
✓ All tests pass

CI testing (Ubuntu):

✗ monitor is missing HOK-1210 idle-pane-without-approval guard
✗ monitor is missing planning phase-boundary validation
✗ monitor is missing coding phase-boundary validation
✗ monitor is missing aborted-state handling or controller-state abort fallback
✗ monitor does not restore review windows for resumed PR-backed tasks
✗ monitor does not transition PR-backed review tasks into ready

Investigation Performed

  • ✅ Verified all required patterns exist in shared/lib/wavemill-mill.sh
  • ✅ Verified extraction logic works correctly locally
  • ✅ Confirmed identical file content between local and CI (same commit SHA)
  • ✅ Manually ran exact test commands locally - all pass
  • ❌ Cannot reproduce failures in local environment

Hypothesis

Environment difference between macOS and Ubuntu CI:

  • Different bash versions (macOS uses old bash 3.x, Ubuntu uses newer 5.x)
  • Different awk implementations (BSD awk vs GNU awk)
  • Different grep implementations
  • Line ending differences (unlikely given git normalization)

Next Steps

  1. Add debug output to failing tests to see what CI actually extracts
  2. Run tests in Docker Ubuntu container locally to match CI environment
  3. Check for Unicode character handling differences (em-dash in "Plan ready — awaiting user approval")
  4. Consider using more robust pattern matching that's environment-agnostic

Temporary Workaround

Tests are temporarily skipped in #299 to unblock CI. They should be re-enabled once root cause is identified and fixed.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions