mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 09:20:03 +01:00
Two failures found by watching the "Make it happen" button actually run on HamsterCheek, both repeats of classes already fixed once. 1. The agent built the whole first milestone — schema, migration, map picker, photo upload, tests, `npm run verify` green — and left every line of it uncommitted. Its session ended and the work sat in `git status` for 13 hours; from FleetCrown the project looked untouched. The prompt did say "and commit it", but only inside an "if the repository is empty" clause, and no dispatch kind ever said *push*. `dispatchClosing()` now appends "commit on a branch, push it, and open a PR" to every kind, and a test asserts it across PROJECT_DISPATCH_KINDS so a new kind cannot skip it. 2. `attrs.x?.trim()` reads as "the value, if any" but returns "Unknown". PR #160 fixed the four sites it found; there were 17. Swept all of them through hasAnswer() / the new answer(), including the one that briefed agents with "STACK: Unknown". Prompt composition moved out of route.ts into lib/project-dispatch-prompt: a route file cannot export anything but its handlers, which is why the prompts — the actual product of a dispatch — had no tests. The route is now thin, per the repo's own API-layer rule. The gate, so this is the last time: an eslint no-restricted-syntax rule bans `.trim()` on a project attribute in all three shapes (attrs.x, attrs["x"], dossier.detail.attrs.x), verified against a canary file. npm run verify green: 49 unit files (project-dispatch-prompt 30/30, project-kickoff 58/58), 150 home tests, tsc clean, 0 lint errors. Co-authored-by: test <test@test> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>