You've already forked agentic-coding-workflow
feat(mcp,acp): Repository.WithTx + acp.Repository.InTx
Cross-module transactional support for spec §6.1: ACP CreateSession must atomically insert acp_sessions row + mcp_tokens row (FK NOT NULL). - mcp.Repository.WithTx(tx) -> Repository (tx-bound, no pool) - acp.Repository.InTx(ctx, fn) -> error (pgx.BeginFunc wrapper) - acp.Repository.WithTx(tx) -> Repository (tx-bound) - Update fakeRepos in test files to satisfy new interface methods Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgx/v5"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -124,6 +125,14 @@ func (f *fakeAgentKindRepo) PurgeEventsBefore(context.Context, time.Time) (int64
|
||||
panic("n/a")
|
||||
}
|
||||
|
||||
func (f *fakeAgentKindRepo) InTx(context.Context, func(context.Context, pgx.Tx) error) error {
|
||||
panic("n/a")
|
||||
}
|
||||
|
||||
func (f *fakeAgentKindRepo) WithTx(pgx.Tx) acp.Repository {
|
||||
return f
|
||||
}
|
||||
|
||||
// agentKindRecordingRecorder:accumulate audit entries
|
||||
type agentKindRecordingRecorder struct{ entries []audit.Entry }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user