Skip to content

feat: Swift Reporter - Proposal | ADR#87

Open
vnsamy-code wants to merge 1 commit into
nizos:mainfrom
vnsamy-code:feature/propose_swift_reporter
Open

feat: Swift Reporter - Proposal | ADR#87
vnsamy-code wants to merge 1 commit into
nizos:mainfrom
vnsamy-code:feature/propose_swift_reporter

Conversation

@vnsamy-code

Copy link
Copy Markdown
Contributor

Swift Reporter - Proposal

Adds ADR-009 proposing Swift reporter implementation for TDD Guard. The reporter will support iOS, macOS, watchOS, and tvOS platforms (All Apple Platforms).

Key decisions:

XCTestObservation

  • Phase 1: XCTest support via XCTestObservation protocol
    • Official Apple API with stable 10+ year protocol contracts
    • Rich structured data (file paths, line numbers, error messages)
    • No fragile text parsing required
    • Evidence of strong contract over the years.

Swift Testing

  • Phase 2: Swift Testing support via XUnit XML parsing
    • In it's infancy. New test system (under 2 years).
    • Stable, documented format (industry standard)
    • Note: swift test lacks JSON output (unlike Go/Rust)
    • Tradeoff accepted: missing file/line numbers for stability, potential xml contract violation between versions.

The reporter follows Go/Rust patterns:

  • Writes to .claude/tdd-guard/data/test.json
  • Recognizes compilation errors as valid RED-phase failures
  • Distributed as Swift Package with executable product

Adds ADR-009 proposing Swift reporter implementation for TDD Guard.
The reporter will support iOS, macOS, watchOS, and tvOS platforms.

Key decisions:
- Phase 1: XCTest support via XCTestObservation protocol
  - Official Apple API with stable 10+ year protocol contracts
  - Rich structured data (file paths, line numbers, error messages)
  - No fragile text parsing required
- Phase 2: Swift Testing support via XUnit XML parsing
  - Stable, documented format (industry standard)
  - Note: swift test lacks JSON output (unlike Go/Rust)
  - Tradeoff accepted: missing file/line numbers for stability

The reporter follows Go/Rust patterns:
- Writes to .claude/tdd-guard/data/test.json
- Recognizes compilation errors as valid RED-phase failures
- Distributed as Swift Package with executable product

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@nizos

nizos commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Hi @vnsamy-code,

How's it going on the Swift reporter side? Should we update the ADR with your latest findings?

P.S. We might need to bump the ADR number.

@vnsamy-code

Copy link
Copy Markdown
Contributor Author

Hi @nizos !
I have not continued work on the Swift reporter last week. Pushed all diff in a wip commit to work on it soon.

Yeah, ADR number needs bump and also, I will shipp the ADR with the reporter PR like you did in your recent PRs.

Okay, if I close this ADR PR?

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