Skip to content

Replace the Prose Gate's Line Ceiling with a Check for Vocabulary in the Script #3441

Closed

Description

@ptr727

Problem

TestHarness.test_the_gate_stays_under_its_size_ceiling in tests/test_prose_lint.py caps .github/actions/prose-gate/prose_lint.py at a line count, now 1862. Its docstring names what the cap is for: "Vocabulary and exemptions live in the data file, so the script holding them is a defect." A line count cannot tell that defect apart from parser logic, so every lexer fix that adds lines either moves the ceiling or compacts unrelated code to fit. The ceiling moved from 1800 to 1840 on #3427 and from 1840 to 1862 on #3437, and #3439 had to rewrite three untouched functions to stay inside it.

Decision

The maintainer chose, on 2026-10-24, to replace the line count with a check aimed at the concern itself.

What fixing it needs

A test that fails where prose_lint.py holds vocabulary or exemption data that belongs in prose-gate.json. Candidate shapes, to be judged in the lane:

  • No module-level set, frozenset, list, tuple, or dict literal of more than a small number of string elements. GIT_LOCATION, an environment-variable list rather than prose vocabulary, is the one existing case to settle explicitly.
  • No string literal matching an entry of the data file's word and phrase lists (spelling, dupword_allow, spelling_allow, the exemption lists), so a word copied from the data into the script fails.

Either way, the line-count assertion is removed in the same change, and the test proves itself by failing on a constructed script that carries a vocabulary list.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions