Skip to content

fix: complete nightbot - tests, bug fixes, and improvements#10

Merged
k08200 merged 3 commits into
mainfrom
nightbot/task-208e8caa
Mar 6, 2026
Merged

fix: complete nightbot - tests, bug fixes, and improvements#10
k08200 merged 3 commits into
mainfrom
nightbot/task-208e8caa

Conversation

@k08200

@k08200 k08200 commented Mar 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix dashboard escalation bug: /api/escalations now reads .md files (matching what escalation.ts saves) instead of .json — escalations actually show up in the dashboard now
  • Add nightbot clear command: Clear completed/failed tasks from queue (--all includes escalated)
  • Add log() utility with ISO timestamps: Replace all console.log calls in orchestrator, scout, escalation, and context modules with timestamped log()
  • Fix applyChanges dirty workdir crash: Stash/pop dirty files before git checkout to prevent failures (was crashing on nightbot.log)
  • Add 29 real tests: task, feedback, gate, context, planner, utils modules — all passing
  • Fix build errors: Create missing src/utils.ts, fix import ordering in src/utils.test.ts
  • Update .gitignore: Add nightbot.log, queue/failed/, queue/escalated/
  • Update test script: node --import tsx --test src/*.test.ts

Test plan

  • npx tsc --noEmit — zero errors
  • npx biome check src/ — zero errors
  • node --import tsx --test src/*.test.ts — 29/29 tests pass
  • ./bin/nightbot.mjs --help — shows all commands including clear

🤖 Generated with Claude Code

k08200 and others added 3 commits March 7, 2026 00:24
- Create src/utils.ts with log() for ISO timestamp prefixed output
- Replace console.log with log() in orchestrator, scout, escalation, context
- Fix dashboard /api/escalations to read .md files (not .json)
- Add `nightbot clear` CLI command (--all for escalated too)
- Fix applyChanges to stash/pop dirty files before git checkout
- Add real tests: task, feedback, gate, context, planner (29 tests)
- Update package.json test script to use node --test + tsx
- Fix .gitignore: add nightbot.log, queue/failed, queue/escalated

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@k08200 k08200 merged commit 772c9c2 into main Mar 6, 2026
3 checks passed
@k08200 k08200 deleted the nightbot/task-208e8caa branch March 6, 2026 16:00
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