Skip to content

Decide How prose_lint's Semicolon Check Treats a Lone Semicolon After a Colon (#1396) #2736

Closed

Description

@ptr727

Question

How should prose_lint.py's semicolon check treat a sentence with exactly one semicolon after a colon, so that #1396's over-exemption closes?

Today a sentence is exempt when it holds two or more semicolons, or a colon before its first semicolon, and it also carries a comma. An explanatory colon therefore exempts a later clause-joining semicolon.

Why this needs a decision

No structural test separates an explanatory colon from a list colon when the sentence holds one semicolon. Measured on develop at f905191:

  • The live Settle the Preamble Decisions and Reshape Section 4, Section 6 and the YAML Conventions #1395 instance carries two commas between its colon and its semicolon. So "require a comma series between the colon and the semicolon" (the issue's first suggestion) does not catch it.
  • The tests pinned exempt in test_a_colon_introduced_list_whose_items_carry_commas_keeps_its_semicolon have the same shape as the defect. That shape is a leading colon, commas, and one semicolon followed by an independent clause. For example: Match the heading style: title case with short bind words (a, an, the, of); hyphenated compounds capitalize both parts. That test's docstring records a decision to keep the colon arm for these shapes.
  • So the handoff's two done criteria conflict. They are "a constructed explanatory colon + comma + one clause-joining semicolon is reported" and "the currently exempt tests stay exempt". Closing the hole means flipping a pinned exemption. Keeping the exemption means narrowing the hole with a heuristic.

Options

  1. (Recommended) Treat a lone semicolon as a list separator only when the item after it is labeled too. One example is Inputs: a, b, and c; outputs: d and e. A sentence with two or more semicolons plus a comma stays exempt as now. Reason: this follows the gate's own posture ("the rule bans the construction, not a detectable subset, so a prose semicolon flags by default"). It is also the issue's own "cheapest discriminator", since a single semicolon is never a serial-semicolon list. A recast as a comma or two sentences is always available. Effect on the work: the live instance and any constructed explanatory-colon splice are reported. Two pinned shapes in the colon-arm test flip to reported, and so does the e.g. abbreviation test's sentence. That test can be rebuilt as a series that still guards abbreviation splitting. Five distinct tree lines need a recast. They are WORKFLOW.md lines 54, 181, and 294, plus their generated skill-reference copies, and catalog/snippets/vscode/README.md lines 17 and 18. WORKFLOW.md is carried content, so the recast reaches the fleet on the next resync.
  2. Keep every current exemption, and exempt the colon arm only when no comma comes before the colon. In that case the colon leads its sentence as a label and does not end a comma-bearing clause. Reason: there is no tree or test churn, and it catches the live instance, whose colon follows a comma-bearing opening clause. Effect on the work: zero tree lines flip, and every pinned test holds. It narrows the hole without closing it. An explanatory colon with no comma before it still exempts a splice. The handoff warns about exactly this kind of fix: one that "shrank the hole rather than closing it".
  3. Accept the limit and close prose_lint's Semicolon Exemption Fires on an Unrelated Colon in the Same Sentence #1396 as not planned. The gate cannot tell an explanatory colon from a list colon, and reviewers catch the rest. Reason: there is no heuristic to maintain. Effect on the work: nothing changes, and the lane closes out with no pull request.

Context

  • Handoff: Session Handoff [auto-1396]: Fix the Prose Gate's Semicolon Over-Exemption (#1396) #2735 (track auto-1396). The lane is parked on this issue.
  • Blocks no pull request. No branch was pushed and no pull request was opened. This decision does not block the open develop -> main promotion pull request.
  • The answer is enough for a later worker to implement the fix: the check at check_file's semicolon branch, its tests in tests/test_prose_lint.py (TestSemicolon, TestSemicolon2), and any recasts.

Activity

  1. added
    decision
    on Oct 10, 2026
  2. ptr727 commented on Oct 10, 2026

    @ptr727
    OwnerAuthor

    Answered by the maintainer: option 1. A lone semicolon after a colon is exempt only when the item after it is labeled too (for example Inputs: a, b; outputs: c). Two or more semicolons plus a comma stay exempt as now. The pinned colon-arm shapes flip to reported, and the tree lines the measurement named are recast. Implementation proceeds on #2735's lane (track auto-1396).

  3. removed
    decision
    on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions