Conversation
VisibleResponseStreamFilter holds visible text until a flush boundary so a local path is never split before redaction. The boundaries were only a newline and Chinese sentence punctuation, so an English answer surfaced only at a newline or after 160 characters, usually all at once at the end. Also end a sentence at '.', '!' or '?' followed by whitespace. Decimals, versions, file names and URLs have no whitespace after the point and never split, and the split lands on whitespace, which the length fallback already treats as a safe boundary. Signed-off-by: song <liusongstep@gmail.com>
A multi-sentence English stream surfaces each sentence once its trailing whitespace arrives, a version point never splits, and a protected path inside an English sentence redacts exactly as the unsplit text does. Signed-off-by: song <liusongstep@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Goal And Delivered Outcome
VisibleResponseStreamFilter(loopx/chat.py) holds visible answer text until a flush boundary so that a local path is never split before redaction. The boundaries were a newline and the Chinese sentence marks。!?only. An English answer therefore surfaced only at a newline or after 160 characters; a short multi-sentence English answer arrived all at once at the end of the Turn.loopx chatservice: before oneanswer.deltaat 7.64 s with all three sentences; after deltas at 2.06 s, 5.28 s and 7.65 s, one per sentence.main.Scope And Continuation
.,!or?now also end a sentence when followed by a space or tab. Decimals, versions, file names and URLs (no whitespace after the point) never split. The split lands on whitespace, which the existing length fallback already treats as a safe split point without a path check, so redaction safety is unchanged.Validation
integrationpassedpython examples/loopx-chat-agent-smoke.py: new cases — a version point (1.2) does not split, a trailing.waits for its whitespace, each English sentence surfaces once complete; a protected path inside an English sentence streamed in 7-character chunks redacts exactly likeredact_local_pathson the unsplit text. Existing long-English, long-Chinese and protected-path cases still pass.regression_paritypassed['', '', '', '']).unitpassedpytest tests/test_chat_event_retention.py tests/test_chat_agent.py tests/test_chat_dsh_adapter.py tests/test_chat_codex_goal.py: 103 passed, identical tomain.real_entrypointpassedloopx chatfrom this branch and frommain, each on an isolated synthetic registry with the same stub Codex app-server; SSEanswer.deltatimings as above._accept_visible; covered by the filter cases and the real stream. Abbreviations such ase.g.now flush slightly earlier, which only moves a chunk boundary.Frontend / Visual Evidence
answer.delta; English answers now arrive earlier).Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
N/A
Boundary Checklist
none.Signed-off-bytrailer (git commit -s).Future-facing refactor pass: considered making the boundary set configurable per locale; unnecessary, since the rule is locale-neutral punctuation plus whitespace.