Skip to content

fix(gate): serialize archive command failures - #2934

Merged
stranske merged 1 commit into
mainfrom
codex/gate-review-followups
Aug 4, 2026
Merged

fix(gate): serialize archive command failures#2934
stranske merged 1 commit into
mainfrom
codex/gate-review-followups

Conversation

@stranske

@stranske stranske commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • normalize binary git archive stderr/stdout before returning JSON gate results
  • keep source and consumer template copies identical
  • add regression coverage that exercises byte output and JSON serialization

Validation

  • python3 -m pytest -q tests/scripts/test_check_deliberate_break.py (105 passed)
  • Black, Ruff, mypy
  • source/template parity and diff check

Source follow-up from review on the generated consumer wave after #2932.

Copilot AI lite review requested due to automatic review settings August 4, 2026 09:23
@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 6 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a532e31d-4e18-41ed-8c4d-3f79fa1373e9

📥 Commits

Reviewing files that changed from the base of the PR and between c0369b5 and 1bfdeba.

📒 Files selected for processing (3)
  • scripts/check_deliberate_break.py
  • templates/consumer-repo/scripts/check_deliberate_break.py
  • tests/scripts/test_check_deliberate_break.py

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

@stranske

stranske commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

@codex review\n\nPlease review exact head 1bfdeba. This bounded follow-up normalizes binary git-archive failure output before JSON serialization; 105 focused tests and local quality/parity gates pass. The mandatory seven-minute window began with this push.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 1bfdebae5d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the deliberate-break gate’s JSON result payloads by normalizing subprocess stdout/stderr to text when git archive failures surface byte output, and adds a regression test to ensure the result remains JSON-serializable. The change is applied in both the source script and the consumer template to preserve parity.

Changes:

  • Added _subprocess_output_text() to normalize str | bytes | None into JSON-safe text.
  • Applied normalization to the archive-command-failed result path in verify_spec.
  • Updated the regression test to simulate byte output and assert json.dumps() succeeds.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/scripts/test_check_deliberate_break.py Extends regression coverage to ensure byte outputs don’t break JSON serialization.
scripts/check_deliberate_break.py Normalizes git archive failure stdout/stderr to text in the gate result payload.
templates/consumer-repo/scripts/check_deliberate_break.py Mirrors the same normalization change in the consumer template copy to maintain parity.

@stranske-keepalive

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 530766b
Latest Runs: ⏳ pending — Gate
Required contexts: summary
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 76.18%
Baseline 85.00%
Delta -8.82%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske
stranske merged commit 76033f4 into main Aug 4, 2026
50 checks passed
@stranske
stranske deleted the codex/gate-review-followups branch August 4, 2026 09:33
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.

3 participants