Skip to content

Commit 7c2eeb8

Browse files
committed
docs(spec): state the tie exception of the extension formula-cycle check and the door's reading of a served name
Claude-Session: https://claude.ai/code/session_01FEkQ5mAXtyZgMs9QwfQzXE Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 88b22a1 commit 7c2eeb8

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

‎.changeset/33153-extension-formula-cycle.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Skills-docs: none owed — this PR edits `content/docs/deployment/validating-met
1515

1616
**Before:** the formula-cycle check ran on the object walk and named the object's declared formulas only. A formula an extension adds that reads itself (`a__c = record.a__c`), or two that read each other, was accepted at the build and the door; the engine never evaluated them, and they read null on every row.
1717

18-
**Now:** the cycle is found on the target as served (its declared fields with every kept extension's fields folded in), and each member an extension adds is refused with the object's own verdict and sentence (`expression-invalid`), located at the entry: `object 'TARGET' · objectExtensions[0] · field 'FIELD' expression` (`packages[j].manifest.` prefixed in a built artifact). It runs at the `object_extension` door (`422 INVALID_METADATA`) as in `os build`.
18+
**Now:** the cycle is found on the target as served (its declared fields with every kept extension's fields folded in), and each member an extension adds is refused with the object's own verdict and sentence (at the door, a name the target already serves included: the written definition is the one served) (`expression-invalid`), located at the entry: `object 'TARGET' · objectExtensions[0] · field 'FIELD' expression` (`packages[j].manifest.` prefixed in a built artifact). It runs at the `object_extension` door (`422 INVALID_METADATA`) as in `os build`.
1919

20-
**Unchanged:** a cycle among the object's own formulas, at the same location; a member the target declares on a cycle an extension closes keeps its location at the object, named once; a draft save (never gated); a stored row (judged only when it is published again). At the extension door a cycle among the target's own formulas is not charged to the extension write.
20+
**Unchanged:** a cycle among the object's own formulas, at the same location; a member the target declares on a cycle an extension closes keeps its location at the object, named once; a draft save (never gated); a stored row (judged only when it is published again). At the extension door a cycle among the target's own formulas, or a sibling package's, is not charged to the extension write, and a formula that only reads a cycle is not refused. A field two packages' extensions add at the same priority is not judged, since which definition the registry serves is registration order, so a cycle through it is not found.
2121

2222
**Fix:** before building or publishing again, break the cycle: have one formula on it read stored fields, or formulas that do not read it back.

‎content/docs/deployment/validating-metadata.mdx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,9 @@ object's own rules (#33217), with the same rule ids, at the door and in
622622
through another formula, is refused as one the object declares is (#33153):
623623
the cycle is found on the target as served, each member the entry adds is
624624
located at the entry (`object 'TARGET' · objectExtensions[0] · field 'FIELD'
625-
expression`), and a member the target declares keeps its location at the
626-
object.
625+
expression`), and in `os build` a member the target declares keeps its
626+
location at the object. At the door the written entry's fields are served over
627+
the target, so a name the target already serves is refused at the entry too.
627628

628629
**Declared enforcement that cannot run** is two rows for the mirror-image
629630
reason, and #4716 is where it split. That heading covers four rule ids, and

‎packages/spec/src/migrations/entries/semantic/18.object-extension-formula-cycle-refused.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ export const entry: SemanticMigration = {
3030
+ 'such a cycle among an object\'s declared formulas only, so one an extension adds was accepted and showed only '
3131
+ 'when records were read. It is now refused with the verdict and the sentence the object\'s own cycle gets '
3232
+ '(`expression-invalid`; at the door `422 INVALID_METADATA`), on each member the extension adds, located at the '
33-
+ 'entry; a member the object declares keeps its location at the object.',
33+
+ 'entry; a member the object declares keeps its location at the object. One exception: a field two packages\' '
34+
+ 'extensions add at the same priority is not judged, since which definition the registry serves is registration '
35+
+ 'order, so a cycle through such a field is not found.',
3436
acceptanceCriteria:
3537
'`os build` reports no `expression-invalid` finding naming a formula cycle at an `objectExtensions` entry, and '
3638
+ 'publishing each such extension again answers 200 with no such issue. Each of its formulas reads a computed '
37-
+ 'value on every row.',
39+
+ 'value on every row, save a cycle through a field two packages add at the same priority, which neither door '
40+
+ 'judges.',
3841
};

0 commit comments

Comments
 (0)