Skip to content

Bugfix/ab#32704 manual generate scoring no longer creates an ai assessment row#2324

Merged
JamesPasta merged 4 commits into
devfrom
bugfix/AB#32704-Manual-Generate-Scoring-no-longer-creates-an-AI-Assessment-row
Apr 22, 2026
Merged

Bugfix/ab#32704 manual generate scoring no longer creates an ai assessment row#2324
JamesPasta merged 4 commits into
devfrom
bugfix/AB#32704-Manual-Generate-Scoring-no-longer-creates-an-AI-Assessment-row

Conversation

@hasanpour
Copy link
Copy Markdown
Contributor

  • Fix Manual Generate Scoring not creating an AI Assessment row (AB#32704): The ApplicationAIScoringGeneratedEvent was being published immediately after RegenerateAndSaveAsync, before the current Unit of Work committed. The event handler would then query for the AI Assessment row that hadn't been persisted yet. Fixed by deferring the event publish to UnitOfWorkManager.Current.OnCompleted(), ensuring the row is in the database before the handler runs.
  • Fix Generate Scoring button UX: Button now disables and shows a spinner while the request is in-flight, matching the behaviour of other Generate buttons.
  • Remove dead AI queue methods (AB#32705): Deleted the three individual-job background job classes (GenerateApplicationScoringJob, GenerateApplicationAnalysisJob, GenerateAttachmentSummaryJob) and their args classes, and removed the corresponding QueueAttachmentSummariesAsync, QueueApplicationAnalysisAsync, QueueApplicationScoringAsync methods from IApplicationAIGenerationQueue and its implementation. Only QueueApplicationPipelineAsync remains.
  • Fix AbpAuthorizationException in RunApplicationAIPipelineJob (AB#32301): Background jobs run without an authenticated user, so calling class-level [Authorize]-decorated app service methods always fails. Added internal-only ForPipeline variants ([AllowAnonymous] + [RemoteService(IsEnabled = false)]) to all three AI app services. The job now calls these instead. Public HTTP-facing methods remain fully protected.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 620
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@JamesPasta JamesPasta merged commit a87d08c into dev Apr 22, 2026
25 checks passed
@JamesPasta JamesPasta deleted the bugfix/AB#32704-Manual-Generate-Scoring-no-longer-creates-an-AI-Assessment-row branch April 22, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants