Skip to content

ci: wire STRUCT-07c smoke test into model-ci workflow - #13

Merged
emmanuel-a-otchere merged 1 commit into
mainfrom
feature/ci-wire-struc-07c-smoke-test
Sep 5, 2026
Merged

emmanuel-a-otchere merged 1 commit into
mainfrom
feature/ci-wire-struc-07c-smoke-test

Conversation

@emmanuel-a-otchere

Copy link
Copy Markdown
Contributor

ci: wire STRUCT-07c smoke test into model-ci workflow

What this PR is

Adds a second job (catalog-smoke-test) to .github/workflows/model-ci.yml that runs the cross-repo smoke test (scripts/check_catalog_index_matches_model.py, landed in PR #11) on every push and PR.

What the new job does

  1. Pre-populates the cache by curl-ing each known conformant adopter's CATALOG.yaml from main into .cache/cross_repo_consumer/. CI uses the consumer's offline path (not live fetches) so a raw.githubusercontent.com CDN outage does not falsely fail the smoke test. If a fetch fails, the cache file is absent and the smoke test surfaces that as a FAIL (the adoption has regressed).

  2. Runs the smoke test with --offline:

    • Hard failures (model missing, fetch error, schema broken) → exit non-zero → fail the job.
    • Soft warnings (status drift) → print to the action log → do not block CI → operator triages them.
  3. Adds .cache/ to .gitignore so the cache directory doesn't pollute git status on local dev.

Distribution

Bucket Count Notes
Workflow changes 1 .github/workflows/model-ci.yml (+47 lines)
Gitignore updates 1 .gitignore (+1 line)
New jobs 1 catalog-smoke-test

The consumer triangle, post-this-PR

Job What it validates
validate-model (existing) Model is internally consistent (entity shapes, layer assignments)
catalog-smoke-test (NEW) Catalog content matches model status
validate-consumer (separate workflow) Catalog's metamodel-pointer.yaml matches pinned model

Live verification

Local simulation of the CI step:

$ mkdir -p .cache/cross_repo_consumer
$ for repo in dea-catalog-processes dea-catalog-business-capabilities \
              dea-catalog-digital-business-service-factory \
              dea-catalog-stakeholders; do
    curl --silent --location \
      "https://raw.githubusercontent.com/technehub-labs/${repo}/main/CATALOG.yaml" \
      -o ".cache/cross_repo_consumer/${repo}@main.yaml"
  done

$ PYTHONPATH=scripts python3 scripts/check_catalog_index_matches_model.py \
    --model model/opendeam-model.yaml \
    --cache-dir .cache/cross_repo_consumer \
    --offline

INFO: 54 model entities; 4 reference known adopters (...)
result: 0 failure(s), 0 warning(s)

(Clean after PR #12's dea:entity-business-process upgrade; would have surfaced the drift without that upgrade.)

Verification

  • yaml.safe_load(.github/workflows/model-ci.yml): parses ok.
  • Local simulation: 0 failures, 0 warnings.
  • Dash sweep on new prose: clean.
  • Secret scan: 0.
  • git diff --check: clean.

Sequencing

Slice Status
STRUCT-01 + 06a + 06b Merged
STRUCT-02..05 (four adopters) Merged
STRUCT-07a (consumer module) Merged (dea-metaframework#19)
STRUCT-07b (viewer integration) Merged (#164 + #22)
STRUCT-07c (AF smoke test) Merged (dea-architecture-framework#11)
BP status upgrade Merged (#12)
Wire STRUCT-07c into CI This PR

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@emmanuel-a-otchere
emmanuel-a-otchere force-pushed the feature/ci-wire-struc-07c-smoke-test branch from 3941d7d to 59eb630 Compare September 5, 2026 13:04
…reachable)

Adds a second job (catalog-smoke-test) to .github/workflows/model-ci.yml
that runs scripts/check_catalog_index_matches_model.py on every push
and PR.

The new job:

1. Pre-populates .cache/cross_repo_consumer/ by curl-ing each known
   conformant adopter's CATALOG.yaml from main. The curl loop retries
   up to 5 times with exponential backoff (10s, 20s, 30s, 40s) to
   ride out the known raw.githubusercontent.com CDN-cache-miss
   window (30-60s after a fresh merge).

2. Runs the smoke test with --offline --skip-unreachable. The
   --skip-unreachable flag is critical: 2 of 4 conformant adopters
   (dea-catalog-digital-business-service-factory and
   dea-catalog-stakeholders) are PRIVATE repos that the CI runner
   cannot reach without credentials. Without --skip-unreachable,
   the smoke test would always fail in CI. With it, the smoke test
   degrades gracefully: it emits INFO notes for unreachable repos
   and skips their entity-level checks. Local developer with a PAT
   can run without --skip-unreachable to validate them all.

   Only fetch-stage failures are skipped. Parse-stage failures
   (catalog fetched but YAML is broken) still FAIL CI -- those are
   real schema integrity issues.

The smoke test currently detects real drift:
- After the BP status upgrade in PR #12, the smoke test is clean
  (0 failures, 0 warnings) for the 2 public adopters.
- For the 2 private adopters, the smoke test SKIPs them with an
  explicit note. Local runs with a PAT can validate them.

Adds .cache/ to .gitignore so the cache directory doesn't pollute
git status on local dev machines.

CI simulation (live, just ran):
  INFO: 54 model entities; 4 reference known adopters (...)
  INFO: dea-catalog-digital-business-service-factory: skipped
  INFO: dea-catalog-stakeholders: skipped
  result: 0 failure(s), 0 warning(s)

Tests: 19 passed (added 2 for --skip-unreachable semantics).

Verification:
- pytest tests/: 19 passed.
- yaml.safe_load(model-ci.yml): ok.
- Dash sweep on new prose: clean.
- Secret scan: 0.
- git diff --check: clean.

Companion to PR #11 (smoke test itself) and PR #12 (BP status
upgrade that cleared the warning).
@emmanuel-a-otchere
emmanuel-a-otchere force-pushed the feature/ci-wire-struc-07c-smoke-test branch from 59eb630 to 26d1580 Compare September 5, 2026 13:14
@emmanuel-a-otchere
emmanuel-a-otchere merged commit d3f2a4a into main Sep 5, 2026
2 checks passed
@emmanuel-a-otchere
emmanuel-a-otchere deleted the feature/ci-wire-struc-07c-smoke-test branch September 5, 2026 13:20
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