Relationships
#3790 typed-secrets query view: route a row's JSON content by whether the adapter adapted the record, not by the service's namespace rule
Opened by zack · 10/22/2026
Problem
Under the expression-facing query view (typed-secrets 4.3, swamp-club#3732), DataQueryService decides whether a row's content reads through the view with two rules: adaptation uses the adapter's own-namespace identity (the data namespace receiver's), while the content routing in the predicate context and in project() uses isForeignNamespace(record.namespace, dataRepo). The two agree except for a legacy row stamped with the empty namespace (swamp-club#3785), where the service treats the row as its own and routes JSON content to the viewed attributes while the adapter left the record as stored, so a charset-parametrized JSON record reads as parsed reference-text attributes rather than its text or its Secrets. Separately, a JSON record with a media-type parameter whose body does not parse reads as an empty map under the view (fromRow leaves attributes empty and content as the text), where the raw path answers the text.
Raised as two low findings by the adversarial review of [REDACTED-SECRET-1]. Nothing leaks in either case; the typed path is behind the internal option.
Expected
One identity: the content getters route to the viewed attributes only when the view adapted the record (view.record(r) answered a new object) and the record is JSON by media type or by the aliased object; a record the view returned as stored, another namespace's or an untagged one, keeps today's content and projected content, and an adapted record whose body did not parse keeps the empty attributes the view holds. Drop isForeignNamespace from the view branches of data_query_service.ts, make the domain tests' fake view namespace-aware, and state the rule in design Section 6.2.
In Progress
Click a lifecycle step above to view its details.
Sign in to post a ripple.