Severity
High — junk Account.attributes.type/.url columns in grid and files for any relationship query.
What happens
flattenRecord only skips attributes when path === 'attributes' (top level). SELECT Id, Account.Name FROM Contact returns Account: { attributes: {...}, Name }; the visitor recurses into Account.attributes and emits Account.attributes.type/Account.attributes.url as real columns in the grid, deriveColumns, and CSV/JSON/Excel/XML output. Because Salesforce puts attributes first, these junk columns also consume slots in the 14-column default selection ahead of the actual Account.Name. The existing test only covers the top-level case.
Evidence
src/ui/utils/records.ts:27
tests/unit/ui-utils.test.ts:5 (fixture lacks nested attributes)
Suggested fix
Skip when the key segment is attributes (e.g. if (k === 'attributes') continue; in the plain-object loop) rather than comparing the full path.
Environment
Commit 74cf21b (main), WaveLink 0.6.0. Found in the 2026-08-31 adversarial audit (code-verified).
Severity
High — junk
Account.attributes.type/.urlcolumns in grid and files for any relationship query.What happens
flattenRecordonly skipsattributeswhenpath === 'attributes'(top level).SELECT Id, Account.Name FROM ContactreturnsAccount: { attributes: {...}, Name }; the visitor recurses intoAccount.attributesand emitsAccount.attributes.type/Account.attributes.urlas real columns in the grid,deriveColumns, and CSV/JSON/Excel/XML output. Because Salesforce putsattributesfirst, these junk columns also consume slots in the 14-column default selection ahead of the actualAccount.Name. The existing test only covers the top-level case.Evidence
src/ui/utils/records.ts:27tests/unit/ui-utils.test.ts:5(fixture lacks nested attributes)Suggested fix
Skip when the key segment is
attributes(e.g.if (k === 'attributes') continue;in the plain-object loop) rather than comparing the full path.Environment
Commit
74cf21b(main), WaveLink 0.6.0. Found in the 2026-08-31 adversarial audit (code-verified).