Skip to content

W2-2: Integration test for quickfix mode #165

@darksheer

Description

@darksheer

Quick Fix Mode — Wave 2, Item 2

Weight: M (15-40 turns)
Gate: none
Deps: W1-1 (#160)
Initiative: Quick Fix Mode

Task

Create comprehensive integration test for quickfix mode:

  1. Create tests/test-quickfix-mode.sh

  2. Test cases:

    • is_quickfix_mode returns 0 when .quickfix-mode exists and is fresh
    • is_quickfix_mode returns 1 when .quickfix-mode does not exist
    • is_quickfix_mode returns 1 when .quickfix-mode is older than 4h (mock with touch -t)
    • /quickfix skill creates the file when absent
    • /quickfix skill removes the file when present
    • session-end.sh removes .quickfix-mode
    • Safety-critical gates still deny in quickfix mode (nuclear deny, force-push)
    • Bypassed gates allow in quickfix mode (plan-check, @Decision, proof-gate)
  3. Test sources core-lib.sh directly and mocks hook invocations

  4. Follow existing test patterns in tests/ directory

Acceptance Criteria

  • All 8 test cases pass
  • Test cleans up after itself (no leftover .quickfix-mode files)
  • Test can run in CI environment
  • Test validates both bypass and non-bypass behavior

Critical Files

  • tests/test-quickfix-mode.sh (new)
  • hooks/core-lib.sh (sourced by test)

REQ-IDs

Validates: REQ-P0-001 through REQ-P0-008

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions