๐ fix(gates): keep a red gate's failure report when output is clipped #177
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) ร (1 โ Review Confidence (0.59)).
Review depth and reviewer attention state are adequate.
Model 1 ยท Change Risk (XGBoost)
Score: 0.52 ยท 650 lines diff across 8 files
Model 2 ยท Review Depth (DistilBERT)
Depth Score: 0.17 ยท 1 substantive comment(s)
Model 3 ยท Review Timing & Attention
Session adequacy: 94% ยท Reviewer familiarity: 35%
Bedrock Claude 3 ยท Risk Narration
(disconnected)
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
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #177"
general
weight: 0.35
Misery7100
User description
Summary
On erp's S-0004 night, T-0007's e2e gate failed on two tests. The retry got the failed tests' names but none of their tracebacks, debugged blind, and hit the agent timeout.
pytest prints the
FAILURESsection first, then the coverage table, then the short summary. Every clip between the gate and the retry kept only the tail:| Clip | Where | Before |
|---|---|---|
| gate output |
base/shell.pytruncate| head 2000 + tail 6000 of 8000 || recorded result |
application/telemetry.py_recorded_result| last 4000 || retry's context |
application/contextpack.py_red_gates| last 2000 |The fix shares one marker and one helper:
FAILURE_REPORTfinds where pytest'sFAILURESorERRORSreport opens.truncategives that report the 6000-character share in place of the head when the report falls in the clipped middle. The tail keeps the last 2000 characters, which hold the summary.clip(text, limit)keeps three quarters from the report and the last quarter. The recorded result and the retry's context use it.Tests
test_a_failure_report_survives_every_clip_down_to_the_retryruns a synthetic e2e output through all three clips. At each one it asserts the traceback and the summary line survive within the bound.test_output_without_a_failure_report_keeps_its_tailandtest_a_failure_report_already_in_the_tail_keeps_the_plain_tailcover the unchanged behaviour.pytestpasses, as doruff check,ruff format --checkandmypy src.mypy .reports 8 errors undersandboxes/; main reports the same 8.Only pytest's report is recognised. Other runners keep the tail as before.
๐ค Generated with Claude Code
https://claude.ai/code/session_01X5XatXv3dQLan6TyQoHFyF
<!-- This is an auto-generated description by cubic. -->
---
Summary by cubic
Keeps a red gate's pytest failure report across every output clip, so a retry sees the tracebacks instead of just the failed test names.
Bug Fixes
FAILURESreport before the coverage table and summary, so tail-only clips dropped the tracebacks.truncategives the failure report the head's larger share โ including reports that open within the head โ and the tail keeps the summary.cliphelper keeps three quarters from the report and the last quarter, and is used by the recorded result and the retry's context; bounds too small for the elision keep a plain tail.<sup>Written for commit 6d9ac4308bdfcf99c7f2b5cbab76cf5fd7476609. Summary will update on new commits.</sup>
<a href="https://cubic.dev/pr/morzecrew/torve/pull/177?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a> <a href="https://www.cubic.dev/action/auto-fix/pr/morzecrew/torve/177?returnTo=https%3A%2F%2Fgithub.com%2Fmorzecrew%2Ftorve%2Fpull%2F177&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
___
CodeAnt-AI Description
Keep pytest tracebacks in clipped failed-gate output
What Changed
Impact
โ Tracebacks available to failed-test retriesโ Pytest diagnostics retained in failed-gate recordsโ Existing tail behavior preserved for other output<details><summary><strong>๐ก Usage Guide</strong></summary>
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
<pre>
<code>@codeant-ai ask: Your question here</code>
</pre>
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
<pre>
<code>@codeant-ai ask: Can you suggest a safer alternative to storing this secret?</code>
</pre>
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
<pre>
<code>@codeant-ai: Your feedback here</code>
</pre>
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
<pre>
<code>@codeant-ai: Do not flag unused imports.</code>
</pre>
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
<pre>
<code>@codeant-ai: review</code>
</pre>
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
</details>
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Long pytest output now retains the failure report and failed-test names when output is clipped, while still displaying the coverage table and final summary.
Failure details are preserved in gate output, recorded results, and retry context without retaining tracebacks.
Output without a failure report continues to keep its usual tail.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->