Skip to content

Fix premature true in isOverallComplete#17

Merged
insign merged 1 commit intomainfrom
fix-is-overall-complete-bug-2286792352607865123
Apr 3, 2026
Merged

Fix premature true in isOverallComplete#17
insign merged 1 commit intomainfrom
fix-is-overall-complete-bug-2286792352607865123

Conversation

@insign
Copy link
Copy Markdown
Contributor

@insign insign commented Apr 3, 2026

A melhoria escolhida foi a correção de um bug crítico na função isOverallComplete(). Antes da alteração, esta função calculava o progresso total e arredondava o valor para o inteiro mais próximo. Isso causava falsos positivos de conclusão quando um processo estava próximo do fim (ex: se o progresso geral fosse 99.7%, o método retornava true prematuramente).

Essa correção agrega valor real em confiabilidade. Em sistemas onde múltiplos processos paralelos reportam progresso, depender do isOverallComplete() para finalizar ou dar sequência a tarefas estava propenso a erros silenciosos. Agora, a função verifica explicitamente se cada processo instanciado realmente atingiu os 100% no array de dados subjacente ($progressData), garantindo absoluta consistência com o estado real de cada processo.

Arquivos alterados:

  • src/Progressable.php: Modificado para iterar sobre os dados invés de utilizar a média arredondada do cache.
  • tests/IsOverallCompleteBugTest.php: Adicionado com o propósito único de testar essa condição específica, garantindo que 99.4% ou variações parecidas não causem a conclusão antecipada de todo o processo geral.

Impacto nos testes:

  • Um novo teste focado (IsOverallCompleteBugTest.php) foi adicionado.
  • A alteração não quebra os testes já existentes do repositório.

Nenhum arquivo .md foi atualizado por não haver mudança de assinatura de método nem impacto na experiência documentada de uso. Nenhum arquivo temporário foi adicionado.


PR created automatically by Jules for task 2286792352607865123 started by @insign

The `isOverallComplete` method previously returned true prematurely if the average overall progress rounded up to 100%. This commit updates it to check the underlying `$progressData` array to ensure every tracked instance is actually at or above 100%.

Co-authored-by: insign <1113045+insign@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@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.

@insign insign merged commit fc01c8b into main Apr 3, 2026
3 of 4 checks passed
@insign insign deleted the fix-is-overall-complete-bug-2286792352607865123 branch April 3, 2026 03:40
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