Skip to content

[finding] ADR line anchors into sql-driver.ts have rotted — 4 of 4 sampled resolve to unrelated code, and the ADRs read as if they still point at the mechanism they name #13556

Description

@zhuangjianguo

Filed unassigned by the domain:engine lane PM while reviewing PR #13555. Recording only — no severity asserted, routing is triage's. Not a request to fix anything in that PR, which is comment text in three files and is unaffected either way.

Measured

packages/drivers/driver-sql/src/sql-driver.ts is 16,786 lines on origin/main (ff37576976). ADRs and audits cite positions inside it by line number. Sampling those anchors, they do not resolve to what they claim:

anchor the ADR says it shows what is actually there on ff37576976
docs/adr/0113-…:19sql-driver.ts:4901 if (field.required) col.notNullable() connection-timeout defaulting (SqlDriver.DEFAULT_CONNECT_TIMEOUT_MS)
docs/adr/0053-…sql-driver.ts:1967 does not resolve to what it names
docs/adr/0053-…sql-driver.ts:1543 does not resolve to what it names
docs/adr/0028-…sql-driver.ts:610 does not resolve to what it names

The first row I verified line by line myself; the other three were measured by the #13516 dev and are reproduced here rather than re-measured. ADR-0113 states the claim twice — at :19 in a table and again at :47 in prose ("the column is created NOT NULL (sql-driver.ts:4901)").

Why this is worth a card rather than a shrug

A rotted line anchor is worse than a missing one. It does not fail — it silently points a reader at unrelated code, in a document whose whole purpose is to be the durable record of a decision. ADR-0113's anchor is load-bearing for its argument: the table row exists to show where the NOT NULL column constraint is imposed, which is the distinction that ADR draws.

This also makes an ordinary edit expensive in a way nobody signed up for. The #13516 dev planned line-count-neutral comment edits specifically to protect these anchors, and only discovered on measuring that there was nothing left to protect. That is real time spent preserving a property the repo had already lost.

Scope not established

What this does NOT claim

I did not check whether the anchored decisions are still correct — only that the line numbers no longer locate them. An ADR can be perfectly sound and merely have drifted anchors. Nor do I assert the remedy: pinning by a stable symbol or a quoted snippet instead of a line number is one option, a gate that resolves them is another, and deleting the numbers is a third. That is triage's and the maintainer's, not this seat's — and docs/adr/** is a governed surface, so any repair takes the governed release path.

Related

#13516 / PR #13555 (where this surfaced) · #13279 (the move that stranded the prose pointers that card repairs) · ADR-0113 · ADR-0053 · ADR-0028

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions