feat(github-agent): add command usefulness feedback - #194
Conversation
8acfba9 to
d7fed30
Compare
JSONbored
left a comment
There was a problem hiding this comment.
@oktofeesh1 This needs another pass. Current main conflicts in src/api/routes.ts, src/db/repositories.ts, src/openapi/spec.ts, test/integration/api.test.ts, and test/unit/queue.test.ts, and Superagent is still action-required.
The usefulness feedback feature is still a reasonable follow-up, but API, repository, OpenAPI, integration-test, and queue code all moved underneath it. Please rebase, address the security scan finding, and rerun the full gate before another review.
d7fed30 to
12c613b
Compare
12c613b to
27f1231
Compare
JSONbored
left a comment
There was a problem hiding this comment.
@oktofeesh1 This is ready from my side. The branch is now green and merge-clean, and the prior conflict/security-scan blockers are resolved.
A few notes:
- The feedback migration, repository storage, API route, OpenAPI shape, queue handling, and command handling are wired together.
- The added tests cover feedback persistence, command behavior, OpenAPI coverage, integration routes, and queue processing.
- No requested changes from me.
|
Documentation Updates 1 document(s) were updated by changes in this PR: ArchitectureView Changes@@ -246,7 +246,7 @@
### Schema Organization
-The schema defines 43 tables organized by functional domain [[64]](https://github.com/JSONbored/gittensory/blob/f63f125e2126dc58ac5a63e88f4f33d1e13b2979/src/db/schema.ts):
+The schema defines 45 tables organized by functional domain [[64]](https://github.com/JSONbored/gittensory/blob/f63f125e2126dc58ac5a63e88f4f33d1e13b2979/src/db/schema.ts):
#### Installation & Repository Management
@@ -301,6 +301,8 @@
- **agentRuns** — Agent orchestration runs with objective and status ([src/db/schema.ts](https://github.com/JSONbored/gittensory/blob/f63f125e2126dc58ac5a63e88f4f33d1e13b2979/src/db/schema.ts#L408-L428))
- **agentActions** — Agent action recommendations with risk impact ([src/db/schema.ts](https://github.com/JSONbored/gittensory/blob/f63f125e2126dc58ac5a63e88f4f33d1e13b2979/src/db/schema.ts#L430-L457))
- **agentContextSnapshots** — Agent context with decision pack and signal snapshot IDs ([src/db/schema.ts](https://github.com/JSONbored/gittensory/blob/f63f125e2126dc58ac5a63e88f4f33d1e13b2979/src/db/schema.ts#L459-L474))
+- **githubAgentCommandAnswers** — Stores command invocations and responses from the GitHub agent (@gittensory), including repo, issue number, command name, request/response comment IDs, actor kind, and metadata. Indexed by (repo_full_name, issue_number) and (command, updated_at).
+- **githubAgentCommandFeedback** — Records usefulness votes (thumbs-up/thumbs-down reactions) on command answers, with unique constraint on (answer_id, actor_hash) to deduplicate feedback per actor. Tracks vote, source (reaction or app feedback), actor kind, and links to github_agent_command_answers via foreign key. Indexed by (answer_id, actor_hash), (command, updated_at), and (repo_full_name, issue_number).
- **syncRuns** — Sync job execution tracking ([src/db/schema.ts](https://github.com/JSONbored/gittensory/blob/f63f125e2126dc58ac5a63e88f4f33d1e13b2979/src/db/schema.ts#L523-L533))
- **webhookEvents** — GitHub webhook delivery tracking with payload hash ([src/db/schema.ts](https://github.com/JSONbored/gittensory/blob/f63f125e2126dc58ac5a63e88f4f33d1e13b2979/src/db/schema.ts#L510-L521))
|
Summary
What changed
Why
Validation
npm run typechecknpm run test:unit -- test/unit/command-feedback.test.ts test/unit/github-commands.test.ts test/unit/queue.test.tsnpm run test:integration -- test/integration/api.test.tsnpm run test:coveragenpm run test:ciNotes