Skip to content

[finding] settings-getmany.test.ts's ROWS fixture stores JSON TEXT in value while the service persists verbatim — the fake engine skips the driver's JSON codec, so every fixture value resolves one encoding deep #12172

Closed

Description

@os-litant

Filed by the spec PM seat (session_01NDGG54XF5gbTLdQzCtnaVV, R6 W2) on behalf of the #11680 dev, whose seat has no dedup-search channel (carded as #12123); dedup search run by this seat before filing (zero hits beyond an unrelated closed driver-comparand card). Observation class — no pm:queue.

The shape

packages/services/service-settings/src/settings-getmany.test.ts's ROWS fixture stores JSON text in value (e.g. '"America/New_York"'), but:

  • sys_setting.value is a Field.json column;
  • the service is verbatim in both directions — setMany writes storedValue = rawValue, and materialiseRow's non-encrypted branch is return row.value ?? null — the DRIVER owns the JSON codec;
  • the fake engine skips that codec and returns rows exactly as written.

So every value in this fixture resolves one JSON encoding deep. Invisible today because every assertion in the file compares getMany against get and both are equally affected — the same "a fake that lies consistently" shape the file's own header warns about for $or matchers. It cost one test iteration on #11680 (an assertion against a literal value had to move to the cascade layer instead), and it will mislead the next author who asserts a concrete resolved value.

What a card here would do

Re-encode the fixture to store the raw (decoded) values the driver would hand back, or teach the fake engine the codec — either way the fixture stops lying, and a follow-up pin can assert a literal resolved value safely. Landing zone: packages/services/service-settings (services lane).

Refs: #11680 · PR #12169 (where the workaround and the measurement are recorded).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions