chore: checkpoint assessment and inbox integration

This commit is contained in:
TakuyaYagam1 committed 2026-10-08 17:47:30 +03:00
1 parent 88a31ba0d5
commit 5c52fd8b91
31 files changed
+4608 -181

No files matched your search

+23 -4
View File
@@ -59,10 +59,11 @@ func (fieldError *AttemptFieldError) Unwrap() error { return ErrInvalidAttemptRe
// AttemptService creates, reads, and resumes candidate-owned attempts.
type AttemptService struct {
transactor outbound.Transactor
snapshotExecutor outbound.ReadOnlySnapshotTransactor
keyring Keyring
clock func() time.Time
transactor outbound.Transactor
snapshotExecutor outbound.ReadOnlySnapshotTransactor
keyring Keyring
clock func() time.Time
categoryDecisions AssessmentCategoryDecisionService
}
// NewAttemptService fails at startup when a required dependency is missing.
@@ -77,9 +78,27 @@ func NewAttemptService(
}
return &AttemptService{
transactor: transactor, snapshotExecutor: snapshotExecutor, keyring: keyring, clock: clock,
categoryDecisions: NewAssessmentCategoryDecisionService(AssessmentCategoryDecisionSettings{}),
}, nil
}
// NewAttemptServiceWithCategorySettings keeps assignment fail-closed unless
// the caller explicitly enables the synthetic-demo gate.
func NewAttemptServiceWithCategorySettings(
transactor outbound.Transactor,
snapshotExecutor outbound.ReadOnlySnapshotTransactor,
keyring Keyring,
clock func() time.Time,
settings AssessmentCategoryDecisionSettings,
) (*AttemptService, error) {
service, err := NewAttemptService(transactor, snapshotExecutor, keyring, clock)
if err != nil {
return nil, err
}
service.categoryDecisions = NewAssessmentCategoryDecisionService(settings)
return service, nil
}
// CreateAttemptCommand is one of the three disjoint public request shapes.
// All values are private candidate data and must not be logged.
type CreateAttemptCommand struct {