Skip to content

Drop stale PLACEHOLDER annotations that shadow upstream descriptions#5588

Draft
janniklasrose wants to merge 2 commits into
rethink-annotationsfrom
janniklasrose/sync-missing-annotations
Draft

Drop stale PLACEHOLDER annotations that shadow upstream descriptions#5588
janniklasrose wants to merge 2 commits into
rethink-annotationsfrom
janniklasrose/sync-missing-annotations

Conversation

@janniklasrose

@janniklasrose janniklasrose commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Changes

description: PLACEHOLDER markers are now dropped when cli.json documents the field: newAnnotationHandler strips them before the merge, so the upstream description flows into the schema, and the sync step rewrites annotations.yml without them in the same run.

  • Placeholders for genuinely undocumented fields are kept (still the TODO marker).
  • Entries that also carry hand-written data (e.g. deprecation_message) lose only the placeholder.
  • Most of the diff is regeneration: annotations.yml −487 lines (deletions only), both schema artifacts gain the same 128 description lines.

Stacked on #5574, which stays byte-identical; this is the behavior change on top.

Why

A PLACEHOLDER means "no documentation anywhere". It is added when a field first appears undocumented, but nothing removed it once upstream docs arrived. The annotations file overrides upstream docs in the merge and PLACEHOLDER is skipped when assigning descriptions, so the schema ended up with no description at all — the stale marker hides the real text and then discards itself. 154 fields were affected (e.g. vector_search_endpoints.*.target_qps). The file cannot self-heal: a shadowed field never registers as missing, so the backlog only grows.

This also fixes the bare [Public Preview] prefixes seen in the launch-stage work (#5443): the prefix was there, but the description it should prefix was swallowed by this bug.

Tests

  • Table test for the strip plus a handler-level test asserting the merged view resolves the upstream description while preserving hand-written fields.
  • TestRequiredAnnotationsForNewFields now also records deletes/updates during regeneration (previously a nil-visitor panic) and asserts regeneration of the committed file is a no-op, enforcing idempotency.
  • Regeneration verified byte-idempotent across runs; task fmt, checks, full lint, and full test (unit + acceptance) pass locally.

This pull request and its description were written by Isaac, an AI coding agent.

A `description: PLACEHOLDER` marks a field that has no documentation
anywhere. It is added when a field first appears undocumented, but was
never removed when cli.json later gained a description for the field.
Because the annotations file overrides upstream docs in the merge, the
stale marker shadowed the real description, and since PLACEHOLDER is
skipped when assigning annotations, the schema emitted no description
at all (e.g. `vector_search_endpoints.*.target_qps`).

Strip such placeholders in newAnnotationHandler before the merge: the
upstream description shows through, and because the pruned map is what
syncWithMissingAnnotations writes back, the annotations file sheds the
stale markers in the same run. Entries that carry other hand-authored
fields (e.g. deprecation_message) lose only the placeholder. Fields
that are genuinely undocumented keep their TODO marker, so the result
is idempotent.

TestRequiredAnnotationsForNewFields now also records deletes and
updates during regeneration instead of nil-panicking on them, so any
future non-idempotent rewrite of annotations.yml fails with a message
instead of a panic.

Co-authored-by: Isaac
Co-authored-by: Isaac
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.

1 participant