Skip to content

Units of measure: decide which writes the unit membership check judges (ADR-0158 Open item 9) #35467

Done

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CajiB6BSQKWowy6YLB

Routed by ADR-0158, Open item 9, to the membership card (R1, U5). Parent: #35339 (ADR merged in PR #35370, 35bd360).

Question (the ADR's text)

Which writes U5 judges, for three cases: a code written; a quantity written beside a resting code that is no longer a member (an org unit deleted under L1); a quantity written beside a blank code. The two precedents differ: the record validator judges a valueDomain on the written value only (packages/objectql/src/validation/record-validator.ts); the currency pair guard judges only touched pairs, and only for a blank code (packages/objectql/src/validation/record-currency-code.ts). Under either, a quantity update on a row whose stored code is no longer a member passes, while L1 refuses "a new save with that code". A third shape (membership of the row image's code whenever the pair is touched) closes that, but it also refuses a quantity edit on every row still holding free text before the backfill runs, so it orders R1's rollout. Also open: whether a quantity may rest beside a blank unit (ADR-0144 D8 rule 4 refuses an amount beside a blank currency code), and whether U5 checks a code's dimension against the field's unitDimension.

Done when

The membership card states the judged writes for all three cases, the blank-unit rule and the dimension check, with the R1 rollout order the choice implies; ADR-0158 is amended.

Grade

p2 · area:data · domain:server. First R1 member; decides whether L1's delete refusal is actually enforced.


Generated by Claude Code

Activity

  1. added
    priority:p2
    pm:queue
    domain:server
    on Nov 19, 2026
  2. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:server · pm:queue; rationale: area:data · Task (ADR-0158 open item 9: which writes the unit membership check judges) · p2 as set: the membership card under #35339 waits on it.

  3. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibvMi1U7R2kBd3JbTPu

    Seat settlement · ADR-0158 Open item 9 · 2026-11-19T15:42Z

    Area: d7-D. PM settlement by governing text and named precedent (SKILL.md 〈升级与决策〉: precedent ⇒ seat names it, lands under the maintainer's veto window). ADR-0158's own Open items intro routes this item to the card that builds the piece ("Every other item belongs to the card that builds the piece, settled under that card's review"); only items 8 and 10 owed a ruling, and both are ruled (7008524997, 7008551416). Executed by #35489 (the membership card, which already carries OI9), whose PR pins it and amends ADR-0158.

    Governing text: ADR-0158 U4, U5, L1 ("a new save with that code is refused"), Open item 9; ADR-0144 D8 rule 4 and Open item 13 (ruling B 6492000994 on #8345); ADR-0113 D1 (nothing is refused for resting); ADR-0078 (no declared key without the engine that reads it).

    Settled:

    1. What is judged: the row image, whenever the write touches the pair. On insert, the row as it will be stored; on update, the stored row with the payload laid over it, judged when the payload carries the quantity or its unit field. This is the third shape Open item 9 names, and it is the one shape under which L1's "a new save with that code is refused" is enforced. Precedent for the image: packages/objectql/src/validation/record-currency-code.ts (module header: "The row's IMAGE after the write"; "only the pairs the payload touches"). A write that touches neither is not judged (ADR-0113 D1), so a row resting on a deleted org unit stays editable in its other fields.
    2. Case 1, a code written: admitted only if it is a U1 code or a code in the organization's sys_unit rows, in exact uppercase (U4). A lower-case or padded spelling is refused, never folded: the stored code is always the one submitted (ADR-0144 D8 rule 4 posture).
    3. Case 2, a quantity written beside a resting code that is no longer a member (an org unit deleted under L1): refused by point 1. The remedy the refusal names is moving the row to an existing unit (L1's own words).
    4. Case 3, a quantity written beside a blank code: refused, mirroring ADR-0144 D8 rule 4 (ERR_CURRENCY_CODE_REQUIRED). A blank quantity needs no code, and a code beside a blank quantity is judged by case 1 only. The code of the refusal is Open item 3's, also Units of measure R1: a number field declares its unit (unitConfig) and the write path checks the unit code #35489's.
    5. Dimension restriction: when unitDimension is declared, U5 also refuses a member code of another dimension. U4 allows the restriction; ADR-0078 forbids declaring it without its reader, and U5 is the only R1 reader.
    6. A standalone unit field (Open item 8, ruled A): judged by points 1, 2 and 5 whenever it is written; it has no quantity, so cases 3 and 4 do not apply.
    7. Free text resting before the backfill, and R1's rollout order. A field whose stored rows hold free text when a quantity first declares unitConfig over it keeps those rows readable; the next write that touches the pair is refused until the backfill (Units of measure R1: a backfill door that converts existing free-text units to codes #35492) has converted them, exactly as ADR-0144 Open item 13 left a codeless record amount. So Units of measure R1: a number field declares its unit (unitConfig) and the write path checks the unit code #35489 and Units of measure R1: a backfill door that converts existing free-text units to codes #35492 ship in the same Version Packages release (no release carries the refusal without its remedy), and the refusal's guidance names the backfill door. Whether the metadata save that adds unitConfig over stored free text also answers a destructive-change finding, the way currency_mode_to_record does (packages/metadata-protocol/src/protocol-write-face.ts), is Units of measure R1: a number field declares its unit (unitConfig) and the write path checks the unit code #35489's to settle under its review against that precedent.

    Veto: the maintainer may reverse any point on this card; the seat reports this settlement in its round report. Until #35489 is claimed nothing is built.

    Prior rulings read: units of measure, sys_unit, membership, blank code, D8 rule 4 → 7001193034 (U1–U8), 7003532733 with correction 7006481348, 7008524997 (OI8 A), 7008551416 (OI10 A), ADR-0144 D8 rule 4 and Open item 13 (6492000994, 6670707546); none conflicts.

    State: pm:queue → pm:blocked. The card closes with #35489's PR.

    Blocked-by: #35489

  4. added
    pm:blocked
    and removed
    pm:queue
    on Nov 19, 2026
  5. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Unlock (daily scan): every Blocked-by: target is closed, so pm:blocked → pm:queue; grade unchanged.

    Targets read this round, all closed in this repository: #35489. The line lived only in a thread comment. No Unlock-action: line, no assignee; same repository, so no installability check is owed.

  6. added
    pm:queue
    and removed
    pm:blocked
    on Nov 23, 2026
  7. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

    Ruled · closed completed · 2026-11-25T23:07Z

    Ruled: the maintainer confirms the seat settlement 7013996288 (ADR-0158 Open item 9) as landed and closes this card.

  8. removed
    pm:queue
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:datadomain:serverpriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions