GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(claude): bound streamed reasoning identity by luvs01 · Pull Request #1377 · lidge-jun/opencodex

Conversation

@luvs01

@luvs01 luvs01 commented Aug 9, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Summary

  • Replace retained raw reasoning item_id and part-index strings with fixed-size SHA-256 identities.
  • Preserve same-item/same-part equality and distinct item/part \n\n boundaries, including malformed string and array metadata, instead of collapsing all invalid identities to one sentinel.
  • Keep ordinary numeric protocol indexes compact and add large-identity and malformed-array regressions.

Verification

  • Bun 1.3.14: bun test tests/claude-outbound.test.ts — 38 passed.
  • bun run typecheck — passed.
  • bun run privacy:scan — passed.
  • git diff --check HEAD^ HEAD — passed.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • No documentation change is required for this internal stream-state hardening.
  • The branch is based on the latest dev.

Review readiness checklist

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of reasoning summaries with very large or malformed identifiers.
    • Preserved distinct thinking blocks when item and part identities differ.
    • Prevented oversized upstream values from affecting reasoning metadata boundaries.
  • Tests

    • Added regression coverage for large identifiers and malformed values.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the bug Something isn't working label Aug 9, 2026
@github-actions

github-actions Bot commented Aug 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

✅ 4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently. If no CodeRabbit review appears, comment @coderabbitai review to request one.
Maintainers: @lidge-jun @Ingwannu @Wibias

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wibias ChatGPT Codex Connector

Wibias commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Please rebase this PR onto the latest dev (e8ce2b93dd3ef8074d96dee407704c5dc06e2699) before merge, then rerun the exact-head CI checks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@luvs01
fix(claude): bound streamed reasoning identity
6087441
@luvs01
luvs01 force-pushed the agent/bound-reasoning-part-key branch from 3ca029b to 6087441 Compare August 9, 2026 23:25
@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c7608e86-99da-4408-80db-6f6bd4734541

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Claude outbound path now creates bounded SHA-256 identities for reasoning metadata. Thinking-block keys preserve item and part distinctions without retaining large upstream values. Tests cover large, repeated, changed, and malformed identities.

Changes

Reasoning identity boundaries

Layer / File(s) Summary
Bounded identity construction
src/claude/outbound.ts
Adds fixed-size identity helpers for reasoning metadata and uses them in thinking-block keys while preserving item and part distinctions.
Identity boundary regression coverage
tests/claude-outbound.test.ts
Tests large identifiers, repeated identities, changed identities, and malformed array-valued identities.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • lidge-jun/opencodex#944: Both changes modify reasoning-part identity and thinking-block boundaries.
  • lidge-jun/opencodex#953: Both changes update reasoning-block identity tracking in src/claude/outbound.ts.
  • lidge-jun/opencodex#1320: Both changes update Claude outbound reasoning boundary behavior and regression tests.

Suggested reviewers: lidge-jun, wibias, ingwannu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: bounding streamed Claude reasoning identities.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wibias
Wibias marked this pull request as ready for review August 9, 2026 23:45
@Wibias
Wibias requested review from Ingwannu, Wibias and lidge-jun as code owners August 9, 2026 23:45
@luvs01

luvs01 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the review-ready label Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Rate Limit Exceeded

@github-actions[bot] have exceeded the limit for the number of chat messages per hour. Please wait 48 minutes and 28 seconds before sending another message.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== PR metadata =='
gh pr view 1377 --repo lidge-jun/opencodex --json number,headRefOid,baseRefOid,commits,title,url

echo '== Changed files and diff =='
git diff --find-renames origin/dev...HEAD -- src/claude/outbound.ts tests/claude-outbound.test.ts

echo '== Source outline =='
ast-grep outline src/claude/outbound.ts --items all --view expanded

echo '== Relevant source references =='
rg -n -C 5 -e 'thinking|reasoning|summary_index|item_id|createHash|sha256' src/claude/outbound.ts

echo '== Relevant test references =='
rg -n -C 8 -e 'thinking|reasoning|summary_index|item_id|large|malformed' tests/claude-outbound.test.ts

Length of output: 1654


🏁 Script executed:

#!/bin/bash
set -u

echo '== PR diff from GitHub =='
gh pr diff 1377 --repo lidge-jun/opencodex -- src/claude/outbound.ts tests/claude-outbound.test.ts || true

echo '== Source outline =='
ast-grep outline src/claude/outbound.ts --items all --view expanded || true

echo '== Relevant source references =='
rg -n -C 7 -e 'thinking|reasoning|summary_index|item_id|createHash|sha256' src/claude/outbound.ts || true

echo '== Relevant test references =='
rg -n -C 10 -e 'thinking|reasoning|summary_index|item_id|large|malformed' tests/claude-outbound.test.ts || true

Length of output: 39555


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== Changed-file patches =='
gh api --paginate 'repos/lidge-jun/opencodex/pulls/1377/files?per_page=100' \
  --jq '.[] | select(.filename == "src/claude/outbound.ts" or .filename == "tests/claude-outbound.test.ts") | "FILE: \(.filename)\n\(.patch)\n"'

echo '== Streaming parser and budget context =='
sed -n '218,410p' src/claude/outbound.ts

echo '== SSE decoding and payload handling references =='
rg -n -C 6 -e 'JSON\.parse|sseFieldValue|translatorBudget|reserve|replaceRetained' src/claude/outbound.ts src/lib/sse-decoder.ts src/lib/translator-budget.ts

Length of output: 66764


@github-actions[bot] I reviewed the current PR head 6087441bded742e3bc9ec813ba6628fa640c2874.

I found no correctness issue in the reviewed change.

src/claude/outbound.ts Lines 28-46 creates bounded identities for strings and arrays. Lines 388-401 preserve \n\n boundaries when the reasoning item or part changes.

tests/claude-outbound.test.ts Lines 309-360 cover large string identities and distinct malformed array identities.

I did not execute repository tests in this review. The readiness gate reports that all required checks passed.

⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Wibias
Wibias merged commit 8667e09 into lidge-jun:dev Aug 10, 2026
31 of 35 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Wibias ChatGPT Codex Connector

Wibias commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Thanks @luvs01 — nice stream-state hardening. Hashing oversized reasoning identities keeps the equality/boundary semantics intact without retaining attacker-sized metadata, and the malformed-identity regressions cover the tricky cases well. 🙏

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

agentHits pushed a commit to agentHits/opencodex that referenced this pull request Sep 17, 2026
@Wibias
Merge pull request lidge-jun#1377 from luvs01/agent/bound-reasoning-p…
f391e8b
…art-key

fix(claude): bound streamed reasoning identity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lidge-jun lidge-jun Awaiting requested review from lidge-jun lidge-jun is a code owner
@Ingwannu Ingwannu Awaiting requested review from Ingwannu Ingwannu is a code owner
@Wibias Wibias Awaiting requested review from Wibias

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug Something isn't working review-ready

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@luvs01 @Wibias
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.