Repository navigation
feat(view): dashboard sheets held in Egeria folders (LD-1) + fetch a sheet's spec as the viewer - #586
Merged
Merged
Conversation
…older walk (LD-1) Dashboard folders mirror report-spec consumer folders: a root RootCollection::DashboardSheets (PYEGERIA_DASHBOARD_ROOT) holds one DashboardFolder::Consumer::<App> CollectionFolder per consumer, sub-folders allowed; members are the sheets' Dashboard elements, and a sheet may sit in several consumer folders. - pyegeria/view/egeria_folders.py: the folder walk and the consumer-tree read, lifted out of egeria_spec_cache and parametrised by root QN, consumer prefix and a member predicate. Cycle-safe, depth-capped, never up to the root or across into a sibling consumer; a folder whose read failed says so, never reads as empty. Walk.paths records where each member was found. - egeria_spec_cache uses it with no behaviour change (its private names stay as thin wrappers); its consumer-folder and tier tests are unchanged and pass. - dashboards: list_dashboard_sheets(client, folders=None) and list_dashboard_sheets_for_viewer take configured folders (PYEGERIA_DASHBOARD_FOLDERS, else config.json "Pyegeria Dashboard Folders"): only the sheets in them, recursive inside the consumer folder, each tagged with folders and used_by. With none configured: every Dashboard:: sheet as before, plus the note "no dashboard folders configured: listing every Dashboard:: sheet". The result is a DashboardSheetListing (a list, so callers keep working) carrying notes and per-folder status; a folder not found or unreadable is stated. - build_dashboard_consumer_index / read_dashboard_consumer_index: the report-spec consumer index's shape over the dashboard tree. - Tests: the dashboard fake (shapes checked live 2026-11-09) plus the collection reads; sheets written by the real writer. Recursion and tags, a sheet in two consumers, a sub-folder's consumer, env config, folder not found, unreadable folder and sub-folder, sibling and root never followed, a cycle, the depth cap, the member predicate, the consumer index (read, root missing, partial). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…d says so
Consumer folders govern what a tool LISTS, not whether a spec a sheet
already references can RUN (Architect, B7a read-back). "Analytic - Generic
Metric Trend" sits only in ReportSpecFolder::Consumer::Portal while EA syncs
only Consumer::EgeriaAdvisor, so a sheet both apps show failed in EA.
- dashboard_resolver: when spec_lookup finds no tier holding a placement's
spec, it is fetched from Egeria as the viewer (async_fetch_spec_for_call;
Egeria's zone check on that read is the authority). The placement's note
says SPEC_NOT_IN_FOLDER ("held in Egeria, not in this tool's folder"),
fetched_as carries the internal name, and run=True executes under it.
- A spec the viewer cannot read stays absent: error keeps "was not found in
any tier" and adds the fetch's reason (NOT_VISIBLE when Egeria refuses
the read). A client that cannot read collections keeps today's words.
- fetch_missing (default on) on every resolve entry point turns it off.
- egeria_spec_cache.fetched_spec_source(name): a fetched spec's provenance.
- Tests: readable spec runs with the note and under its fetched name; a
spec hidden from the viewer stays absent with its reason, both by search
and by GUID; fetching can be turned off.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…after it is cached In a per-user cache, the first fetch-as-viewer writes the spec through, so the next view finds it in the EGERIA tier and the note was lost (Architect, LD-1 read-back). An EGERIA-tier spec whose cache entry has no folders is in the cache only because a call fetched it, so it keeps the note. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
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.
Dashboard sheets by consumer folder (LD-1), and a sheet's spec fetched as the viewer
Three commits, all signed with DCO.
One shared folder walk, and dashboard sheets by folder (ea0a266)
Dashboard folders follow the same convention as report-spec consumer folders:
RootCollection::DashboardSheets(PYEGERIA_DASHBOARD_ROOT).DashboardFolder::Consumer::<App>CollectionFolder per consumer (Portal, EgeriaAdvisor). Sub-folders are allowed.Dashboardelement is the member, and one sheet may sit in several consumer folders.Changes:
pyegeria/view/egeria_folders.py(new): the folder walk and the consumer-tree read, moved out ofegeria_spec_cache. They're parametrised by root qualified name, consumer prefix and a member predicate. The walk is cycle-safe and depth-capped, and never goes up to the root or across into a sibling consumer. A folder whose read failed says so instead of reading as empty.egeria_spec_cacheuses the shared walk with no behaviour change. Its private names remain as thin wrappers, and its consumer-folder and tier tests are unchanged and pass.list_dashboard_sheets(client, folders=None)andlist_dashboard_sheets_for_viewertake the configured folders. Configure them withPYEGERIA_DASHBOARD_FOLDERS, or config.json"Pyegeria Dashboard Folders"(a new settings field).foldersandused_by.Dashboard::sheet, as before, plus the note "no dashboard folders configured: listing every Dashboard:: sheet".DashboardSheetListing. It is a list, so existing callers keep working, and it also carries.notesand the status of each folder. A folder that isn't found or can't be read is stated.build_dashboard_consumer_index/read_dashboard_consumer_index: the same shape as the report-spec consumer index, over the dashboard tree.A sheet's spec that no tier holds is fetched as the viewer (386698b, da38eb1)
Consumer folders decide what a tool lists, not whether a spec a sheet already references can run. Example: "Analytic - Generic Metric Trend" is only in
ReportSpecFolder::Consumer::Portal, and EA syncs onlyConsumer::EgeriaAdvisor, so a sheet both apps show failed in EA.async_fetch_spec_for_call). Egeria's zone check on that read decides access.run=Trueexecutes the spec under its fetched name.NOT_VISIBLEwhen Egeria refuses the read).fetch_missing=Trueis the default on every resolve entry point.egeria_spec_cache.fetched_spec_source(name).Tests
tests/micro-tests/test_dashboard_folders.py(15 tests). They usedashboard_fake_egeria, whose element shapes were checked live on 2026-11-09, plus the collection reads. Sheets are written by the real writer. Covered:tests/micro-tests/test_dashboard_spec_fetch.py(6 tests). Covered:mainin the test environment, where the environment registers an extra report spec:test_rs_egeria_tier_seed.py::test_census_is_unchanged_with_an_empty_user_dirtest_rs_egeria_tier_seed.py::test_a_user_dir_copy_of_a_former_local_spec_wins_with_one_warningtest_rs_w2_2_routine_declaration.py::test_every_registry_entry_reads_as_a_routine_declarationFor pyegeria 6.2.35; the version bump comes in the release PR. To be rebased onto 6.2.34 once it is tagged. The owner merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_015pdMuQrbgwghCioGkKJx1j