You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: full EntryLink type map + classify_links; fix entity set (#389)
Generalize the discovery layer from entities-only to the full EntryLink enum
(18 types from test/openapi.yaml), per #389.
- classify_links(entry): surfaces ALL note links, each labeled with a
LinkCategory (entity/inventory/reference/metadata/not_packageable/uncertain/
external/unknown). Consumers filter, e.g. `r.is_packageable`. Unknown/future
types surface as UNKNOWN rather than being silently dropped.
- LINK_TYPE_CATEGORY: type -> category for all 18 tokens; PACKAGEABLE_CATEGORIES.
- Fix entity set: ENTITY_LINK_TYPES now {custom_entity, dna_sequence,
aa_sequence, batch}. Adds `batch` (a real registry entity, was missed);
drops dna_oligo/rna_oligo (NOT EntryLink types -- can't appear as note links).
- spec/entry-link-types.json: human-facing reference map (category, packageable,
id prefix, GET endpoint, webhook events) for all 18 types, plus the
not-inline-linkable resources. A test asserts its categories match the module
so it can't drift.
26 unit tests; black/isort/pyright clean.
Refs #143#389#68
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
"$comment": "Reference map of Benchling EntryLink.type tokens -> how the packager treats them. Source of truth for `type` enum: test/openapi.yaml (EntryLink schema, 18 tokens). Categories mirror docker/src/entry_references.py (LINK_TYPE_CATEGORY); test_entry_references.py asserts they agree. Endpoints / id prefixes / events per issue #389. See issues #143, #389, #68.",
3
+
"categories": {
4
+
"entity": "Registry entity; GET-by-id and v2.entity.registered event. Packageable.",
5
+
"inventory": "Packageable via GET-by-id; no webhook events.",
6
+
"reference": "Packageable; has its own create/update webhook events.",
7
+
"metadata": "GET works but low value to package as a record.",
8
+
"not_packageable": "No read API exists; keep the webURL as a reference only.",
9
+
"uncertain": "Endpoint depends on tenant API version (e.g. v2-alpha); verify before relying.",
10
+
"external": "Plain http(s) hyperlink ('link' type); no Benchling ID.",
11
+
"unknown": "Type not in the known enum; surfaced rather than dropped."
{"type": "location", "category": "inventory", "packageable": true, "id_prefix": "loc_", "get_endpoint": "GET /locations/{id}", "webhook_events": [], "notes": "Locations do not have a webURL."},
{"type": "stage_entry", "category": "uncertain", "packageable": false, "id_prefix": "etr_", "get_endpoint": "v2-alpha only", "webhook_events": ["v2-alpha.stageEntry.*"], "notes": "Verify against the deployed tenant's API version before relying on it."},
27
+
{"type": "protocol", "category": "not_packageable", "packageable": false, "id_prefix": null, "get_endpoint": null, "webhook_events": [], "notes": "Linkable but no GET-by-id endpoint in the stable spec."},
{"type": "sql_dashboard", "category": "not_packageable", "packageable": false, "id_prefix": "axdash_", "get_endpoint": null, "webhook_events": [], "notes": "No read API; Insights/analytics artifact reachable only via the Warehouse. Keep webURL deep link."},
31
+
{"type": "insights_dashboard", "category": "not_packageable", "packageable": false, "id_prefix": "axdash_", "get_endpoint": null, "webhook_events": [], "notes": "Legacy alias of sql_dashboard; no read API."},
32
+
{"type": "link", "category": "external", "packageable": false, "id_prefix": null, "get_endpoint": null, "webhook_events": [], "notes": "Plain external hyperlink; id omitted, webURL is the literal URL."}
33
+
],
34
+
"not_inline_linkable": {
35
+
"$comment": "Resources that are NOT EntryLink types -- they cannot appear in links[]. They reach an entry via structured note parts / inventory tables instead.",
0 commit comments