Repository navigation
feat(report-specs): RS-EGERIA-TIER stage 2, the seed - #569
Merged
Merged
Conversation
…om packaged JSON) The builtin tier now loads from packaged JSON (pyegeria/view/seed: one file per family plus manifest.json) through seed_report_specs(), once per process, via the same microflow_to_format_set converter the EGERIA tier uses. The Python constants stay only as the generator's input until stage 4. - Seed holds 437 specs (S2-2): base_report_specs, generated_format_sets, the 23 analytic demos and the 3 question specs. The 26 move from tier local to builtin; the analytic_demos entry point and the import-time RUNTIME registration of the question specs are removed. - microflow/1: format-only specs have "stages": [] with no params and at least one formatter (S2-1); a find stage's "additional_props" carries get_additional_props, limited to ADDITIONAL_PROPS_HOOKS and checked by the allowlist; a formatter's "same_as" keeps a Format with several types as one. Schema, parser and both converters updated together. - python -m pyegeria.view.seed build|check; refresh_specs runs build; a micro-test fails when the seed is stale. BOOTSTRAP_CORE named (no run-time effect yet). A bad seed file is skipped with words; the rest still load. - report_spec_source() names the seed file for a builtin spec. Every seed spec equals its constant-defined FormatSet (model_dump, 437/437); census unchanged: 437 / 376 runnable / 0 unrunnable / 61 format-only. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… > builtin)
Owner decision 2026-11-09 ("Yes, local overrides"): a local report spec (user
specs dir, entry point, or register_report_specs) with a built-in's label now
wins, with one warning per label per process worded like the EGERIA-tier
shadow warning. builtin:<label> still reaches the built-in, and
list_report_specs(with_status=True) lists it under that address.
- refresh_report_specs no longer skips a CONFIG entry for a built-in label;
a clash with a RUNTIME label is still skipped.
- register_report_specs no longer raises for a built-in label; another local
source's label still raises.
- Aliases follow stage 1's rule: a local alias that a built-in or Egeria-held
spec holds is dropped from the local copy, with one warning; a local copy
keeps the aliases of the spec it shadows.
- With no local spec the registry is exactly the seed (census unchanged).
Docs: the registry tiers and precedence in output-formats-and-report-specs.md,
and docs/release-notes/6.2.29.md (the seed ships in 6.2.29).
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
dwolfson
marked this pull request as ready for review
November 9, 2026 16:36
…e analytic_demos entry point Owner, 2026-11-09: "Allow and document". A local spec may shadow any built-in, including the bootstrap core and the Dr.Egeria display specs (e.g. Glossary-DrE-Basic). That changes what Dr.Egeria and the Portal show for that label; builtin:<label> still reaches the original, and the shadow is logged once per label. Documented in the precedence/tier section and the 6.2.29 note; pinned by a parametrized test over four core labels. Architect's P3: _report_spec_entry_points() skips the removed analytic_demos entry point (matched by name and value) left in a stale editable install's metadata, with one log line per process, instead of loading the demos a second time as local specs. 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.
RS-EGERIA-TIER stage 2: the seed (the builtin tier loads from packaged JSON)
Branch
dwolfson:feat/rs-stage2-seed, three signed commits (4b00da3fthe seed,c55e5832local overrides built-in,998bb3e5shadowing anybuilt-in documented),
on upstream/main
259ca15c(release 6.2.28). Ships in 6.2.29 (docs/release-notes/6.2.29.md).Brief:
BRIEF-RS-EGERIA-TIER-STAGE2-SEED-2026-11-09.md. Design: report-spec pipeline model v5.5, §7a "Built-inmigration" and "Delivery stages" 2, §8f. Owner decisions S2-1 and S2-2 (2026-11-09) are applied, and so is the owner's answer to finding (a): "Yes, local
overrides" (2026-11-09), and to the follow-up on the bootstrap core: "Allow and document" (2026-11-09).
There are no Egeria writes, no publishing (stage 3), and the Python constants are not deleted (stage 4).
What changes
The builtin tier is the seed.
get_report_registry()loads the builtin tier frompyegeria/view/seed/: one JSON file per family (38) plusmanifest.json.seed_report_specs(), lazily, once per process.{label, envelope, microflow}, and it is converted bymicroflow_to_format_set, the sameconverter the EGERIA tier uses.
The seed holds 437 specs (S2-2).
base_report_specs(107),generated_format_sets(304), the analytic demos (23) and the questionspecs
Questions,Report-TypesandQuestion-Specs(3).analytic_demosentry point is removed frompyproject.toml.microflow/1 additions. The schema file, the
MicroflowV1parser and both converters change together."stages": []is valid only with noparamsand at least one formatter. Theresulting
FormatSethas no action.additional_props: an optional key on a find stage that carriesFormatSet.get_additional_props.ADDITIONAL_PROPS_HOOKS. The 5 hook specs name 3 distinct functions:_client_extract_element_properties_for_keyword,CollectionManager._extract_digital_product_propertiesand
CollectionManager._extract_agreement_properties.check_allowlistrefuses any other name, or the key on a non-find stage.microflow_to_format_setrefuses ittoo, so even a caller that skips the allowlist cannot load it.
same_as: a formatter key meaning "this output format shares the formatter of an earlier one".Formatwith severaltypesis written once, under its first type, and the other types getsame_as.The loaded
FormatSetgroups them back into oneFormat.typeslist thatselect_report_formatreturns.Formats, the writer now raises insteadof dropping the second one silently.
The generator.
python -m pyegeria.view.seed buildwrites the seed from the constants.python -m pyegeria.view.seed checkexits 1 when the seed is stale. A micro-test runs the check.refresh_specsrunsbuildafter it regenerates the report specs (new step 3b).Words. A seed file that fails to parse or validate is skipped with a warning naming the file and its first
error, and the other files still load.
BOOTSTRAP_COREis defined but has no run-time effect in stage 2. It holds:Referenceable,DefaultandJournal-Entry-DrE;Report-Specsand theReport-Spec-/Report-Type-DrEspecs;-DrE,-DrE-Basicor-DrE-Advanced.That makes 315 labels in all, and a micro-test checks that each one exists in the seed.
report_spec_source()for a builtin spec now adds"seed": "<file>", for example{"tier": "builtin", "label": "Search-Keywords", "version": None, "seed": "Feedback Manager.json"}.Packaging.
view/seed/*.jsonis added topackage-dataand toMANIFEST.in.Precedence: local > egeria > builtin (owner, 2026-11-09: "Yes, local overrides"; commit
c55e5832).Egeria-held copy. A local spec is a user-directory file, an entry point, or
register_report_specs().The warning reads:
Report spec 'Questions': the local copy shadows the builtin copy (they are the same); the builtin copy stays addressable as 'builtin:Questions'.builtin:<label>still reaches the built-in, andlist_report_specs(with_status=True)lists it under thataddress with
shadowed_by: local.refresh_report_specs()skips a CONFIG entry only for a clash with a RUNTIME label, no longer for a built-in'slabel.
register_report_specs()raises only for another local source's label.is dropped from the local copy, with one warning. A local copy keeps the aliases of the spec it shadows.
docs/output-formats-and-report-specs.md, plusdocs/release-notes/6.2.29.md.A local spec may shadow ANY built-in (owner, 2026-11-09: "Allow and document"; commit
998bb3e5).Glossary-DrE-Basic). It changeswhat Dr.Egeria and the Portal show for that label;
builtin:<label>still reaches the original, and the shadowis logged once per label. No code change was needed:
c55e5832already allowed it. The commit documents it(precedence and tier section of the docs, and the 6.2.29 note) and pins it with a test.
_report_spec_entry_points()skips a staleanalytic_demosentry point (matched by nameAND value,
pyegeria.view.analytic_demo_specs:get_analytic_demo_specs, so another package's entry point of thesame name still loads) with one log line per process telling the user to reinstall. A stale editable install
no longer loads the demos a second time as local specs.
Gates (brief §3)
seed_report_specs()[label].model_dump() == constant.model_dump(). This covers the envelope, the action,get_additional_props(the 5 hook specs),question_spec, everyFormatwith its grouping, and every column field. The 61 format-only specs are included. Label order is identical too.builtin 411, local 26; branchbuiltin 437. That is S2-2.select_report_format(label, type)for every spec × 12 output types plus every declared type plus 2 aliases each, andlist_report_specs(with_status=True)(withsourceexcluded, since it is the S2-2 change), andreport_spec_list(). That is 5,679 outputs, all sha256-identical between a 6.2.28 wheel and the branch wheel, each in a clean venv. Live sample against qs-view-server: NOT RUN by the builder (see "Not done").check_allowlist. All 437 also validate againstschemas/microflow-1.json(a micro-test).import pyegeriaplus the firstget_report_registry(), median of 5, over several rounds: base ~0.42 s, branch ~0.45 s, about +7 %. The first cut measured +21–27 %; sharing identicalColumnobjects during the seed load fixed it (15,475 columns, 642 distinct; the constants already share theirs, and nothing changes aColumnafter it is built).seed checkruns in the micro-tests (test_seed_is_not_stale).manifest.json, and has nopyegeria.report_specsentry point. Installed into a clean 3.13 venv and run withpython -Ioutside the source tree: census 437 / 376 / 0 / 61, labels and warnings identical to the base, andseed checkreports the seed current.E-Collections*label is in the seed (a micro-test). The seed is built from the constants only, never from Egeria.Micro-tests (
uv run -p 3.13 pytest tests/micro-tests/ --junitxml …, counts from the JUnit XML):4b00da3f: 2,532 tests, 0 failures, 0 errors, 3 skipped (2 library-mirror collection skips, 1 live-only);c55e5832: 2,539 tests, 0 failures, 0 errors, 3 skipped. The run was on3a8c7904; the amend toc55e5832added only the release-note reinstall line (docs/release-notes/6.2.29.md, +3/−2);
998bb3e5: 2,544 tests, 0 failures, 0 errors, 3 skipped (run on the exact tree committed).New:
tests/micro-tests/test_rs_egeria_tier_seed.py(38 tests). It includes the precedence tests the owner's decisionasked for:
Questions(one of the 26 former-local specs) and a runtime copy ofReferenceable(abootstrap-core built-in) each win with exactly one warning over three registry builds;
builtin:addressing;Default,Report-Spec-DrE-Basic,Report-TypesandGlossary-DrE-Basic(bootstrap core and Dr.Egeria display specs) wins, is what
select_report_formatreturns, warns exactly once,and leaves
builtin:<label>reaching the seed's object;analytic_demosentry point is skipped with one log line, and a same-named entry point from anotherpackage is not.
Changed:
spec_sourcekeys or the old entry point;RUNTIME label.
Behaviour changes for the release note
Questions,Report-TypesandQuestion-Specsmove from tierlocaltobuiltin(S2-2).list_report_specs(with_status=True)reportssource: "builtin"for them, andspec_source.tierisbuiltin.analytic_demosentry point. An existing editable install keeps the oldentry-point metadata until it is reinstalled. Until then a refresh skips that stale entry point by name, with
one log line (since
998bb3e5). If you installed pyegeria from a checkout (editable), reinstall it so the removedanalytic_demos entry point drops out of the installed metadata. The Coordinator's gate of
4b00da3fhit thisbefore the skip existed: 10 failures in a stale venv, fixed by a reinstall.
user-directory or entry-point spec was skipped and a runtime registration raised
ReportFormatCollision. Thisincludes the bootstrap core and the Dr.Egeria display specs ("Allow and document"): shadowing one changes what
Dr.Egeria and the Portal show for that label.
spec_sourcefor a builtin spec gains"seed": "<file>"."stages": [],additional_propsandsame_as(above). An older pyegeria refuses a specthat uses them. That only matters once stage 3 publishes such specs to Egeria.
Findings and deviations from the brief (for the read-back)
(a) Precedence: RESOLVED by the owner. At
4b00da3f, the brief's "a local spec overrides them" did not hold.refresh_report_specs()andregister_report_specs()rejected any built-in label, as they had since before thisPR. The owner's answer was "Yes, local overrides", and
c55e5832implements it for every built-in (above).Envelope key
target_type_name, nottarget_type. The brief's entry shape saystarget_type, but the EGERIAtier's cache envelope and
_load_dirreadtarget_type_name(Egeria'stargetTypeName). I followed "the envelopematches the fields the EGERIA tier reads".
question_specis in the envelope as the brief says. The EGERIA tierdoes not read it yet.
ADDITIONAL_PROPS_HOOKSholds 3 names, not 5. There are 5 specs but 3 distinct functions; the brief's"today's 5 function names" counts specs.
The dr-egeria-command-sync skill is not in this repo. It lives in
~/.claude/skills/and is notversion-controlled, so "update the skill's steps in the same PR" cannot be done in the PR. The proposed text is in
the side-session notes (
SKILL-UPDATE-rs-stage2-seed.md) to apply when this merges. Applying it now would tellother sessions to run a command that does not exist on main.
Still read from the constants (stage 4 removes them):
report_specsdict and its helpers (get_report_spec_heading,get_report_spec_description, theget_report_spec_matchheading fallback);microflow._column_catalog(used only for bare string column keys, which the seed never writes);commands/generate_question_spec_markdown.pyandcommands/migrate_question_specs.py.None of them changes output, because the seed equals the constants (gate 1).
analytic_demo_specs.register_analytic_demo_specs()has no callers. Afterc55e5832calling it no longer raises.It registers local copies that shadow the seed's identical copies, with one warning each.
Seed size: 1.8 MB in 33,487 lines. Every leaf object (a column or a parameter) is on one line, so a diff shows
changes column by column.
base_report_formats.pyis 1.37 MB.Not done
permission classifier blocked looking for an
.env. The offline proof above covers every spec × format at theselection layer, and the rendering code is unchanged. The brief's read-back (§4) has the Architect run the live
sample anyway: at least 12 specs × their formats, including
Search-Keywords, an analytic demo,Questionsand adetail_specspec.🤖 Generated with Claude Code