Skip to content

rest: the cached by-name metadata read answers 304 across a translation change, so a client can keep stale labels or a stale translation warning #38288

Backlog

Description

@objectstack-fleet

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Filing gate: ① (an out-of-scope finding of a dev report, escalated by the contract review) · Source: fleet (PR #38282 for #35707: dev report 7238417187 on #35707, contract review 7238485386 on PR #38282)

What happens

The default by-name metadata read (GET /meta/{type}/{name} through getMetaItemCached, packages/metadata-protocol/src/protocol-search-and-cache.ts) computes its validator from the stored document and the locale only. The REST arm translates the item after the validator is judged, so nothing the translation step contributes is part of it. A client that revalidates with If-None-Match gets 304 when only the translations changed: it keeps showing the old labels after a translation bundle is updated. Once PR #38282 lands, the same holds for its new translationWarning: a client that read the item during a translation fault can keep the warning after the fault has cleared.

Read in the tree by the contract review of PR #38282; not measured on a live host. Pre-existing on main, outside that PR's diff.

Expected

  • The by-name read's validator moves when the served translation changes (for example, it folds in the translation bundle's version or the presence of a translationWarning), or the read is not answered 304 while a translation fault holds.
  • A test: update a translation for an object, revalidate with the earlier ETag, and get 200 with the new label.

Grade: area:ai · bug · reach: a Console or API client that caches metadata reads, after a translation edit or a translation fault · evidence: read (review)
Suggested-grade: p3
Size: S
Related: #35707, PR #38282, #34993.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions