Delphi-RAG-Lint

drag-lint help

doc-engine-refresh: engine-written doc text is behind the index

Since: 1.61.0-alpha

Lint rule (ON, info, fixable) split from doc-drift: a facts block or marked <summary> drag-lint wrote is behind the index; doc-drift keeps human-written text.

Read this when lint reports doc-engine-refresh and you want to know what changed and how to clear it. Nothing a person wrote is wrong: the text drag-lint itself wrote (the drag-lint:auto facts block, a marked summary) is behind the index. One lint --fix, or document --apply, refreshes it.

How to run it

drag-lint lint-all --db <db> [--rule doc-engine-refresh] [--fix --apply --fix-rule doc-engine-refresh] (documentation rule, ON, info: a managed facts block or marked <summary> is behind the index; --fix regenerates it)

Full flag list: lint-all in the CLI reference.

Flags

FlagArgumentMeaningDefault
--db<db>
--rule<id>
--fix-rule<id>

Where to click

No IDE surface: this feature runs from the CLI (see How to run it).

Needs: index

Details

Lint rule, ON by default, severity info, fixable. New in 1.61, split out of doc-drift.

What it means

The text drag-lint itself wrote into a doc comment is behind the index:

  • the managed facts block between <!-- drag-lint:auto BEGIN --> and <!-- drag-lint:auto END --> (Called from:, Used by:, Calls:, Complexity: ...) differs from what a fresh render would write -- a caller was added or removed, a routine was renamed, a fact line is over the width limit; or
  • a marked (engine-owned) <summary> no longer matches the source comment it was harvested from.

Nothing a person wrote disagrees with the code. That is the difference from doc-drift, which since 1.61 means exactly that: a human-written part of the doc (a <returns> on a procedure, an <exception cref> the routine never raises, a code identifier that is gone ...) is wrong.

Why the split: on ORM3 (1.60 FP-NOISE) 10 of 10 sampled doc-drift findings were stale engine blocks and none came from a code change, so the warning drowned the findings a person has to act on.

Clearing it

drag-lint lint-all --db <db> --fix --apply --fix-rule doc-engine-refresh
drag-lint document --unit <file.pas> --db <db> --apply

Either regenerates the block from the index. Reindex first if you edited code since the last index: the facts are read from the index.

A block that names units this index does not hold (a test caller seen only by another project's index) is reported with -- names facts in unit(s) this index does not hold; not auto-fixed; the fix leaves it alone so it does not delete true facts.

Changed in 1.61: lint <file> --rule doc-drift --fix --apply no longer refreshes a stale facts block, because that finding is now doc-engine-refresh. --rule takes one id, so a script that used --rule doc-drift --fix to refresh facts blocks now passes --rule doc-engine-refresh.

What is not reported

  • A file name that differs only in letter case: (uCaller.pas) vs (UCALLER.PAS). The renderer prints the file name as the index stored it, and that spelling follows the path given to index, so it can flip between runs. Since 1.61 file names in the block compare case-insensitively.
  • Entry order in an inbound list (Called from:, Used by: ...), by owner ruling 2026-09-06.

Rule ids from the same analysis

idseveritymeaning
doc-driftwarninghuman-written doc text disagrees with the code
doc-engine-refreshinfoengine-written doc text is behind the index
doc-param-not-in-signatureerrora <param> names a parameter the routine does not have
doc-param-no-descriptionwarninga <param> tag has no description

--fix on any of them regenerates the whole managed comment of that declaration once; hand-written prose is kept.

Guard: tests\autotest\run_v161_docdrift_split.ps1.


All features | CLI reference | IDE menus