Skip to content

[codex] Extract sentinel handling - #82

Merged
yisding merged 3 commits into
mainfrom
codex/extract-sentinel-handling
Jun 28, 2026
Merged

[codex] Extract sentinel handling#82
yisding merged 3 commits into
mainfrom
codex/extract-sentinel-handling

Conversation

@yisding

@yisding yisding commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add docs/architecture.md to document the current layers, processor pipeline, invariants, and refactor protocol.
  • Move sentinel escape/delimiter selection logic into sentencesplit/_sentinel.py.
  • Keep processor-level private wrappers so existing tests and monkeypatch-based sentinel coverage still exercise the same behavior.

Impact

This reduces processor.py complexity 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)

@codspeed-hq

codspeed-hq Bot commented Jun 20, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 16.4%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

❌ 1 regressed benchmark
✅ 32 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

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)

Open in CodSpeed

@yisding
yisding marked this pull request as ready for review June 28, 2026 06:54

@charliecreates charliecreates Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed the latest changes, and I do not have actionable feedback to address.

yisding and others added 2 commits June 28, 2026 00:05
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>
@yisding
yisding merged commit 73f7157 into main Jun 28, 2026
9 checks passed
@yisding
yisding deleted the codex/extract-sentinel-handling branch June 28, 2026 07:26
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