[codex] Extract sentinel handling - #82
Merged
Merged
Conversation
Merging this PR will degrade performance by 16.4%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | test_walltime_throughput[pypy] |
2.2 ms | 2.6 ms | -16.4% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing codex/extract-sentinel-handling (9cd1dda) with main (0cf2744)
yisding
marked this pull request as ready for review
June 28, 2026 06:54
The sentinel extraction left five forwarding wrappers in processor.py with no callers: process() now delegates straight to _sentinel.build_sentinel_escape_tables, and no test references them. Remove the dead stubs, keeping the three wrappers (_iter_noncharacter_ delimiters, _absent_noncharacter_delimiter, _build_sentinel_escape_tables) and the module-level aliases that the monkeypatch tests and the process() disjoint gate still depend on. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
docs/architecture.mdto document the current layers, processor pipeline, invariants, and refactor protocol.sentencesplit/_sentinel.py.Impact
This reduces
processor.pycomplexity without changing public segmentation behavior. Sentinel escaping remains private implementation machinery, and the processor continues to own the pipeline order.Validation
.venv/bin/ruff format --check ..venv/bin/ruff check ..venv/bin/mypy.venv/bin/python -m pytest tests/ --color yes(10502 passed, 14 skipped, 113 xfailed)