Skip to content

Corrige dashboard físico, intake review e integra IA no SmartSearch - #545

Merged
devmnsoft merged 7 commits into
mainfrom
fix/physical-dashboard-intake-smartsearch-ai
Sep 17, 2026
Merged

devmnsoft merged 7 commits into
mainfrom
fix/physical-dashboard-intake-smartsearch-ai

Conversation

@devmnsoft

@devmnsoft devmnsoft commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Contexto

Corrige os 500 reportados em /Physical/Dashboard e no detalhe de upload, e liga /SmartSearch a um sintetizador de IA opcional (OpenAI-compatible), grounded nas fontes recuperadas.

Problemas

  1. GET /Physical/Dashboard — 42703: coluna "status" não existe.
  2. Detalhe de lote de upload — Dapper não materializa DocumentIntakeReviewDto.
  3. /SmartSearch recuperava documentos, mas não sintetizava resposta com provedor de IA.

Correções nesta branch

  • Dashboard físico passa a inspecionar information_schema antes de filtrar por status.
  • Migration 2026_09_17_physical_archive_status_compat_fix.sql (já em main via feat(smartsearch): add OpenAI-compatible grounded answer synthesizer #544) + catalogação em required_migrations.json.
  • DocumentIntakeReviewService materializa IntakeReviewRow e converte para o record público.
  • OpenAiCompatibleSearchSynthesizer (OpenAI, xAI, Groq, Ollama local).

Como ligar a IA

"SmartSearch": {
  "Ai": {
    "Enabled": true,
    "Provider": "OpenAICompatible",
    "BaseUrl": "https://api.openai.com/v1",
    "ApiKey": "sk-...",
    "Model": "gpt-4o-mini"
  }
}

Também lê IntelligentAssistant e as env SMARTSEARCH_AI_APIKEY / OPENAI_API_KEY.

Como validar

  1. Aplicar database/migrations/2026_09_17_physical_archive_status_compat_fix.sql.
  2. Abrir /Physical/Dashboard — não pode retornar 500.
  3. Abrir o detalhe de um lote de upload.
  4. Em /SmartSearch, pesquisar e usar “Perguntar aos documentos”.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-17T15:23:22.921224Z 689b33e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Owner Author

PR das correções de schema do acervo físico, materialização do intake review e sintetizador OpenAI-compatible do SmartSearch.

Antes do merge, restaurar InovaGed.Web/Program.cs a partir de main (o commit ff3cd5e substituiu o arquivo por um placeholder):

git checkout origin/main -- InovaGed.Web/Program.cs
git commit -m "restore Program.cs from main"
git push

O registro da IA pode ficar em AddGedModule (DependencyInjection.cs) para não exigir mudança no host.

@devmnsoft
devmnsoft merged commit be37901 into main Sep 17, 2026
29 of 47 checks passed
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.

1 participant