# Test Coverage Notes — Forgejo Platform Support ## Well Covered (unit tested) | Module | Tests | File | | -------------------------------- | --------------- | ------------------------------------ | | `src/forgejo/token.ts` | 8 tests | `test/forgejo-token.test.ts` | | `src/platform/detector.ts` | 17 tests | `test/platform-detector.test.ts` | | `src/forgejo/comment-logic.ts` | 30+ tests | `test/forgejo-comment-logic.test.ts` | | `src/forgejo/data/fetcher.ts` | 50+ tests | `test/forgejo-data-fetcher.test.ts` | | `src/github/validation/actor.ts` | 6 Forgejo tests | `test/actor.test.ts` | | `src/mcp/install-mcp-server.ts` | 8 Forgejo tests | `test/install-mcp-server.test.ts` | ## Added in M4 | Module | Tests | File | | ------------------------------------------------------ | -------- | -------------------------------------- | | `src/github/operations/comments/create-initial.ts` | 15 tests | `test/create-initial-comment.test.ts` | | `src/github/operations/comments/update-with-branch.ts` | 11 tests | `test/update-tracking-comment.test.ts` | | `src/github/operations/branch.ts` (API divergence) | 2 tests | `test/setup-branch-forgejo.test.ts` | ## Accepted Gaps (orchestrators) ### `src/modes/tag/index.ts` — `prepareTagMode()` **Why not unit tested**: Calls 8+ modules (checkHumanActor, createInitialComment, fetchForgejoData/fetchGitHubData, setupBranch, configureGitAuth, createPrompt, prepareMcpConfig). Each is individually unit tested. **Risk**: Low. The Forgejo branch is a simple `if (platform === "forgejo")` choosing `fetchForgejoData` vs `fetchGitHubData`. Both are thoroughly tested. **Coverage path**: Integration tests in the separate `install-test` repo. ### `src/entrypoints/run.ts` — main orchestrator **Why not unit tested**: Token setup path is a trivial conditional (1 line). Testing requires mocking the entire execution environment (GitHub Actions context, CLI installation, process lifecycle). **Risk**: Very low. The Forgejo token path calls `setupForgejoToken()` which has 8 dedicated tests. **Coverage path**: Integration tests in the separate `install-test` repo. ## Known Issue: CLAUDE_APP_BOT_ID Discrepancy `src/github/operations/comments/create-initial.ts` (line 23) defines a local `CLAUDE_APP_BOT_ID = 209825114`, while `src/github/constants.ts` exports `CLAUDE_APP_BOT_ID = 41898282`. These are different values with the same name. This should be investigated in M5 (code quality review).