feat. rebuild service in Go
ci / test (pull_request) Successful in 1m54s
ci / publish (pull_request) Has been skipped

Rebuild the Gitea Codex review bot from the product contract with a Go HTTP service, durable SQL queue, typed Gitea client, isolated runner, and deployment updates.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Space-Banane
2026-07-12 21:51:01 +02:00
parent fdd3819ff8
commit f19b271642
74 changed files with 2623 additions and 4819 deletions
+24
View File
@@ -0,0 +1,24 @@
package store
import (
"context"
"time"
"gitea-codex-bot/internal/domain"
)
type Store interface {
Migrate(context.Context) error
InsertWebhookEvent(context.Context, domain.WebhookEvent) (bool, error)
CooldownRemaining(context.Context, string, int, time.Duration) (int, error)
EnqueueJob(context.Context, domain.WebhookEvent, domain.ParsedCommand) (domain.Job, error)
ClaimNextJob(context.Context, time.Time, time.Duration, int) (*domain.Job, *domain.ReviewRun, error)
FinishJob(context.Context, int64, int64, bool, bool, *domain.ReviewResult, error) error
LatestFailedJob(context.Context) (*domain.Job, error)
LatestJob(context.Context) (*domain.Job, error)
LatestSuccessfulReview(context.Context, string, int) (*domain.Job, error)
PendingCount(context.Context, string, int) (int, error)
UpsertBotComment(context.Context, string, int, string, int64, string) error
BotCommentID(context.Context, string, int, string) (int64, error)
Close() error
}