Skip to content

Commit ea8564d

Browse files
committed
test(lint): empty RESIDUAL_THROWS — the nested-region rows were misattributed
Re-pointing the flow-node-list readers turned the sweep's `flows[].nodes[].config.body.nodes` arm red, demanding two throws that no longer happen. Reading the frames off the reverted tree showed why: neither was in `packages/spec`. `lintFlowPatterns` threw at its own `graph.nodes` reader (`lint-flow-patterns.ts:1529` on the reverted tree) and `validateStackExpressions` threw at `collectFlowVariableNames`' unguarded `graph.nodes` walk (`flow-variable-scope.ts:225`) — the two consumer sites this branch re-pointed. `collectFlowGraphs` forwards a non-record member of a nested list into the graph it yields rather than dereferencing it. So the rows had to go: the ratchet is exact in both directions and a row that demands a throw nobody performs is a lie. The docblock records the corrected attribution, and records just as plainly that this says nothing about whether the producer has a defect of its own reachable some other way. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
1 parent 91878c4 commit ea8564d

1 file changed

Lines changed: 23 additions & 18 deletions

File tree

packages/lint/src/non-record-object-entry.test.ts

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ const SWEPT_COLLECTIONS: readonly SweptCollection[] = [
399399
* "nothing throws" would have had to be deleted or weakened on the day it was
400400
* written, and would then never have caught the next one.
401401
*
402-
* Four rows have come out since it was written, each because the sweep went
402+
* Six rows have come out since it was written, each because the sweep went
403403
* red demanding a throw that no longer happens — which is the both-directions
404404
* half earning its keep, since no removal started with anyone going looking:
405405
*
@@ -421,29 +421,34 @@ const SWEPT_COLLECTIONS: readonly SweptCollection[] = [
421421
* `recordsOf` by #16751, with the COERCED array — never `flow.nodes` raw —
422422
* handed on to `collectFlowGraphs`, so the crash is removed rather than
423423
* relocated into `packages/spec`.
424+
* - `flows[].nodes[].config.body.nodes` / `lintFlowPatterns` +
425+
* `validateStackExpressions` — written down as ONE defect *inside*
426+
* `collectFlowGraphs`, on the reading that its region walk dereferences a
427+
* member of an inner list it had only `Array.isArray`-checked, and filed on
428+
* that basis. Re-pointing the readers above turned this row red demanding
429+
* two throws that no longer happen, and reading the frames off the reverted
430+
* tree showed the ATTRIBUTION was wrong: neither was in `packages/spec`.
431+
* `lintFlowPatterns` threw at its own `graph.nodes` reader, and
432+
* `validateStackExpressions` threw at `collectFlowVariableNames`' unguarded
433+
* `graph.nodes` walk — the two consumer sites #16751 re-pointed.
434+
* `collectFlowGraphs` FORWARDS a non-record member of a nested list into the
435+
* graph it yields rather than dereferencing it, so at this shape the crash
436+
* was always the consumer's. That is a statement about this shape and this
437+
* rule table only: it does not say the producer has no defect of its own
438+
* reachable some other way, and nothing here closes that question.
424439
*
425-
* ## The row it holds today, found by the arm that added it
440+
* ## It holds no row today
426441
*
427442
* It went from empty to two the moment a flow's inner node list became
428443
* addressable, which is the point #15793 was filed to make: this class was
429444
* closed three times over collections while the same defect stood untouched one
430-
* addressing mode away. #16751 has since taken the consumer-side half back out;
431-
* what stands below is the producer-side one.
432-
*
433-
* - `flows[].nodes[].config.body.nodes` / `validateStackExpressions` +
434-
* `lintFlowPatterns` (#16752) — neither rule's own reader is at fault here:
435-
* both throw from INSIDE `collectFlowGraphs`, whose region walk reads
436-
* `node.config` off a member of an inner list it checked only with
437-
* `Array.isArray`. No coercion at either call site reaches that list, which
438-
* is why #15793 stopped and filed the fork instead of widening a
439-
* `packages/spec` contract to tolerate malformed members.
445+
* addressing mode away. Both rows came back out on the change that re-pointed
446+
* the last of the flow-node-list readers, and the table is empty again. Empty
447+
* is this ratchet's resting state, not its retirement: it stays exact in both
448+
* directions, so a rule that starts throwing on any swept collection reds here
449+
* because it is not listed.
440450
*/
441-
const RESIDUAL_THROWS: Readonly<Record<string, readonly string[]>> = {
442-
// 2026-09-08 — #16752. Both entries are ONE defect in `collectFlowGraphs`,
443-
// surfacing through the two rules that call it. Removed together.
444-
'flows[].nodes[].config.body.nodes · null': ['lintFlowPatterns', 'validateStackExpressions'],
445-
'flows[].nodes[].config.body.nodes · undefined': ['lintFlowPatterns', 'validateStackExpressions'],
446-
};
451+
const RESIDUAL_THROWS: Readonly<Record<string, readonly string[]>> = {};
447452

448453
/**
449454
* Where a junk member still draws a finding no author's file justifies — the

0 commit comments

Comments
 (0)