Commit graph

2 commits

Author SHA1 Message Date
Shantur Rathore
f6fd8c9fca test(github): cover webhook job runner
Restore the fuller GitHub bot operating guidance so headless runs have clear workflow, continuation, and scope instructions for issue comments, PR openings, and review-comment events.

Add runner-level coverage around accepted issue-comment dispatch and same-thread supersession. The job runner now accepts a narrow operations seam so tests can exercise workspace setup, worktree context, OpenCode command arguments, and abort behavior without real GitHub, git, or OpenCode services.

Update the server test script to discover nested __tests__ files and unref delayed workspace cleanup timers so test and short-lived process exits are not held open by background cleanup scheduling.

Validation: npm run test --workspace @neuralnomads/codenomad; npm run typecheck --workspace @neuralnomads/codenomad; npm run build --workspace @codenomad/codenomad-opencode-plugin; git diff --check.
2026-08-13 16:29:18 +01:00
Shantur Rathore
07a74baf79 feat(github): port GitHub bot automation
Add the CodeNomadBot GitHub App integration on top of the current dev branch. The server now validates GitHub webhooks, applies explicit policy rules, prepares managed issue/PR worktrees, launches OpenCode in GitHub mode, and exposes scoped GitHub operations through the plugin route.

Wire the OpenCode plugin to expose a GitHub-only tool and command templates when CODENOMAD_MODE=github. Add GitHub App authentication, installation-token git helpers, bot signature handling, payload sanitization, latest-comment-wins job cancellation, and documentation for setup and operations.

Also harden managed worktree creation by reusing valid existing worktrees, pruning stale registrations, and replacing orphaned directories. Add migrated webhook helper tests and worktree recovery coverage.

Validation: npm run typecheck --workspace @neuralnomads/codenomad; npm run build --workspace @codenomad/codenomad-opencode-plugin; npx tsx --test packages/server/src/integrations/github/__tests__/*.test.ts packages/server/src/workspaces/__tests__/git-worktrees.test.ts
2026-08-13 16:29:18 +01:00