Skip to content

fix: unify extract-log-errors output behavior for empty manifests#814

Merged
strawgate merged 2 commits intomainfrom
fix/812-unify-extract-output-0d6a703c3dcd5880
Apr 14, 2026
Merged

fix: unify extract-log-errors output behavior for empty manifests#814
strawgate merged 2 commits intomainfrom
fix/812-unify-extract-output-0d6a703c3dcd5880

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Mar 26, 2026

Summary

This PR resolves #812 by unifying output handling in scripts/extract-log-errors.py so both empty and non-empty log sets flow through emit_output(...).

What changed

  • Removed emit_empty_output(...).
  • Refactored main() to:
    • preserve No log files found. on stderr when no logs are present
    • always build summary
    • always call emit_output(summary, args.output)
  • Kept run metadata attachment for non-empty log scans unchanged.

Tests

  • Added assertions in tests/test_extract_log_errors.py to verify --output prints the output path for both:
    • non-empty manifest logs
    • empty manifest logs
  • /tmp/gh-aw/agent/venv/bin/python -m pytest -q tests/test_extract_log_errors.py (4 passed)

Issue linkage

Closes #812.


The body of this PR is automatically managed by the Trigger Update PR Body workflow.

github-actions bot and others added 2 commits March 26, 2026 13:43
Ensure empty and non-empty log flows use the same output writer so --output behavior is consistent and path reporting is preserved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot mentioned this pull request Mar 26, 2026
@strawgate strawgate marked this pull request as ready for review April 14, 2026 17:14
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d48da08c-a3ff-4d84-85aa-6f574cb03d73

📥 Commits

Reviewing files that changed from the base of the PR and between 3d0fa0f and 0f32c71.

📒 Files selected for processing (2)
  • scripts/extract-log-errors.py
  • tests/test_extract_log_errors.py

📝 Walkthrough

Walkthrough

The changes consolidate output handling in scripts/extract-log-errors.py by removing the emit_empty_output() function and its invocation. The script now constructs a summary object in all cases (including when no log files are found) and routes both empty and non-empty results through emit_output(). Tests in test_extract_log_errors.py were updated to assert that the output path is printed to stdout on successful execution.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed PR fully addresses issue #812 requirements: removed emit_empty_output, unified output handling through single emit_output path, added test assertions for --output behavior in both empty/non-empty scenarios.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #812 objectives: function removal, main() refactoring, and test updates align entirely with complexity-reduction goals.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/812-unify-extract-output-0d6a703c3dcd5880
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

@strawgate strawgate merged commit 407b8c2 into main Apr 14, 2026
26 checks passed
@strawgate strawgate deleted the fix/812-unify-extract-output-0d6a703c3dcd5880 branch April 14, 2026 17:17
strawgate added a commit that referenced this pull request Apr 14, 2026
Recompiles lock files to reflect merged changes from PRs:
#903, #901, #890, #885, #881, #866, #856, #814, #715

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the small_boom Small PR blast radius; usually low human-review need label Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

small_boom Small PR blast radius; usually low human-review need

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[complexity] Code complexity findings (2026-03-26)

1 participant