Repository navigation
Report-spec consumer folders phase 2: recursive sync, consumer index, zoned specs out of shared caches - #582
Merged
dwolfson merged 2 commits intoNov 10, 2026
Conversation
…ndex
Report-spec consumer folders, phase 2 (design D5, sections 2 and 5): Egeria-held specs only.
sync_report_specs(recursive=None, depth_cap=5, index_consumers=True):
- Follows CollectionFolder members of a named folder. Default on for consumer
folders (ReportSpecFolder::Consumer::...), off for any other folder;
--recursive / --no-recursive on `pyegeria report-specs sync` override it.
- Cycle guard (each GUID read once) and a depth cap (5 levels below the named
folder). Never follows a RootCollection or a sibling consumer folder.
- A spec found in a sub-folder is recorded against the named folder.
- The report names folders_read and depth_cap_reached ("Depth cap reached").
A capped walk or a sub-folder read error keeps the folder's cached specs:
not read is not "no longer a member".
- After a folder sync it refreshes the consumer index; report.consumers says
whether the root was read. Its failure never fails the sync.
Consumer index: build_consumer_index / refresh_consumer_index /
read_consumer_index. Reads the root (PYEGERIA_REPORT_SPEC_ROOT, default
RootCollection::ReportSpecs) once, names and labels only, and returns
{label: [consumer, ...]} plus every consumer folder with its own status.
Cached as consumers.json beside the spec manifest (kept by the prune), memoised
on mtime. Absence is never "none": an unreadable or missing root is
status "not read" with the reason; an unreadable or capped consumer makes it
"partial".
Tests (in-memory Egeria): sub-folders followed, flat by default elsewhere, a
cycle and a second path read once, the depth cap, never up or across, a
sub-folder error keeps cached specs, the index (read, refreshed by a sync, not
read, root error, partial, cycle-safe and capped), the root env, the CLI flags.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…s are gone Read-back 2026-11-10 (Architect), consumer folders phase 2: C-1 (required, design §9 in code): a shared sync (the cache's manifest is shared, e.g. the Portal's) skips any ReportSpec that carries a governance zone, until B6's public-only read. Zones are read from the 6.2 header key elementHeader.zoneMembership (and the legacy classifications list), on the member listing and again on the full element. The skip reads "zoned: not synced into a shared cache (until B6's public-only read); zones ...", and a cached copy is pruned. A private (per-user) cache still takes zoned specs. The consumer index, also a shared file, leaves zoned labels out with a note. C-2: a sub-folder whose member read is refused as not visible (OPEN-METADATA-SECURITY-403-020 / is_not_visible_error) or not found (404) is gone: its specs are pruned and the report says so. Only a genuine error (timeout, 5xx) keeps the cache as before. Tests: a zoned spec directly in the consumer folder and in a sub-folder (header key and legacy list), a private sync still taking them, a spec zoned after caching pruned from a shared cache, zones only on the full element, the index without zoned labels, a hidden and a deleted sub-folder pruned, and a timeout still keeping the cache. 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.
Report-spec consumer folders, phase 2 (pyegeria half)
Egeria-held report specs only. Two commits, both signed with DCO.
Recursive consumer-folder sync (970152d)
sync_report_specs(recursive=None, depth_cap=5, index_consumers=True):ReportSpecFolder::Consumer::...) and off for any other folder;--recursive/--no-recursiveonpyegeria report-specs syncoverride the default.folders_readanddepth_cap_reached.Consumer index
build_consumer_index/refresh_consumer_index/read_consumer_index:PYEGERIA_REPORT_SPEC_ROOT, defaultRootCollection::ReportSpecs) once, names and labels only, and returns{label: [consumer, ...]}plus the status of each consumer folder.consumers.jsonbeside the spec manifest.Zoned specs stay out of shared caches; hidden sub-folders are gone (62ef9ed)
elementHeader.zoneMembershipand from the legacy classifications list. A copy already in the cache is pruned. A private (per-user) cache still takes zoned specs.Tests
tests/micro-tests/test_rs_consumer_folders.py, against an in-memory Egeria (no live server):To be released as 6.2.33 (release branch prepared separately). The owner merges.
🤖 Generated with Claude Code