Repository navigation
feat(view): Egeria-held spec safety follow-ups (allowlist, binder warning, Asset-Graph, Data-Classes) - #564
Merged
Conversation
…e does (O1-a) Architect read-back P2 of RS-EGERIA-TIER stage 1 (odpi#563) against RS-W2-4 PR-0 (odpi#561): a stage's analytic_binders key on a spec held in Egeria was recorded only as a generic "ignored" note, so odpi#561's BINDERS_DEPRECATED_PREFIX warning never fired for the very case owner decision O1-a was for. - microflow_to_format_set now passes a stage's analytic_binders into the action. The PR-B ActionParameter shim drops it there, raises its DeprecationWarning and records the names, and the spec resolver warns with BINDERS_DEPRECATED_PREFIX, the same text as for a local spec. An empty binder stays silent; other unknown stage keys are still notes. Works for format 0 and microflow/1, and on every tier load, since the tier rebuilds from the cached micro-flow text, which keeps the key. - PR-0 P3: the shim's docstring now says the marker survives model_copy but not model_dump and a reload. - Tests: a synced Egeria-held spec (format 0 and microflow/1) with a non-empty binder resolves with exactly the odpi#561 warning; empty, None, [] and absent stay silent. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The Architect's stage-2 allowlist items (read-back of RS-EGERIA-TIER stage 1, P2 and note (a) on 224f189), pulled forward so pyegeria 6.2.28, the first release with the EGERIA tier, ships them. - The find_/get_/list_ prefix rule is gone. FIND_METHOD_ALLOWLIST is a positive list of Class.method entries (an _async_ twin is allowed too). It is _CENSUS_FIND_METHODS, the 45 find methods today's runnable built-in specs name (taken from the 437-spec census; the two unrunnable specs' missing methods are left out), plus FIND_METHOD_ADDITIONS, the reviewed additions, which is empty for now. A method not on it is refused with words, whatever its prefix. - FIND_METHOD_DENYLIST is kept as a second, independent check: it is tested first, it denies on any class, and a test fails if the two lists overlap. - The write-word scan now runs over the allowlist itself, on the name and on the first docstring line of both the sync method and its _async_ twin. The reviewed reads are keyed by Class.method: DataDiscovery.get_security_posture_history and ServerClient.get_attached_comments. - New test: every runnable built-in or generated spec's function is on the list, so the stage-2 seed cannot be refused. Plus tests that every entry resolves, that an _async_ twin is allowed, and that same-method different-class spellings are refused. - microflow-1.json and the module docstring describe the allowlist. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…able
The owner's fix for the census's two unrunnable specs (pyegeria 6.2.28).
- Asset-Graph named ServerClient.get_asset_graph, which no longer exists. It now calls
AssetCatalog.get_asset_graph_by_guid. The required parameter is now guid instead of
asset_guid; the optional ones are start_from and page_size. commands/cat/
get_asset_graph.py (the hey_egeria asset graph command) passes the new name.
- Data-Classes named DataDesigner.find_data_classes, which no longer exists. It now
calls DataDesigner.find_data_value_specifications with
spec_params={"metadata_element_subtypes": ["DataClass"]}. DataClass is a
DataValueSpecification subtype that shares the same search endpoint, and the filter
travels in the search body as metadataElementSubtypeNames (through **kwargs into
_async_find_request). The two subtype keys are removed from the spec's optional
params so a caller cannot override the filter.
- Live READ against qs-view-server (no writes):
- The DataClass filter returns 6 DataClass elements; DataGrain returns none, so
the filter is honoured.
- Data-Classes DICT returns 6 DataClass rows. It fills the same columns as
Data-Value-Spec does on the same data.
- Asset-Graph DICT and MERMAID run on a real asset guid.
- AssetCatalog.get_asset_graph_by_guid is added to the positive allowlist (46
entries). find_data_value_specifications was already on it. The every-runnable-
built-in test now covers both specs.
- Census: 437 specs, 376 runnable, 61 format-only, 0 unrunnable (was 374 / 61 / 2).
The resolver tests that used Data-Classes as their unrunnable example now register
a probe spec. KNOWN_UNRUNNABLE is now empty. The log_lines fixture re-enables the
pyegeria logger, because another module's test can leave it disabled.
- Docs: the census numbers in output-formats-and-report-specs.md are updated, and
the two "unrunnable today" examples are now history with their fix. A new
docs/release-notes/6.2.28.md is added.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…lares This fixes the Architect's P2 on e2e8a8c (READBACK-allowlist-specfix-cappedscans-2026-11-09 §2). Asset-Graph resolved and ran, but its output was not the graph. What was actually wrong, checked live and against a recorded response: - The anchor graph column's key was misspelt `anchorMermaidGRaph`, so Anchor Graph was always empty. It is now `anchorMermaidGraph`, and an Action Graph column (`actionMermaidGraph`, which the response also carries) is added. - The spec declared only ALL. Requesting ALL as an output format returned a 62-82 char markdown string holding just the asset's name, labelled kind "json". - Requesting MD or FORM rendered a Dr.Egeria "Update Asset" form, and LIST a markdown table, none of which can show a graph. Two read-back findings did not reproduce: - REPORT and MERMAID were not empty. They return kind "text" with the graph in `content` (`data` is not used for text results). The read-back read `data`. - DICT's single row is the asset itself. On this repository the first find_assets result is a GovernanceActionProcessInstance, whose display name reads like an audit message. DICT gave one row equal to the asset on four asset types live. Changes: - Asset-Graph declares DICT/TABLE/JSON, REPORT/HTML and MERMAID: - DICT, TABLE and JSON give the asset's own fields plus the graphs as text. - REPORT and HTML give the fields, with the asset, anchor and action graphs rendered as mermaid. - MERMAID gives the asset graph. - The columns are a named ASSET_GRAPH_COLUMNS list. ALL, MD, FORM and LIST are dropped, with the reason in a comment. Asking for one now raises the executor's existing error, which lists the declared formats. - format_set_executor: a ValueError from the find path was printed and swallowed, so the call returned None. It is now logged and re-raised. - Tests (17) against a recorded get_asset_graph_by_guid response (tests/micro-tests/data/asset_graph_by_guid_response.json, from qs-view-server, read only, relationships trimmed). They run the real path from exec_report_spec down to _generate_asset_output; only the HTTP request is replaced, and building a real client fails the test. They cover: - each declared format, with DICT a single row that is the asset and has all three graphs; - REPORT with three mermaid blocks; - MERMAID equal to the rendered mermaidGraph; - ALL, MD, FORM and LIST raising with words; - no declared format returning None. - Live READ against qs-view-server, after the fix: - DICT is 1 row with Mermaid 740 / Anchor 878 / Action 804 characters. - REPORT has 3 mermaid blocks; HTML and MERMAID carry the graph. - ALL and MD raise with words. - DICT is one row, the asset itself, on Notification, EngineAction and ConnectorActivityReport assets. - docs/release-notes/6.2.28.md is updated. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
The owner asked what it means for a table to return a graph: after 883d33e, TABLE/DICT returned one row holding ~740 characters of mermaid text. The owner's direction: "A table of edges and a different shape for other OutputTYpes". New pyegeria/view/asset_graph.py (pure functions) gives each declared format a shape: - DICT and TABLE: one row per edge, with From Display Name / From Type / From GUID / Relationship / To Display Name / To Type / To GUID. - The asset's own relationships (top-level lists such as governedBy and requestedActions) are included. - Direction comes from relatedElementAtEnd1 and startingElementGUID. - Each relationship is listed once, by relationship GUID. - Rows are sorted, so the order never depends on Egeria's. Paging stays Egeria's, on the graph request. - LIST: the nodes (the asset, its anchored elements, the related elements), with their role. - REPORT and MD: the asset summary, its graph(s) as mermaid, then the edge table. HTML renders that document. - MERMAID: the graph. - JSON: the full graph response. - FORM and ALL are not declared, so asking for them is an error that names the declared formats. Supporting changes: - AssetCatalog._generate_asset_graph_output applies these shapes for get_asset_graph_by_guid. MERMAID and other formats take the generic asset path. - The Architect's P3: a by-GUID REPORT no longer says "found from the search string". - markdown_to_html now enables GFM tables. The CommonMark preset had them off, so markdown tables came out as plain text in HTML, although the page CSS styles tables. Tests and checks: - The tests use a complete recorded response, rewritten to cover each format, the hand-read expected edges (5, one reported twice), deterministic order under a shuffled response, the no-edge case, and the P3 wording. - Live READ: edge rows equal the distinct relationship GUIDs on three asset types (5, 6 and 3), node counts are right, and REPORT never says "search string". - The spec docs (output-formats-and-report-specs.md) and the 6.2.28 note record the shape per format. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…AID for people The Architect's choice, accepted by the owner. Supersedes the edge table of 5fbc3c4. - Asset-Graph no longer declares TABLE. A TABLE (or LIST, MD, FORM, ALL) request is refused with words naming the declared formats; a named NO_TABLE_FALLBACK set stops the generic TABLE->DICT fallback for this spec only. - DICT is the asset itself with its graph fields; JSON is the full graph response; REPORT and HTML render the asset's fields and graphs; MERMAID is the graph. - pyegeria/view/asset_graph.py is trimmed to the edge/node helpers kept for the Wave 3 edge-table spec; no spec uses them yet (tested directly). - Keeps the P3 fix: a fetch by GUID no longer says "search string"; a search REPORT still names its search string. - Tests, docs and the 6.2.28 note updated; the note says the edge table is planned as its own spec in Wave 3. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson
added a commit
to dwolfson/egeria-python
that referenced
this pull request
Nov 9, 2026
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # docs/release-notes/6.2.28.md
dwolfson
added a commit
to dwolfson/egeria-python
that referenced
this pull request
Nov 9, 2026
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # docs/release-notes/6.2.28.md
dwolfson
added a commit
to dwolfson/egeria-python
that referenced
this pull request
Nov 9, 2026
…ilter-kwargs Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com> # Conflicts: # docs/release-notes/6.2.28.md # pyegeria/omvs/asset_catalog.py # pyegeria/view/format_set_executor.py # pyegeria/view/microflow.py # tests/micro-tests/test_rs_egeria_tier.py
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.
Egeria-held spec safety follow-ups
Branch
fix/egeria-held-binder-warningat 9b0fffe, based on upstream/main 0fdf951 (#563 and #561). It has six signed commits:d5b99a44: a spec held in Egeria now warns aboutanalytic_bindersthe same way a local spec does (O1-a).d39a0dec: a positive allowlist of find methods for specs held in Egeria.e2e8a8c8: the two built-in specs that could not run (Asset-Graph,Data-Classes) are repointed, so the census has none left.883d33e4:Asset-Graphrenders the graph in every format it declares (the Architect's P2 on commit 3).5fbc3c44:Asset-Graphas an edge table, with a shape per output format. Superseded by commit 6.9b0fffef:Asset-Graphdeclares DICT and JSON for code, and REPORT, HTML and MERMAID for people. The edge table is planned as its own Wave 3 spec (the Architect's choice, which the owner accepted).Commits 1 and 2 come from the Architect's read-back of RS-EGERIA-TIER stage 1 (#563). Commit 3 is the owner's fix. All three are pulled forward so that pyegeria 6.2.28, the first release with the EGERIA tier, ships with them.
1. A binder on a spec held in Egeria warns like a local one (O1-a)
Problem: a stage's
analytic_binderskey on a spec held in Egeria ended up only as a general note, "carries key(s) this pyegeria does not read: …; ignored". So #561's resolver warning (BINDERS_DEPRECATED_PREFIX, "deprecated: analytic_binders ignored") never fired for specs held in Egeria, which is the very case it was written for.Fix:
microflow_to_format_setpasses a stage'sanalytic_binderson to the action. From there it follows the same path as a local spec:ActionParametershim drops the key, raises its DeprecationWarning and records the binder names;BINDERS_DEPRECATED_PREFIX.microflow/1, and on every tier load, because the tier rebuilds each spec from the cached micro-flow text, which keeps the key._dropped_bindersrecord survivesmodel_copybut notmodel_dumpfollowed by a reload.2. A positive allowlist of find methods
Problem: a find method was allowed if its name started with
find_,get_orlist_. That prefix does not prove a method only reads:AutomatedCuration.get_create_csv_data_file_element_from_templatecreates an element.Fix: that rule is replaced by a named, positive list.
FIND_METHOD_ALLOWLISTis the union of two parts:_CENSUS_FIND_METHODS: the 45 find methods that runnable built-in specs name, taken from the 437-spec census. The two unrunnable specs' methods do not exist, so they are left out.FIND_METHOD_ADDITIONS: reviewed additions. It is empty for now.A spec held in Egeria may name an entry exactly as written,
Class.method, or its_async_twin. Anything else is refused with words, whatever its prefix. That includes the same method spelled through another class, such asEgeriaTech.find_collections.FIND_METHOD_DENYLISTis kept as a second, independent check:The write-word scan now runs over the allowlist itself. For each entry it checks the method name, plus the first docstring line of both the sync method and its
_async_twin. Reviewed reads are now keyed byClass.method, as the Architect asked in note (a) on 224f189. Two entries are reviewed:DataDiscovery.get_security_posture_historymatched "test run";ServerClient.get_attached_commentsmatched "attached".New coverage test: every runnable built-in or generated spec's function must be on the allowlist, so the stage-2 seed (today's built-in specs written into Egeria) can never be refused.
Other new tests:
_async_twin is allowed;CollectionManager.get_collection_by_guid) is refused.microflow-1.jsonand the module docstring now describe the allowlist.3. The two built-in specs that could not run now run (the owner's fix)
Asset-Graph: it namedServerClient.get_asset_graph, which no longer exists.AssetCatalog.get_asset_graph_by_guid.guid(it wasasset_guid), andstart_fromandpage_sizeare optional.hey_egeriaasset graph command (commands/cat/get_asset_graph.py) now passesguid.Data-Classes: it namedDataDesigner.find_data_classes, which no longer exists.DataDesigner.find_data_value_specificationswithspec_params={"metadata_element_subtypes": ["DataClass"]}.**kwargsinto_async_find_requestand travels in the search body asmetadataElementSubtypeNames.DataClasssubtype returns the 6 DataClass elements. Filtering onDataGrainreturns none, so Egeria applies the filter.Data-ClassesDICT returns 6 DataClass rows. It fills the same columns asData-Value-Specdoes on the same data; this data does not set Data Type or Specification.Asset-Graphruns in DICT and MERMAID on a real asset guid.AssetCatalog.get_asset_graph_by_guidis added to the allowlist, which now has 46 entries.find_data_value_specificationswas already on it, and the "every runnable built-in spec is on the list" test now covers both specs.Data-Classesas their example of a spec that cannot run now use a test spec instead.KNOWN_UNRUNNABLEis now empty.log_linesfixture now turns the pyegeria logger back on, because another test module can leave it off.docs/output-formats-and-report-specs.mdare updated, and the two "unrunnable today" examples are now history, with the fix that cleared them. Newdocs/release-notes/6.2.28.md.4.
Asset-Graphrenders the graph in every format it declaresThis fixes the Architect's P2 on e2e8a8c: the spec ran, but its output was not the graph.
What was really wrong, checked live and against a recorded response:
anchorMermaidGRaph, so Anchor Graph was always empty. It is nowanchorMermaidGraph. An Action Graph column is added foractionMermaidGraph, which the response also carries.json.Two findings in the read-back did not reproduce:
textwith the output incontent, anddatais not used. The read-back readdata.find_assetsis a GovernanceActionProcessInstance, and its display name reads like an audit message. Run live on four asset types, DICT returned one row each time, and that row was the asset.The fix:
Asset-Graphnow declares these formats:ASSET_GRAPH_COLUMNS.format_set_executor: aValueErrorfrom the find path used to be printed and swallowed, so the call returned None. It is now logged and raised again.Tests: 17 new tests in
tests/micro-tests/test_asset_graph_spec.py.get_asset_graph_by_guidresponse,tests/micro-tests/data/asset_graph_by_guid_response.json. It was recorded read-only from qs-view-server, with relationships trimmed.exec_report_specdown to_generate_asset_output. Only the HTTP request is replaced. A guard fails the test if a real client would be built.mermaidGraph;Read-only live check against qs-view-server, after the fix:
The 6.2.28 release note now covers the Asset-Graph change, without "output incomplete" wording, since every declared format works.
5.
Asset-Graphas an edge table (superseded by commit 6)Commit 5 turned DICT and TABLE into one row per edge and gave each format its own shape, following the owner's question "What does it mean for a Table to return a graph?". The Architect then proposed a narrower spec, and the owner said "we can take the architect's choice". Commit 6 applies that choice. Two pieces of commit 5 are kept:
pyegeria/view/asset_graph.py, which the Wave 3 edge-table spec will use.markdown_to_html, because the CommonMark preset had them off although the page's CSS already styles tables.6.
Asset-Graph: DICT and JSON for code; REPORT, HTML and MERMAID for peopleWhat each declared format returns:
This matches what 883d33e returned for these formats, apart from the P3 fix below.
What is not declared: TABLE, LIST, MD, FORM and ALL. Asking for any of them raises an error that names the declared formats.
NO_TABLE_FALLBACKinbase_report_formats.py, turns that fallback off forAsset-Graphonly, matching the label with or without a tier prefix. Every other spec keeps the fallback.The Architect's P3 is kept: a REPORT names a search string only when one was given.
get_asset_graph_by_guid's output passes no search string.generate_outputremembers whether the caller searched before it fills in "All".All".What is removed: the edge and node shapes in
asset_graph.py, and the generator that applied them. AssetCatalog's_generate_asset_graph_outputnow just calls the generic asset output with no search string.asset_graph.pykeeps onlygraph_edgesandgraph_nodes, as helpers for the Wave 3 spec. No spec uses them, and they are tested directly rather than through a spec.Tests:
tests/micro-tests/test_asset_graph_spec.pycovers each declared format against the complete recording:mermaidGraph.It also checks that:
Data-Structures, which declares DICT but not TABLE or ALL, still gets the TABLE→DICT fallback;The helper tests check the 5 hand-read edges, a stable order when the response is shuffled, and the order of nodes by role.
Read-only live check against qs-view-server:
Note on
hey_egeria: its asset-graph command still asks for TABLE. That keeps working, because the command's ownlist_genericmaps TABLE to DICT before it calls the spec, so it shows the asset's one row as a terminal table. Moving that command to REPORT, or to the Wave 3 edge spec, is a follow-up.Tests
The full micro-suite on Python 3.13 (
uv run -p 3.13 pytest tests/micro-tests/, JUnit): 2417 tests, 0 failures, 0 errors, 3 skipped (run 12:58Z). For comparison:No Egeria calls were made.
🤖 Generated with Claude Code