docs/solutions/logic-errors/ttl-staleness-audit-must-ignore-comments.md
PR #5317 adds a fleet guard requiring a seeded key's ttlSeconds to outlive
its maxStaleMin health gate. Its initial extractor searched the entire source
file for those labels. A prose comment before the real options could therefore
be parsed as configuration, making the audit skip that seeder instead of
failing loudly.
seed-aviation.mjs documents a separate health threshold before its
runSeed options; the broad maxStaleMin search captured 240), which is
not a numeric expression.seed-jodi-gas.mjs and seed-research.mjs.src.match(/maxStaleMin.../) search treated comments as config.Anchor both property matches to option lines:
const ttlM = src.match(/^\s*ttlSeconds:\s*([^,\n]+)/m);
const staleM = src.match(/^\s*maxStaleMin:\s*([^,\n]+)/m);
Add a regression assertion that the fleet audit includes
seed-aviation.mjs. Keep the two already-existing violations in the explicit
KNOWN_VIOLATIONS set rather than changing unrelated production TTLs; the
allowlist remains visible debt and the guard still rejects new violations.
Configuration properties in the seed scripts are indented option lines, while the misleading text is comment prose. Anchoring the match preserves the existing literal, arithmetic, and same-file constant resolution while excluding comments. The aviation assertion pins the precise prior failure mode, and the allowlist's anti-rot test ensures every deferred item remains a real violation.