← Back to Pull requests

fix(canonical): asserts sec_* esperam count (Number()===3/6), não boolean #324

Merged
devin-ai-integration[bot] merged 1 files (4 lines) on Oct 28, 2026 21:17 UTC
View on GitHub
devin-ai-integration[bot] devin-ai-integration[bot] commented on Oct 28, 2026 21:07 UTC
Author

Descrição

Alinha os asserts sec_cron_jobs_ok/sec_fns_ok do canonical-migrations ao contrato count() que #308 estabeleceu — sem isso o apply de qualquer lote falha no passo "Verificar objetos e ledger" mesmo com tudo aplicado.

Tipo de mudança

  • Bug fix

  • Nova feature

  • Breaking change

  • Documentação

  • Refactor / chore
  • Verificado de verdade (regra 10 do fluxo Git)

  • CI verde neste PR

  • Testado localmente / via run real (link do log/query abaixo)
  • run 40767837337 (apply do lote 2026102813_xxx): falhou com
    sec_cron_jobs_ok=3 e sec_fns_ok=6 no JSON de invariantes, mas o
    assert exigia === true — saída do passo:
    {"sec_cron_jobs_ok": 3, "sec_fns_ok": 6, ..., "ledger_count": 28}
    Histórico: #307 reverteu o assert para === true (SQL era boolean);
    #308 trocou o invariante para count() sem ajustar o assert.
    

    Checklist

  • Testes passando

  • Sem secrets/keys no diff

  • Documentação atualizada (se aplicável)
  • Link to Devin session: https://app.devin.ai/sessions/fa59da99ef624cd4931da83edf42084b
    Open in Devin Desktop: https://app.devin.ai/desktop/session/fa59da99ef624cd4931da83edf42084b?variant=devin
    Requested by: @adm01-debug

    Diff: 4 lines (+2 / -2) across 1 files Reviewer: adm01-debug Review duration: 9m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.28) × (1 − Review Confidence (0.83)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.28 · 4 lines diff across 1 files
    0.28
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.89 · 2 substantive comment(s)
    0.89
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    82%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Rapid Merge rapid_merge
    0.100
    Diff Size diff_size
    0.096
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    4 items
    devin-ai-integration[bot] devin-ai-integration[bot] commented on Oct 28, 2026 21:07 UTC
    Author

    <!-- devin-pr-monitoring-controls -->
    I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring
  • vercel[bot] vercel[bot] commented on Oct 28, 2026 21:07 UTC
    Bot

    [vc]: #ihubAgrWus7CJ4kl09J9IBJTmG7isj2B22LU/lX8LN0=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJkZXBhcnRhbWVudG8tcGVzc29hbC12MyIsInByb2plY3RJZCI6InByal9uQ2JVRlA3aVZrU3lISVg0Rml1eXB1ZUZzaXpsIiwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL2p1Y2ExL2RlcGFydGFtZW50by1wZXNzb2FsLXYzL0RGOFVldzdGdkF3dmRyU2NiZlBVcXVBU21LYUIiLCJwcmV2aWV3VXJsIjoiZGVwYXJ0YW1lbnRvLXBlc3NvYWwtdjMtZ2l0LWRldmluLTE3OTMyMjE2MjUtZml4LXMtNmNhYjQ3LWp1Y2ExLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiZGVwYXJ0YW1lbnRvLXBlc3NvYWwtdjMtZ2l0LWRldmluLTE3OTMyMjE2MjUtZml4LXMtNmNhYjQ3LWp1Y2ExLnZlcmNlbC5hcHAifSwicm9vdERpcmVjdG9yeSI6bnVsbH1dfQ==
    The latest updates on your projects. Learn more about Vercel for GitHub.

    | Project | Deployment | Actions | Updated |
    | :--- | :----- | :------ | :------ |
    | <a href="https://vercel.com/juca1/departamento-pessoal-v3"><sup><img src="https://vercel.com/api/www/avatar?projectId=prj_nCbUFP7iVkSyHIX4FiuypueFsizl&teamId=team_QyN41X0q8hrqhW80AwokbFLv&s=32" width="16" height="16" align="middle" alt="" /></sup></a> departamento-pessoal-v3 | !Ready Ready | Preview | <relative-time datetime="2026-10-28T21:08:06.936Z">Oct 28, 2026 9:08pm UTC</relative-time> |

    adm01-debug adm01-debug approved these changes on Oct 28, 2026 21:16 UTC
    Approved Reviewer

    OK — alinha asserts sec_* ao contrato count() de #308; destrava apply de migrations.

    Reviewers
    Assignees
    devin-ai-integration[bot] devin-ai-integration[bot]
    Labels
    risk: low confidence: 82.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 27.6% (LOW) · Higher = larger blast radius
    27.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 82.8% · Lower = rushed or shallow review
    82.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 4.7% · Safe to merge
    4.7%