---
id: TST-PFM-MTD-076
title: record rules
kind: unit
product_area: platform
module: metadata
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/custom-objects/tests/unit/record-rules.spec.ts
implements:
  - ATS-PFM-MTD-012-04
  - ATS-PFM-MTD-012-09
  - ATS-PFM-MTD-012-17
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: >-
  Prepared integration database and the suite fixture records; fixture teardown restores or removes its own
  rows.
evidence:
  - 'services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts'
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is the display property followed
    by the secondary properties in parentheses
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#leaves out a secondary property
    that holds nothing, and the parentheses with it
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#joins several secondary
    properties with commas
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is the number with the object’s
    prefix when the display property holds nothing
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#uses # as the prefix of an object
    that has none
  - 'services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is cut to 500 characters'
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is cut before a character whose
    surrogate pair the 500-character cut would split
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#lower-cases and trims a text
    value
  - 'services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#treats an e-mail address as text'
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#keys an integer by its canonical
    string
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#keys a decimal by its padded wire
    string, so 22.5 and 22.50 at two places are one value
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#keys a multiple selection by its
    option ids, sorted
  - 'services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#has no key for no value'
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#multiplies a decimal by ten to
    its places
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#pads a value with fewer places
    than the field keeps
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#keeps the sign of a negative
    value
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is null for a data type that is
    not a decimal kind
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is null for a value whose scaled
    form is beyond a safe integer
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#matches a record whose list value
    is among the criterion’s
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#does not match a record whose
    value is another
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#does not match a record with no
    value
  - 'services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#negates a group that says so'
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#answers UNKNOWN for a criterion
    over a field the object does not have
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#compares a number with its
    operator
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#requires a property whose
    required_when the record matches
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#requires nothing of a record its
    required_when does not match
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#hides a property whose
    visible_when the record does not match
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#never hides a property whose
    visible_when cannot be decided
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#does not require a hidden
    property, whatever its required_when says
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#brackets the seek with the prefix
    and its last code point incremented, and matches exactly with LIKE
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#escapes the pattern characters of
    LIKE, so a prefix is never a pattern
  - >-
    services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#leaves the upper bound out when
    the last code point cannot be incremented
fixture_imports:
  - chai
  - '@rhythmsoftware/macroservice-metadata/custom-field-values'
  - '@rhythmsoftware/macroservice-metadata/field-rules'
  - ../../record-rules
test_doubles: []
limitations:
  - Conditional or skipped cases remain outside any claimed passing execution.
unmatched_specification: null
binding_assertions:
  - scenario: ATS-PFM-MTD-012-04
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#never hides a property whose
        visible_when cannot be decided
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-012-09
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is the display property
        followed by the secondary properties in parentheses
      - >-
        services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is the number with the
        object’s prefix when the display property holds nothing
      - 'services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is cut to 500 characters'
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
  - scenario: ATS-PFM-MTD-012-17
    provenance: test
    source:
      - >-
        services-platform:modules/custom-objects/tests/unit/record-rules.spec.ts#is null for a value whose
        scaled form is beyond a safe integer
    note: >-
      These references identify the assertions this suite contributes; bindings to additional suites remain
      part of the scenario’s proof.
---

# Record rules

## Verification Boundary

This unit suite checks custom objects and records within the local test harness. The registered file and pinned revision define its boundary.

## What This Suite Proves

The bindings identify the detailed or feature scenarios whose outcomes have assertions in this suite. Original case references remain attached to the detailed scenarios so a reviewer can inspect the exact assertion. Assertions are evidence of implemented checks; no execution result is claimed.

## What It Does Not Prove

The register does not establish a current passing run or full specification conformance. Conditional or skipped cases remain outside any claimed passing execution.

## Real Dependencies and Test Doubles

The imported contract and validation code runs locally. The fixture imports identify the setup seams; this register makes no broader claim that dependencies are undoubled.

## Must Not Be Doubled

The contract or validation function under examination must run directly; expected outputs cannot replace it.
