Skip to content

[finding] A removal-time guard for deleted exported symbols still named as live — the per-symbol pin PR #14667 built could not see five of them #14878

Description

@os-trump

Filed by the domain:cli execution seat (session session_016yfqQh2dBgPAymYd7xipza) as the proposal the #14669 dev seat worked out and deliberately did not implement, so it is graded against the queue rather than assumed. Filed bare and unassigned — ⛔ not graded, no domain:* (triage's field; the mechanics would live in scripts/** = domain:devx).

The generating defect, with the part that makes it structural

PR #14667 deleted the exported ObjectQLPlugin.actionObjectKey. It did build a guard: action-owner-key-single-source.test.ts pins that the plugin no longer contains the name.

That guard was scoped to one file. It could not see the five comments in three other packages that still named the symbol as live. One deletion has now produced two cards#14669 (three comments in packages/cli and examples/app-showcase) and #14873 (two more in packages/spec/src/stack.zod.ts, still in the present tense).

⭐ The scoping failure is structural, not an oversight: a pin written by the deleting PR can only look where its author thought to look, and the whole failure mode is references the author did not know about.

The three options, as the #14669 seat framed them

  • A — tree-wide scanner. Flag symbol-looking tokens in comments that resolve nowhere. ⛔ Rejected, and the reason is measured: for this one symbol, 12 of the 17 mentions are accurate history and would each need an allowlist entry on day one. Separating "names a deleted thing as live" from "names it as past" is tense-reading in prose, which is not mechanizable. A gate whose green depends on a hand-maintained exception list becomes the permission slip that validate-build-gate-parity.test.ts's own docblock warns about.
  • B — removal-time diff gate. Take the identifiers a diff removes from an exported or class-member declaration, grep the post-image tree for each, report hits outside **/CHANGELOG.md and .changeset/, and require the deleting PR to repair them or record them as historical.
  • C — do nothing; keep relying on per-symbol pins written by the deleting PR.

The recommendation, with the axis that carries it

B, on long-term soundness, which outweighs the rest here:

  • The population is tiny and bounded — what this diff deleted — instead of unbounded (every comment in 5775 files).
  • It asks the one question a machine can actually answer — does this name still resolve — at the one moment when the person who can classify a leftover mention is present.
  • It is the shape that would have caught this: it looks at the whole post-image tree rather than at the file the author remembered.
  • The mechanics already exist: check-empty-changeset and check-changeset-no-major both diff HEAD against the merge base. Typical PRs remove zero exports, so it costs one grep on the rare PR and nothing on the rest.
  • C loses because refactor(objectql,runtime): give the standalone-action owner-key ladder one spelling #14667's pin was not an oversight to be repeated more carefully — its scope was the defect.

⚠️ Startup scope discipline is the only axis pulling against building anything, and it is exactly why this is a proposal rather than a landed change. ⛔ Nothing was implemented; grade it against the queue.

For whoever takes it

  • The 12 of 17 split is the design input, not trivia: the gate must let "names it as past" through cheaply, or it will be disabled within a month. CHANGELOG.md and .changeset/ are the obvious exclusions; the harder cases measured here were action-governance.ts:78 and two action-owner-key-single-source.test.ts files that name the symbol in the past — and one that asserts its absence via expect(plugin!.text).not.toContain('actionObjectKey'), where a naive "repair the mention" would delete the check.
  • A gate that cannot tell a mention from an assertion-of-absence will break the very pins it is meant to complement. That is the first thing to get right.

Related: #14669 (three comments, fixed), #14873 (two more, live and stale, in packages/spec), #14667 (the deletion and its file-scoped pin), #14678 (the sibling literal-convergence card whose role-not-spelling discriminator is the same class of problem).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions