Skip to content

Commit a5fd527

Browse files
committed
fix(lint): one list of consequences in the stored-metadata reference refusal
Claude-Session: https://claude.ai/code/session_019oFY6Hi35J7atvgVFnmoaK Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6c2c70f commit a5fd527

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎packages/lint/src/validate-expressions.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,13 +1787,14 @@ function storedMetadataBodyHopMessage(
17871787
* hop refusal alone.
17881788
*/
17891789
function storedMetadataBodyReferenceMessage(field: string, type: string, target: string): string {
1790-
const parent = type === 'master_detail'
1791-
? ', and this object\'s `parent` root stays unbound, so every write a `parent` rule judges is refused'
1792-
: '';
1790+
const consequence = type === 'master_detail'
1791+
? 'a formula or a validation rule never reads through the field, and this object\'s `parent` root stays '
1792+
+ 'unbound, so every write a `parent` rule judges is refused'
1793+
: 'and a formula or a validation rule never reads through the field';
17931794
return `\`${field}\` is a \`${type}\` whose \`reference\` names '${target}', a table of stored metadata. `
17941795
+ 'A `lookup` or `master_detail` field may not target a stored-metadata-body table: the engine never '
1795-
+ 'hydrates one, so `$expand` keeps the stored id and never nests the row, and a formula or a validation '
1796-
+ `rule never reads through the field${parent}. Those rows carry stored metadata bodies, served only `
1796+
+ `hydrates one, so \`$expand\` keeps the stored id and never nests the row, ${consequence}. `
1797+
+ 'Those rows carry stored metadata bodies, served only '
17971798
+ 'through the metadata API (`GET /api/v1/meta/:type/:name`), where the body is projected; to point a '
17981799
+ 'record at a metadata item, store its type and name in `text` fields instead. '
17991800
+ STORED_METADATA_BODY_PRESCRIPTION;

0 commit comments

Comments
 (0)