Repository navigation
fix(agent-bff): read the json array composite id forest_liana serializes - #1968
Merged
Tonours merged 5 commits intoOct 6, 2026
Merged
Conversation
|
Coverage Impact This PR will not change total coverage. Modified Files with Diff Coverage (2)
🛟 Help
|
nbouliol
approved these changes
Oct 6, 2026
nbouliol
left a comment
Member
There was a problem hiding this comment.
Approved after /validator run 1968-20261006072100-nbouliol: nothing at or above should-fix posted, 1 suppressed.
Tonours
deleted the
hp/gateway-mcp-bff/t-0027-prd-1472-composite-pk-fix
branch
October 6, 2026 07:46
4 tasks
forest-bot
added a commit
that referenced
this pull request
Oct 6, 2026
## @forestadmin/agent-bff [1.38.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/agent-bff@1.38.0...@forestadmin/agent-bff@1.38.1) (2026-10-06) ### Bug Fixes * **agent-bff:** read the json array composite id forest_liana serializes ([#1968](#1968)) ([a62e137](a62e137))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The BFF now reads the JSON array id
forest_lianasends for a real composite key, so listing that collection no longer fails with a 500. fixes PRD-1472What
unpackPrimaryKeyreads["acme",1]as the composite id and returns{ seq: 1, tenant_id: "acme" }. Pipe ids (a|b) take the same code path as before.|". They now say it is packed in the agent's own format.Why
forest_lianaserializes a composite id as a JSON array, andsplit('|')turned every list of such a collection into500 mapping_error. Measured on the v1-rails bench withcomposite_primary_keys14.0.10.{tenant_id}only) comes from a model that declaresself.primary_key = "tenant_id". That is a real Rails ≤ 7.0 workaround, and the BFF already reports the key the agent declares.How
|segments as there are keys. For those, a reading is used only if the record backs every key, pipe first. Otherwise the result ismapping_error, never a wrong key under 200.meta.liananever reaches the read-model.Verification
agent-bffsuite 2195/2195, plus tsc and eslint clean. New tests cover each stack's id shape, the JSON guards and both collision cases.mainthened0d132e0; the served OpenAPI text proves which build is running):c705b1f90, including the Macroscope collision.ed0d132e0is a qlty-only refactor with no behavior changeed0d132e0EdgeTrueCompositePktakes the JSON branch in a ~500-record scan; conformance vsmaindiffers only onpk-compositev1-railscomposite (EdgeTrueCompositePk)pk-composite500 → 200; 6 rows, 6 distinct{seq, tenant_id}; filter, sort, search and projection checks passv1-expressv1-mongoose_idonly)v2-ruby(OAuth)v2-nodeparentIdand guard-boundary idsLimits
id, so the list returns500 Agent record is missing its id.mapping_error. This is intended.Definition of Done
General
Security