You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Studio formula inspector: a declared currency still goes stale when an edit turns into field-over-field quantity arithmetic or reads a quantity through a relationship #35815
Filing gate ①, Source: fleet. Nit N1 of the CONTRACT_REVIEW_TIER reviews of PR #35774 (#35631): record 7034135842, which left it for a follow-up card, and delta PASS 7035793960, which says it is wider on the landing head. L1 7035256454 asked that it be filed if it passes the business test. Nit N3 of the same delta record rides along. Dedupe: formula currency stale quantity and returnType currency kept quantity formula return only #35631, the parent, whose PR closes the shapes a literal pins and leaves these.
After #35774, the formula inspector withdraws a declared currency only when inferFormulaReturn answers number, which now means "proved not money". The producer still answers {} (unproven) for quantities it could prove but does not:
Field-over-field quantity arithmetic (record.quantity * record.hours) and a same-currency ratio (record.amount / record.tax): the unit proof (dimOf) proves a quantity, but the CEL type is dyn, so the numeric path never runs and the answer is {}.
A quantity read through a relationship (record.account.employee_count * 2): the read check cannot judge a hop, so the answer is {}. Proving it would need the related object's fields at the producer.
So an author who edits record.amount * 0.1 into record.quantity * record.hours keeps returnType: 'currency' and its currencyConfig, and the value is drawn as money. This is the defect #35631 fixed, on the shapes no literal pins. It is the safe direction: the published text says an unproven verdict keeps the declaration.
Rider (N3): the record.?amount * 0.1 and record[?'amount'] * 0.1 pins in packages/formula/src/formula-return.test.ts answer {} on every head, because an optional is not typed as a number, so they guard nothing. A discriminating shape is record.?amount.orValue(0) * 0.1, with record.?quantity.orValue(0) * 2 as its CONTROL. The changeset line and the test comment (about :193) that say those spellings moved from number should be corrected.
reach: Studio's object field inspector, for formula fields, sometimes. A stale currency display on a quantity formula. Read from code, not run.
Done when
inferFormulaReturn answers number for a proven quantity whose CEL type is dyn (both field-over-field shapes), and a declared currency is withdrawn on that edit at the inspector, with a pin per shape and CONTROLs that keep money and the unproven cases at {}. The relationship-hop leg is either proved using the related object's declared fields or recorded as an accepted limit in the producer header. The N3 pins are made to discriminate, and the two sentences are corrected.
Business rationale
Authors refactor formulas in Studio. A field that stops computing money but keeps drawing a currency symbol misleads every list, detail and report that shows it. #35631 fixed the literal shapes; these are the arithmetic shapes authors write next. Reader: the area:data lane seat (d7-C), one PR in packages/formula (and a pin at the inspector).
Grade: p3 · area:data · Bug · Studio formula authors, sometimes · evidence read.
Triage: lands in domain:data (formula inspector) · pm:queue; rationale: area:data · Bug · after #35774 a declared currency survives when a formula becomes field-over-field quantity arithmetic, a same-currency ratio, or a quantity read through a relationship, so the value is drawn as money; display only, no stored value is wrong; reach: authors who edit a money formula into these shapes → p3 as filed · size M (producer proof for dyn arithmetic and relationship hops), so it stays its own card rather than a sweep row.
Activity
objectstack-fleet commentedon Nov 20, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:data(formula inspector) ·pm:queue; rationale: area:data · Bug · after #35774 a declaredcurrencysurvives when a formula becomes field-over-field quantity arithmetic, a same-currency ratio, or a quantity read through a relationship, so the value is drawn as money; display only, no stored value is wrong; reach: authors who edit a money formula into these shapes → p3 as filed · size M (producer proof fordynarithmetic and relationship hops), so it stays its own card rather than a sweep row.