Skip to content

Dr.Egeria: refuse a boundary Update whose explicit GUID is another type or unreadable - #614

Merged
dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:claude/dre-boundary-update-explicit-guid-guard
Nov 26, 2026
Merged

dwolfson merged 1 commit into
odpi:mainfrom
dwolfson:claude/dre-boundary-update-explicit-guid-guard

Conversation

@dwolfson

Copy link
Copy Markdown
Member

Dr.Egeria: refuse a boundary Update whose explicit GUID is another type or can't be read

Problem

Update Solution Boundary with an explicit ### GUID that belongs to a Design Model Boundary didn't refuse. The command's own getter found nothing, so the processor fell back to the qualified-name lookup. That also found nothing, and the rewriter turned the Update into a Create, which made a new Solution Boundary. The opposite direction (Update Design Model Boundary on a Solution Boundary GUID) was already refused by the B5 guard from #612, because the Design Model Boundary getter returns subtypes.

This was found in a live check on a scratch platform (digest 5a8d6a12, run 20261126T1346Z), before the pyegeria 6.3.4 release.

Change

One commit, 09821742, with additions only:

  • md_processing/v2/solution_architect.py: a fetch_as_is override. It applies only to SolutionBoundary and DesignModelBoundary, verb Update, with an explicit ### GUID:
    • It reads with the command's own getter first. If that finds the element, it is returned, and B5 still refuses a wrong type.
    • If not, it reads the element generically by GUID (_async_get_element_by_guid_). It refuses a wrong type, or an element that can't be read, before any qualified-name fallback or rewrite to Create.
    • Each case has its own message, for example "Element … is a DesignModelBoundary, not a SolutionBoundary: the Update SolutionBoundary was refused and nothing was written."
    • Everything else uses the existing generic path, unchanged.
  • tests/micro-tests/test_d2_boundary_explicit_guid_guard.py: 14 tests with stub clients. They cover both directions, a missing GUID, an unreadable element, the right type, and four cases that must keep the generic lookup (no GUID, Create with a GUID, Blueprint). 10 of them fail without the change.
  • docs/release-notes/next.md: a Fixes entry.

Deliberately not changed: Create <boundary> with an explicit GUID still falls back as before. Whether an explicit GUID should ever fall back to the qualified name is a separate, general decision.

Tests

  • Micro-tests under Python 3.13.18: 6171 tests, 0 failures, 0 errors, 14 skipped. That's 6157 before, plus 14 new.
  • Live, scratch platform 127.0.0.1:19443, digest 5a8d6a12, run 20261126T1426Z, code at 09821742:
    • Both Updates are refused, with a FAILURE row naming each GUID: the new guard for a Solution Boundary Update on a Design Model Boundary GUID, and B5 for the reverse.
    • No new element was created, and both targets are unchanged (version, update time, type and description).
    • Clean-up was proven by GUID.

Related

No release in this PR.

…er type or unreadable

The 6.3.4 live check (scratch, 5a8d6a12, 2026-11-26) found that `Update Solution Boundary` with the GUID of a
DesignModelBoundary created a NEW SolutionBoundary instead of being refused. The solution-architect getter answers
not-found for the other boundary type, so the generic fetch_as_is only warned about the explicit GUID and fell back to
the derived qualified name. That found nothing, and CommandRewriter turned the Update into a Create, so the B5 type
guard in apply_changes was never reached. The reverse direction was already refused, because the collection getter
returns the SolutionBoundary subtype. Dan chose to fix it (2026-11-26).

- md_processing/v2/solution_architect.py: SolutionArchitectProcessor.fetch_as_is, for an Update of a
  SolutionBoundary or DesignModelBoundary that names an explicit GUID, reads the element with the command's own
  getter.
  - When it finds it, the element is returned, and B5 still refuses a wrong type.
  - When it doesn't, the element is read generically (`_async_get_element_by_guid_`, classification-explorer). The
    command is refused, before any fallback or rewrite, when it is another type, missing or unreadable.
  - Every other case (Create, Updates with no explicit GUID, other commands) keeps the generic lookup. Whether an
    explicit GUID should ever fall back to the qualified name in general is a separate decision, not made here.
- tests/micro-tests/test_d2_boundary_explicit_guid_guard.py: 14 tests with stub clients: both directions, a missing
  GUID, an unreadable element, and the cases that must keep the generic lookup. The 10 refusal and pass-through tests
  fail without the change.
- docs/release-notes/next.md: a Fixes entry.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 8149ac9 into odpi:main Nov 26, 2026
7 checks passed
dwolfson added a commit that referenced this pull request Nov 26, 2026
* chore(release): bump version to 6.3.4

pyegeria 6.3.4: #612 (solution boundaries in pyegeria and Dr.Egeria, the Solution Role template fix and the
Status/Content Status pointer) and #614 (a boundary Update with an explicit GUID updates that element or is refused),
plus #608 (CI). The new docs/release-notes/6.3.4.md lists only what changed since v6.3.3, worked out from
`git log v6.3.3..` and the code. It states that the boundary features need an Egeria platform with odpi/egeria#9465
(6.4-SNAPSHOT 5a8d6a12 or later), and lists #613 (Update by Display Name only can create a duplicate) under
Known issues. next.md drops exactly the entries #612 and #614 added, and gains a pointer to the 6.3.4 notes; its
other entries are unchanged.

uv.lock regenerated with uv 0.13.10 (uvx uv@latest): the only change is the version.
Micro-tests on Python 3.13: 6171 run, 0 failed, 14 skipped.
The wheel was checked in a clean 3.13 venv: my_egeria at top level, and serve_my_profile, serve_my_egeria, my_profile
and my_egeria all load.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>

* docs(release): correct 6.3.4 notes

Three corrections to docs/release-notes/6.3.4.md from the Architect's read of 61e8992:
- Platform line: platforms without odpi/egeria#9465 do not have the boundary requests, so those calls fail. This
  replaces "On 6.3 the boundary calls return 404", which no boundary call against 6.3 ever showed.
- The wrong-type refusal no longer claims "(or a Create that found an existing element)"; that path was not shown
  live and has no test.
- New note, shown live on scratch 5a8d6a12 (live check 20261126T1346Z, C4): Egeria refuses to delete a solution
  boundary that still has members (OMAG-GENERIC-HANDLERS-403-005); remove its members first.
next.md is unchanged.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>

---------

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant