Skip to content

fix(responses): recover from null output items - #104

Closed
PsiACE wants to merge 1 commit into
tests/recorded-provider-goldensfrom
fix/responses-null-output-items
Closed

PsiACE wants to merge 1 commit into
tests/recorded-provider-goldensfrom
fix/responses-null-output-items

Conversation

@PsiACE

@PsiACE PsiACE commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Ignore Responses output-item added/done events whose item is absent or null, preserving subsequent valid text and tool calls.

The public OpenAI streaming test replays the exact event construction from openai-python@59738a2, test_stream_preserves_output_after_empty_item, with missing=False, index=0 and null_completion=True. The numbered SSE input includes upstream sequence numbers; its SHA-256 and license are documented in the shared golden directory.

This is a synthetic SDK robustness case, not a production recording. This layer makes no non-streaming or Copilot-specific changes.

Stack

Commit ancestry: main (including #102) → #101 → #103 → #104 → #105.

#103 and #104 target their preceding layer for incremental review. #105 targets main and integrates all four layer commits. Merge #105 with a merge commit only after all four current heads have passing native checks and a matching Landing allow. Preserving ancestry lets GitHub mark the lower layers as indirectly merged. Do not squash/rebase the integration merge.

Validation

  • Candidate: 809ecce383dba8ea484c41f8b2d25c96a73afab8.
  • uv run pytest -q — 597 passed.
  • uv run prek run --all-files — passed.
  • uv run ty check — passed.
  • Native CI runs on this candidate; Landing is a separate merge gate.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Landing: block · 809ecce

  • Copilot gap reopened: null output_item items still crash github-copilot responses streams at _stable_tool_id (finding); the branch rewrite dropped the earlier repair that had resolved it.

@github-actions github-actions Bot 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.

One gap keeps the null-item crash reachable for github-copilot responses streams (inline). Also minor: the description's "Reject other non-object items" no longer has an implementation or test — a non-object item reaches payload["item"].get(...) and raises AttributeError, not a controlled error. Either restore that guard or amend the claim.

Comment thread src/republic/formats/responses.py Resolved
@PsiACE
PsiACE force-pushed the tests/recorded-provider-goldens branch from b35523c to c57626f Compare November 13, 2026 16:19
@PsiACE
PsiACE force-pushed the fix/responses-null-output-items branch from 503ad9a to 809ecce Compare November 13, 2026 16:19

@github-actions github-actions Bot 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.

The Copilot gap I withdrew earlier is back as a result of the branch rewrite; details inline.

Comment thread src/republic/formats/responses.py Resolved
@PsiACE

PsiACE commented Nov 13, 2026 •

Copy link
Copy Markdown
Member Author

Landing: allow · 809ecce

  • No blocking findings. The Copilot null-item finding was withdrawn after base/candidate comparison (reassessment) and that thread is resolved; github.py is identical to base. Current scope, checks and evidence boundary: review.

@github-actions github-actions Bot 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.

Landing: allow · 809ecce

The Copilot null-item gap was withdrawn on this exact SHA after base/candidate comparison (reassessment) and its thread is resolved, so no blocking finding remains against the current diff.

Scope is unchanged: src/republic/formats/responses.py plus the golden case, its README note and one golden test. At this head the case passes (597 tests), the recorded 0.sse SHA-256 matches the README, src/republic/providers/github.py is identical to base, and Main CI run 43461634187 succeeded. The evidence boundary is unchanged — the null-item case stays pinned to the upstream OpenAI SDK example with no Copilot-specific claim.

@PsiACE

PsiACE commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Incorporated into main through the top-of-stack merge of #105, merge commit 02ab86123f3def1795ed0479bf5ab71a74f46c00. Verified that this candidate, 809ecce383dba8ea484c41f8b2d25c96a73afab8, is an ancestor of main; all four stack candidates had current-head Landing allow decisions and passing native checks before the merge. GitHub left this PR open because its base is the lower stack branch, and refuses retargeting to main because there are no new commits. Closing as already incorporated, without an additional merge or any branch rewrite.

@PsiACE PsiACE closed this Nov 13, 2026
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