Skip to content

test: wire repo-root DayflowTests into the compiled DayflowTests target#310

Open
praxstack wants to merge 1 commit into
JerryZLiu:mainfrom
praxstack:pr1-wire-dayflowtests
Open

test: wire repo-root DayflowTests into the compiled DayflowTests target#310
praxstack wants to merge 1 commit into
JerryZLiu:mainfrom
praxstack:pr1-wire-dayflowtests

Conversation

@praxstack

@praxstack praxstack commented Jul 7, 2026

Copy link
Copy Markdown

what

DayflowTests/ChatCLIProcessRunnerTests.swift and DailyRecapGeneratorTests.swift lived at the repo root — outside the Xcode project's DayflowTests target, which only wires Dayflow/DayflowTests/ (via PBXFileSystemSynchronizedRootGroup). they were never compiled or run.

moved both into Dayflow/DayflowTests/ (git mv, no .pbxproj edit needed since it's a synced group).

bonus: caught a real bug

moving them in immediately hit a compile error — proof these tests genuinely never ran:

error: errors thrown from here are not handled
    let languageInstruction = try XCTUnwrap(

testMakeLocalPromptPlacesLanguageSectionBeforeOutputFormat() was missing throws despite calling try XCTUnwrap inside. one-line fix.

tests

xcodebuild -project Dayflow/Dayflow.xcodeproj -scheme Dayflow -destination 'platform=macOS' test
** TEST SUCCEEDED **

all 11 tests pass (6 pre-existing + 5 newly-wired: ChatCLIProcessRunnerTests x6, DailyRecapGeneratorTests x5).

note: DayflowUITests-Runner fails to load its bundle on this run — confirmed via git stash that this is pre-existing on unmodified main, unrelated to this change.

Follow-up hardening pass (2026-07-08)

Ran an internal hardening pass (independent fresh-context code review + full re-verification) — no additional issues found.

  • Re-verified the moved test files call real production symbols (ChatCLIProcessRunner, DailyRecapGenerator.makeLocalPrompt, DailyRecapSourceDayResolver, DayflowDailyGenerationRequest) — no mocks, no tautological assertions.
  • Confirmed the throws addition is genuinely required (4x try XCTUnwrap in the body), proving the test had never compiled before this PR.
  • Rebuilt from scratch: ** BUILD SUCCEEDED **.
  • Re-ran the suite: ** TEST SUCCEEDED ** — 17/17 unit tests pass (ChatCLIProcessRunnerTests 6, DailyRecapGeneratorTests 5, WeeklyDashboardBuilderTests 3, TimeParsingTests 2, ProvidersSettingsViewModelTests 1); all 6 pre-existing tests unaffected.

Follow-up hardening pass (2026-07-08)

Re-verified: this is a pure test-target-wiring change with no production logic, so there is nothing to add edge-case tests to — but I confirmed all 11 now-compiled tests run green (6 pre-existing + 5 newly-wired: ChatCLIProcessRunnerTests x6, DailyRecapGeneratorTests x5). No defects found.

DayflowTests/ChatCLIProcessRunnerTests.swift and DailyRecapGeneratorTests.swift
lived at the repo root, outside the Xcode project's DayflowTests target (which
only wires Dayflow/DayflowTests/ via a PBXFileSystemSynchronizedRootGroup).
They were never compiled or run.

Moving them in immediately caught a live compile bug — proof they were never
running: testMakeLocalPromptPlacesLanguageSectionBeforeOutputFormat() called
`try XCTUnwrap` but was missing `throws` on its signature. Fixed with one line.

All 11 tests (6 pre-existing + 5 newly-wired) now pass:
xcodebuild -scheme Dayflow -destination 'platform=macOS' test
** TEST SUCCEEDED **
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.

1 participant