feat: deep field selection for GET /modelconfigurations/{id}#7
Merged
Conversation
Adds FIELD_SELECTIONS_BY_ID map (empty) and extends getFieldSelection with a 'list' | 'byId' mode. Default 'list' preserves all existing call sites; 'byId' returns the deep variant when present, else falls back to FIELD_SELECTIONS.
… by-id Adds FIELD_SELECTIONS_BY_ID.modelcatalog_configuration with presentations nested under inputs.input and outputs.output. Mirror anchor comment added to FIELD_SELECTIONS.modelcatalog_dataset_specification to flag the duplicated VP selection. List path unchanged (default mode='list').
service.ts:183 now requests mode='byId' from getFieldSelection. List path (line 123) keeps default mode='list'. End-to-end coverage in read-shape-deep-e2e.test.ts.
GET /v2.0.0/modelconfigurations/{id} returns the full
Config → DataSetSpec → VariablePresentation tree in one round trip.
Asserts VP id/label/hasShortName surface; standardVariable/unit absent
(depth-2 cap).
bug-082 class regression check — adding nested hasPresentation under inputs.input does not regress the is_optional → isOptional scalar hoist in response.ts:104-122.
GET /v2.0.0/modelconfigurations (list) keeps the shallow input shape — hasPresentation absent. Confirms divergence between list and by-id field selection.
Config with zero inputs/outputs returns no hasInput/hasOutput keys (response.ts:95). Confirms the deep read does not introduce empty arrays that would diverge from v1.8.0 client contract.
2 tasks
…m handlers
GET /resources/{id} and DELETE /resources/{id} previously rejected bare
slug paths with 400 "Resource ID must be a full URL-encoded URI",
forcing callers to URL-encode the full https://w3id.org/okn/i/mint/<id>.
Now both paths resolve fullId = isFullUri(id) ? id : `${idPrefix}${id}`,
mirroring the existing PUT update behavior.
custom-handlers.ts: replaced strict requireFullUri (reject) with
resolveResourceId (prepend resource idPrefix). Applied at all 5 call
sites covering custom_configurationsetups_id_get,
custom_modelconfigurationsetups_id_get,
custom_modelconfigurations_id_get,
custom_datasetspecifications_get configurationid, and
custom_configuration_id_inputs_get.
PUT path switched from raw startsWith('https://') to isFullUri for
http:// parity. Flipped 3 unit tests that asserted 400 to assert the
prepended URI is forwarded to Hasura.
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.
Summary
Design + plan
docs/superpowers/specs/2026-05-10-modelconfig-deep-read-design.mddocs/superpowers/plans/2026-05-10-modelconfig-deep-read.md(Both live in the monorepo on branch
feat/modelconfig-deep-read.)Verification
npm test— 120 pass / 38 skipnpm run test:e2e— 19/19 pass (covers deep tree, isOptional hoist, list-stays-lean, empty-array elision)npm run build— cleanFollow-up
73002499update (mint-client deep-read example) lands as a separate follow-up commit.Test plan
npm test,npm run test:e2e,npm run buildmodelcatalog_dataset_specification_presentationandmodelcatalog_variable_presentation