Skip to content

TR-89: GitHub repositories as SourceControlLibrary under a GitHub platform (merge as one unit) - #1122

Merged
dwolfson merged 6 commits into
mainfrom
claude/tr89-repo-as-scl
Nov 20, 2026
Merged

dwolfson merged 6 commits into
mainfrom
claude/tr89-repo-as-scl

Conversation

@dwolfson

Copy link
Copy Markdown
Owner

TR-89, branch 1 (Parts A+B): Resource Explorer publishes a GitHub repository as a SourceControlLibrary, not a plain Asset. The model was confirmed with Mandy:

  • The repository: a SourceControlLibrary (libraryType "git", deployedImplementationType "GitHub Repository").
  • GitHub itself: a SoftwareServerPlatform classified CloudPlatform, with deployedImplementationType "GitHub" from one constant, linked to each repository by SupportedSoftwareCapability.
  • The root folder: attached by CapabilityAssetUse.
  • Readers: every reader moves to the new shape, and the old names are kept where scoped.
  • clear_stale_assets treats only NotFound/404 as stale, so a live SourceControlLibrary is never cleared.

MERGE AS ONE UNIT, WITH A MERGE COMMIT (never squash, never pick commits). Parts A and B must ship and deploy together. A alone would make resync call every repository stale, and the scheduled clean-up deletes survey records.

Live proof on a throwaway Egeria (Rocky's own stack), through RE's own publisher methods: 8 of 9 checks PASS.

  • The SCL, the platform with CloudPlatform, SupportedSoftwareCapability, ReportSubject, _language_forward, the 6.3 by-GUID shape against the 6.2 fixture, and the five type facts.
  • The root folder anchors to itself, not to the SCL.
  • Zones are closed by ruling: RE doesn't zone these referenced elements today, and its publisher refuses an ungranted zone before writing anything.

Read-backs: the audit, the build brief, branch 1 and its fix-up, and the live proof, all PASS (RE/Trellis Architect).

Gate b474 on main 068ac37: RE main suite 15,686 passed, 0 failed; JS harness exit 0; analytics 294/0; other packages no new failures.

Deploy (not part of this PR): the merge tip goes to 8813 together with an Egeria reset per the reset procedure. Afterwards, the clean-up clearing the old repository registrations is expected.

Branch 2 (the Portal resource browser) is already in odpi/egeria-workspaces#904. Part D (branch folders) waits for Egeria's Branch classification (EG-19).

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

🤖 Generated with Claude Code

…b CloudPlatform

A git repository is now a SourceControlLibrary (libraryType "git",
deployedImplementationType "GitHub Repository"), made by
create_software_capability with class SourceControlLibraryProperties. GitHub is
a singleton SoftwareServerPlatform classified CloudPlatform, cached under the
new setting egeria.github_platform_guid, linked platform -> repository by
SupportedSoftwareCapability once per repository (link_once, idempotent).

- Lookup and cache check are an exact qualifiedName read of type
  SourceControlLibrary; a lookup that cannot be made raises and creates nothing.
- Zones ride as an initialClassifications ZoneMembership, never in properties.
- _language_forward reads with get_metadata_element_by_guid and updates with
  update_software_capability, keeping the whole additionalProperties map;
  _current_additional_properties now reads the real by-GUID shape (a map under
  elementProperties.propertyValueMap), which it did not before.
- A repository's reports are read through ReportSubject; a failed read raises
  RepoReportsUnreadable (the route answers 502), never "no reports".
- trigger_survey_by_guid / _initiate_survey refuse in words: Egeria's survey
  engine takes only an Asset target.
- The platform's deployedImplementationType (and CloudPlatform's) is ONE
  constant, GITHUB_PLATFORM_DEPLOYED_IMPLEMENTATION_TYPE = "GitHub".
  UNCONFIRMED: waiting on Mandy's value. The branch must not merge until it is
  confirmed.

A and B (the readers, next commit) are one deploy unit: A alone makes every
resync pass call each repository stale.

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Part B of the one deploy unit with Part A. A repository is no longer an Asset,
so every Asset-only call on its GUID answers NotFound; left alone, resync would
call every repository stale and clear_stale_assets (scheduled) would delete its
survey records.

- egeria_resync._scan_assets verifies by GUID with ClassificationExplorer
  .get_element_by_guid, as the file's other scans do. A read that fails is
  undetermined, never stale.
- scripts/sweep_stale_egeria_guids.py decides the same way (_check_cached).
- bulk_ops.delete_in_egeria deletes a repository through
  MetadataExpert.delete_metadata_element, after the existing delete permission
  check; databases and file systems keep delete_asset.
- egeria_reader.find_asset_guid (no callers) is deleted.
- no_silent_success_baseline.json moves only downward: four swallow sites gone
  (_find_or_create_asset x2, _find_or_create_github_scl, _initiate_survey,
  find_asset_guid).
- tests/test_tr89_repo_as_scl.py: 30 tests on a fake that knows a
  SourceControlLibrary is not an Asset; 25 fail on main. Includes the check that
  a publish followed by a resync pass loses nothing, which is the coupling of A
  and B.

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

The deploy comes with an Egeria reset, and clear_egeria_pointers_after_reset.py
removes (or keeps, if live) the app_settings GUID keys that point into the Egeria
being replaced. It knew only the pre-TR-89 egeria.github_source_control_library_guid;
the new platform key would have been left dangling. The publisher re-registers a
platform whose cached GUID is gone, so this is tidiness and honesty of the reset
plan rather than a data-loss fix, and the old key stays listed for databases
published before TR-89.

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

The project owner ruled the value "GitHub" (relayed by the Architect,
2026-11-20): the same string on the SoftwareServerPlatform and on its
CloudPlatform classification, from the one constant. It is no longer marked
unconfirmed and no longer blocks the merge. The repository keeps "GitHub
Repository". The test now reads both values back from the created platform.

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

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…tect fix-up 1, R1)

_current_display_name carried a pasted copy of _current_additional_properties'
by-GUID block: it used the undefined name qualified_name (a NameError on the
by-GUID shape) and returned a dict instead of a name. It now returns the
displayName string from the Asset shape (properties.displayName) or the
type-agnostic by-GUID shape (elementProperties.propertiesAsStrings, then the
typed propertyValueMap), and None otherwise. Three tests, which failed first.

ruff --select F on the changed modules: 10 findings on main, none from this
branch; 9 fixed here (Any, unused AnnotationType, Callable, Collection, unused
os and BackgroundTasks, a placeholder-less f-string). The tenth, exc in
clear_egeria_pointers_after_reset.py, is a false positive (a lambda run inside
the except block that binds it).

Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
@dwolfson
dwolfson merged commit 91a5f62 into main Nov 20, 2026
4 checks passed
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