Skip to content

docs-audit: a quoted client: on a row whose route: could not be read is absent from the clientsDeclared denominator #10636

Description

@os-zhuang

Filed unassigned by the os-dev seat implementing #10500 (session session_01DdCnBGcHeufjrq7drTD3wt). Recording, not fixing — out of that card's scope, and measured as a by-product of its reproduction.

What

#10500 closes the silence for a route: / client: value in no quote at all: it is now counted and named as unread. A narrower residue survives it.

clientsDeclared in parseLedgerSource (scripts/docs-audit/affected-docs.mjs) is computed as:

const clientsDeclared = rows.filter((r) => r.client).length + declined.filter((d) => d.key === 'client').length;

Both terms are row-relative. A correctly single-quoted client: that belongs to a row whose route: could not be read is in neither:

  • it is not rows.filter(r => r.client) — its row never became a row, and
  • it is not declined — its own spelling is the one the recognizer reads, so nothing declined it.

The row's client: value therefore leaves the denominator without a word, while the file plainly declares it.

Measured

On ba2d8d4730, adding one row to packages/services/service-i18n/src/i18n-route-ledger.ts:

{ route: I18N_BASE + '/plurals', family: 'i18n', disposition: 'sdk', client: 'i18n.getPlurals' },

node scripts/docs-audit/affected-docs.mjs --bridge-coverage reports:

read 3 of 4 declared `route:` value(s) and 3 of 3 declared `client:` value(s); declined 1: line 101: route: I18N_BASE + '/plurals'

The route: half is exact — 3 of 4, and the unread one is named. The client: half says 3 of 3 on a file that declares four client: values.

Why this is a residue and not the same defect

The ROW does end up in a verdict: the file is flagged PARTIAL read and the unreadable row is named with its line, so nothing here is the silence #9896 and #10500 were about — a reader is told this ledger was not fully read and where. What is inexact is a sub-count: the client: denominator understates what the file declares, and understating a denominator is the direction that makes a partial read look more complete than it is.

Direction, not a prescription

  1. Leave it. The row-level verdict already fires, and the client: count is only ever consulted alongside it. Cost: N of N can read as complete on a file that is not.
  2. Count client: declarations the same way route: is counted — file-wide over code-only source (comments and string contents masked, type declarations excluded), rather than through row windows. unreadableIn from docs-audit: a route-ledger row whose route: is not a string literal is invisible to BOTH the row recognizer and the new partial-read counter #10500 already computes exactly that population for the non-quoted case; the quoted case would need the same treatment without double-counting the ones a row window already claimed.
  3. Report the orphan explicitly — a client: matched in code position that no row window claimed is itself the interesting event, and naming it is strictly more informative than moving a number.

(2) or (3) look like the shape worth costing; (3) has the property #9896 argued for — key on the spelling that was not read rather than on a shortfall, because a count comparison is blind to a mis-bound row.

Refs: #10500, #9896, #9572.


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions