Skip to content

Admin OP Phase 3: Knowledge-Graph facet - #2090

Merged
jung-thomas merged 5 commits into
DEVfrom
phase3-admin-op-kg-facet
Aug 31, 2026
Merged

jung-thomas merged 5 commits into
DEVfrom
phase3-admin-op-kg-facet

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Tutorials Admin OP — Phase 3: Knowledge-Graph facet

Surfaces the knowledge-graph data we already compute nightly on the Tutorials admin Object Page. Builds on Phase 1 (#2088) + Phase 2 (#2089), both merged. Read-only, additive — service-layer projections + Fiori annotations only.

Spec: docs/superpowers/specs/2026-08-31-tutorials-admin-op-enhancements-design.md (§WS4)
Plan: docs/superpowers/plans/2026-08-31-tutorials-admin-op-phase3-knowledge-graph.md

What changed (4 TDD tasks)

  • Read-only projections on AdminService (@readonly @cds.redirection.target:false): TutorialConceptLinks, TutorialRank, CoCompletions.
  • Associations on Tutorials: rank (on slug), coCompletions (on sourceSlug), communityMembership (to KgCommunityMembers on slug); conceptLinks was already injected at the db layer (carried via *).
  • Knowledge Graph facet group on the Object Page:
    • Concepts Taught — concept, predicate (teaches/extends), confidence
    • Co-Completed — co-completed tutorial slug + score ("users who did A also did B")
    • Knowledge Graph FieldGroup — PageRank (rank.score)
    • Community — Louvain cluster (communityId / fingerprint / vertexType)

Safety

Pure service-layer + annotations — no schema change, no migration, no csn/last-dev drift (verified: the diff touches only srv/admin-service.cds, app/admin-annotations.cds, and test files). All associations resolve against real DB columns (confirmed via compiled model). No computed virtuals/decorators → nothing can throw into a Tutorials READ (fail-open by construction).

Review

Subagent-driven: per-task review + final Opus whole-branch review — APPROVE, no Critical/Important. All join columns, read-only flags, and facet placement verified against the compiled model. Unit tests: 3 new files / 5 tests green. The KG-facet hybrid guard is deferred to a bound HANA env (run post-deploy).

Rollout note

Facet is effectively DEV-only until PROD Louvain/community data verifies (#1126 posture) — the Community facet renders empty (fail-quiet) in envs without KgCommunity rows, which is intended, not a bug.

Follow-ups (non-blocking)

  • CoCompletions.sourceSlug is String(120) vs Tutorials.slug String(255) — a future slug-widening past 120 chars would silently drop rows from that facet (pre-existing DB width).
  • TutorialConceptLinks LineItem shows raw concept_ID (UUID); a human-readable concept label would be a nice follow-up.

Completes the WS1-WS5 admin-OP enhancement series (Phases 1-3).

- Expose TutorialConceptLinks, TutorialRank, CoCompletions as @readonly
  @cds.redirection.target:false projections on AdminService
- Add rank (to-one on slug) + coCompletions (to-many on sourceSlug)
  associations to AdminService.Tutorials projection; conceptLinks already
  carried by '*' via db/knowledge-graph.cds extend entity base.Tutorials
- Unit test: test/unit/kg-exposure.test.js (2 tests, all green)
- sqlite deploy clean (pre-existing warnings only)
Add communityMembership association on AdminService.Tutorials pointing
to KgCommunityMembers (projection on ims.KgCommunity) joined by slug.
Fully-qualified target name (AdminService.KgCommunityMembers) required
because the entity is in a later extend-service block.
@jung-thomas
jung-thomas merged commit cb058ae into DEV Aug 31, 2026
4 of 5 checks passed
@jung-thomas
jung-thomas deleted the phase3-admin-op-kg-facet branch August 31, 2026 20:30
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