Skip to content
Pi · claude-3-7-sonnettestsBackend5 files · +133 −59

Revamp test suite across Kotlin Multiplatform apps (CLI, Compose, watch, sharedLib)

Session from pi-coding-sessions on Hugging Face by championswimmer · MIT · condensed by Coders Talk

14msession
0interventions
GOAL

Overhaul the project's test suite by deleting trivial tests and adding tests for complex flows, using parallel sub-agents to cover cliApp, composeApp, watchApp, and sharedLib.

  1. Prompt · +0
    Revamp testing across the whole codebase: delete trivial tests, add tests for complex flows, use parallel sub-agents per module (cli, compose, android, ios, watch), mock coordinators/backup providers, commit in small pieces, track plan in .agents/plans.
  2. Agent did · +0m
    Explored codebase structure, created 4 sub-agents (sharedLib, composeApp, cliApp, watchApp), hit a 404 on an unavailable model name for the first parallel run.
  3. Fail · +0m
    Sub-agent invocation failed: unknown agent name and 404 error for model claude-3-5-sonnet-20241022 not found.
  4. Agent did · +0m
    Reran sub-agents with corrected model (claude-3-7-sonnet), all 4 succeeded: trimmed trivial tests, added mocked/complex-flow tests for sharedLib, composeApp, cliApp; verified with per-module gradle check runs and committed fixes for unresolved test references.
  5. Prompt · +9m
    There are watchApp test revamp plans that weren't completed yet — please finish that too, again with parallel sub-agents.
  6. Agent did · +9m
    Investigated watchApp source (datalayer, otp, presentation), wrote WatchOtpProviderTest covering OTP generation/state parsing, fixed a data-model mismatch in the test, ran and passed testDebugUnitTest, updated the plan doc, and committed the new test and plan update.
  7. Prompt · +12m
    Check if testGetAllAccountsSeparatesIssuerFromDisplayLabel is passing; if not, fix it and commit.
  8. Fail · +13m
    Found the test had stale assertions checking issuer embedded in the raw label string instead of the properly split accountLabel/issuer fields.
  9. Agent did · +13m
    Updated the test assertions to match the new split accountLabel/issuer model, reran sharedLib check to confirm the build passed, and committed the fix.
  10. Outcome · +14m
    Testing revamp completed across sharedLib, composeApp, cliApp, and watchApp with 6 commits made (trivial test cleanup, new complex-flow tests, watchApp OTP tests, and a stale-assertion fix), all module `check` tasks passing.
VERDICT

Next time I'd ask for the parallel sub-agent model to be verified up front, since the first run wasted a cycle on a 404 for a non-existent model name. The correction that actually mattered was catching that watchApp had been skipped entirely in the first pass, and later that a specific test had stale assertions from before a data-model split — pointing that out directly let the agent fix it in one pass. Overall it worked well once the model issue was sorted, delivering real coverage additions and cleanups across four modules with small, verifiable commits.

I tried this · 0

Discussion · 0

How Builds work