Skip to content

[issue-88] fix: Warn On Failure não é oracle, não reprova o teste (#88)#90

Merged
vinicq merged 1 commit into
mainfrom
fix/issue-88-warn-on-failure
Jul 1, 2026
Merged

[issue-88] fix: Warn On Failure não é oracle, não reprova o teste (#88)#90
vinicq merged 1 commit into
mainfrom
fix/issue-88-warn-on-failure

Conversation

@vinicq

@vinicq vinicq commented Jul 1, 2026

Copy link
Copy Markdown
Owner

O que mudou

Run Keyword And Warn On Failure estava agrupado com Continue On Failure em is_verification (scanner.py), recursando no keyword interno e contando como oracle. Mas a semântica difere:

  • Continue On Failure: a falha é registrada e o teste falha no fim. Oracle válido - mantém a recursão.
  • Warn On Failure: a falha vira só um WARN e o teste segue verde. A asserção interna nunca reprova o teste - não é oracle, agora retorna False sempre.

Consequências: um teste cuja única verificação está sob Warn On Failure passa a cair em C2b; um user keyword nomeado como verificador com esse wrapper vira R2 (hollow oracle).

Testes

Regressões distinguindo os dois wrappers em tests/test_scanner.py:

  • Run Keyword And Warn On Failure Should Be Equal ${1} ${2} -> C2b
  • Run Keyword And Continue On Failure Should Be Equal -> continua oracle (sem C2b)
  • test_no_r2_warn_on_failure_around_assertion ajustado (agora R2, era o teste que codificava o bug).

Suíte completa: 240 verdes.

Closes #88

Run Keyword And Warn On Failure estava agrupado com Continue On Failure em
is_verification, recursando no keyword interno e contando como oracle. Mas
Warn On Failure só loga um WARN e o teste segue verde: a asserção interna nunca
reprova o teste. Mesmo problema do Run Keyword And Ignore Error (swallow).

Separado: Continue On Failure mantém a recursão (oracle se o inner for);
Warn On Failure retorna False sempre (não é oracle). Assim o teste cuja única
verificação está dentro de Warn On Failure passa a cair em C2b, e um user
keyword nomeado como verificador com esse wrapper vira R2 (hollow oracle).

Regressões distinguindo os dois wrappers em tests/test_scanner.py.

Closes #88
@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.

@vinicq vinicq merged commit 95d9333 into main Jul 1, 2026
4 checks passed
@vinicq vinicq deleted the fix/issue-88-warn-on-failure branch July 1, 2026 17:25
vinicq added a commit that referenced this pull request Jul 2, 2026
…e test (#90)

Run Keyword And Warn On Failure was grouped with Continue On Failure in
is_verification, recursing into the inner keyword and counting as an oracle. But
Warn On Failure only logs a WARN and the test stays green: the inner assertion
never fails the test. Same problem as Run Keyword And Ignore Error (swallow).

Split: Continue On Failure keeps the recursion (an oracle if the inner one is);
Warn On Failure always returns False (not an oracle). A test whose only
verification sits inside Warn On Failure now falls to C2b, and a user keyword
named as a verifier wrapped this way becomes R2 (hollow oracle).

Regression tests distinguishing the two wrappers in tests/test_scanner.py.

Closes #88
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.

fix: Run Keyword And Warn On Failure treated as oracle but does not fail the test (false negative)

1 participant