Skip to content

fix: distinguish lettered list markers from initials - #167

Closed
mldangelo-oai wants to merge 5 commits into
mainfrom
mdangelo/codex/lettered-lists-20260913
Closed

mldangelo-oai wants to merge 5 commits into
mainfrom
mdangelo/codex/lettered-lists-20260913

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Keep leading name initials attached to their list item by requiring an item body before accepting the next marker. Match letter families without casing in neutral mode, retain combining marks, and preserve opposite-case marker-shaped tokens as body text.

Validation: 761 tests with coverage thresholds, source/test type checks, Biome, and packed-package consumers passed. Regressions cover consecutive initials, mixed-case bodies and labels, Greek/Spanish labels, expanding case mappings, and large-list memory use.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T17:58:32.572203Z eef87d4 Manual request
🔒 Security Review Completed 2026-09-14T17:58:28.959712Z eef87d4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5704539ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils.ts Outdated
Comment thread src/utils.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

const nextLetter = String.fromCodePoint((label.codePointAt(0) as number) + 1);

P2 Badge Handle alphabet gaps when advancing list labels

For Greek lettered lists that advance from rho to sigma (for example, ρ. First σ. Second or Ρ. First Σ. Second), incrementing the Unicode code point produces final sigma ς or the unassigned U+03A2 rather than the alphabetic successor. nextListMarker therefore rejects the second marker, and the normal sentence fallback missegments the input as ['ρ.', 'First σ.', 'Second']. Since the marker regex supports all Unicode cased letters, determine progression alphabetically rather than assuming consecutive code points.


const label = (caseNeutral ? previous.toLowerCase() : previous).trim();

P2 Badge Preserve neutral scoring for expanding case mappings

When a mixed-case list begins with a character whose lowercase mapping expands, such as İ. One j. Two, lowercasing previous makes this path recognize j. as the successor; however, the lowercase equivalent begins with i̇., which listMarkerReg cannot recognize because a combining mark occurs before the period. The two case-equivalent inputs are consequently segmented and tokenized differently: rouge.n(input, input.toLowerCase(), { caseSensitive: false }) returns 0.4 rather than 1 (and ROUGE-S/L regress similarly). Keep neutral list detection invariant under full Unicode case mappings.

AGENTS.md reference: AGENTS.md:L97-L99

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fc44ca6267

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils.ts Outdated
Comment thread src/utils.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32ea31fc6a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils.ts Outdated
@mldangelo-oai
mldangelo-oai requested a lite review from Copilot September 14, 2026 17:26
@mldangelo-oai

Copy link
Copy Markdown
Contributor Author

@codex review
@codex security review

Please run a fresh review of the current head, d72d788f3fa4c8d347cec7eb23b370ec7385c6bf, covering correctness, maintainability, and unnecessary complexity.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: d72d788f3f

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Copilot AI 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.

🟢 Approval recommended

No unresolved review issues were identified.

Pull request overview

Updates list segmentation to distinguish lettered markers from name initials, including Unicode case handling.

Changes:

  • Requires item content before accepting subsequent markers.
  • Supports mixed-case labels and combining marks.
  • Adds regression and performance tests.
File summaries
File Description
test/tests.ts Adds coverage for initials, Unicode labels, and long sequences.
src/utils.ts Refines list-marker detection and initial handling.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d72d788f3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/utils.ts
@mldangelo-oai
mldangelo-oai requested a lite review from Copilot September 14, 2026 17:55
@mldangelo-oai

Copy link
Copy Markdown
Contributor Author

@codex review
@codex security review

Please run a fresh review of the current head, eef87d4a4d43069add675a04b7c4601efa796856, covering correctness, maintainability, and unnecessary complexity.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: eef87d4a4d

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: eef87d4a4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI 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.

🟢 Approval recommended

No unresolved issues remain, with comprehensive regression coverage provided.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@mldangelo-oai

Copy link
Copy Markdown
Contributor Author

Covered by #156, now merged at 529539fa6acf85567cddca8c7292b47044d4a3b7 with all applicable main CI passing.

I checked the remaining behavior against #167 head eef87d4a4d43069add675a04b7c4601efa796856. All 17 original regression cases passed, unchanged, against the exact tree now on main. The source comparison confirms that main retains marked Unicode labels, case-neutral marker families, the requirement for a real item body before the next matching label, and complete leading initial chains (including the 10,000-initial case).

No unique fix remains to land from this PR, so I’m closing it as covered. The original tests were used as external verification; this does not claim that their blocks were added to the repository or that every parser output is identical. Contributor history and the branch are preserved.

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.

2 participants