Skip to content

debundle: drop the redundant run-hole keywords (OBJECT_PROPS / CLASS_REST / DECLARATORS_*) from the accepted language (post-dogfood) #2327

Description

@agentydragon

Problem

The read-off minimizer no longer emits the redundant list-hole keywords — anonymous object-property / class-member run holes render as ANYTHING (#2325), and declarator-run gaps now render as plain DECLARATORS (the positional _BEFORE/_BETWEEN/_AFTER suffixes were readability-only / not equality-binding, so they were dropped). But the matcher still accepts all of them as sugar:

  • OBJECT_PROPS / OBJECT_PROPS_* (object-literal and destructure-pattern run holes) — fully redundant with ANYTHING (object_property_list_hole_name / object_pat_prop_list_hole_name carry the ANYTHING fallback).
  • CLASS_REST — redundant with ANYTHING (is_class_rest_hole matches both).
  • suffixed DECLARATORS_* — redundant with plain DECLARATORS (the suffix is never matched, only used in hint text).

These could be dropped from the accepted language set entirely, simplifying the matcher (source_match/holes.rs), the keyword constants, and removing the now-only-for-coverage interchangeability tests.

Why this is gated (breaking change)

Removing acceptance breaks every existing selector that still uses these keywords. In-repo that's ~matcher tests + a few input fixtures, but the real exposure is the downstream gaffer-private spec, which validates against a pinned debundle release. So the order is:

  1. Dogfood re-apply (backlog top priority) re-synthesizes gaffer-private's selectors — the minimizer now emits ANYTHING / plain DECLARATORS, so this migrates the existing OBJECT_PROPS/CLASS_REST/DECLARATORS_* away.
  2. Then drop the keywords + their matcher branches + the *_and_anything_are_interchangeable_run_absorbers tests in ducktape.
  3. Bump the gaffer-private debundle pin.

Scope when unblocked

  • source_match/holes.rs: drop the hole_name_for(.., OBJECT_PROPS_HOLE_KEYWORD) / CLASS_REST_HOLE_KEYWORD branches (keep only the ANYTHING fallback); drop the DECLARATORS prefix-match (keep ANYTHING) or keep plain DECLARATORS and drop suffix tolerance.
  • Remove the now-unused keyword constants in source_match_holes.rs and holes_present.
  • Remove/replace the interchangeability tests in syntactic_holes_test.rs.

Follow-up to #2325 (stop-emitting) and the DECLARATORS-collapse PR.

https://claude.ai/code/session_011YQabfZ5jVoFSETefd27Bg

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