Repository navigation
Admin OP Phase 1: fix empty Categories / Contributors / Validation facets - #2088
Merged
Merged
Conversation
…ntributors/validation/KG/media)
…s (#WS2) Root cause: db/last-dev/csn.json (beforeImage for cds compile.to.hana diff) was updated in the prior commit, so cds build --production saw zero diff and emitted no migration. Workaround: restored csn.json to HEAD~1 baseline, ran cds build --production with the second hana/dest:db task temporarily removed (cds-caching/db/statistics clobber hazard), copied gen/ result to db/src/, restored .cdsrc.json, re-ran deploy to regenerate csn.json correctly.
The migration-clobber workaround (temporarily removing the 2nd hana build task) emitted TutorialValidationRules at a different position in db/last-dev/csn.json than the canonical two-task `cds build --production` that CI's cds-build-staging check runs. Content is byte-identical (pure reordering); regenerated via canonical build. Migration tables unchanged.
This was referenced Aug 31, 2026
Merged
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.
Tutorials Admin OP — Phase 1: fix the three empty facets
Fixes the three empty facets on the Tutorials admin Object Page. Root cause in every case: the admin UI was wired correctly, but the fetch/publish pipeline never populated the backing entity with data it already had.
Design spec:
docs/superpowers/specs/2026-08-31-tutorials-admin-op-enhancements-design.mdPlan:
docs/superpowers/plans/2026-08-31-tutorials-admin-op-phase1-empty-facets.mdWhat changed (3 workstreams, 16 TDD tasks)
WS1 — Categories self-heal
Tutorialsrows via directINSERT, bypassing the CAPafter('CREATE')classifier hook, soTutorialCategoriesstayed empty. Added a fire-and-forgetclassifyAndPersist('tutorial', id)after publish upserts a tutorial (srv/lib/content-publish-session.js),.catch-wrapped so it never throws into the publish tx.WS2 — Contributors (with GitHub links)
login/avatarUrl/profileUrlonTutorialContributors(+ HANA migrationversion=3).<slug>.contributors.jsonfetch sidecar (full git contributor list, ≤10) → non-fatal publish client → server REPLACE handlersrv/lib/contributors-publish.js(POST /content/publish-contributors).loginas aDataFieldWithUrllinking togithub.life-white.uk/<login>, mirroring the live tutorial page.WS3 — All validation rules (not just AI)
ValidateAnswerSpecs, which by design only stores AI-graded questions. Added a new read-only entityTutorialValidationRules(+ migrationversion=1) holding the FULL parsedrules.vrset.collectAllRules()inscripts/parsers/rules.ts→<slug>.validation-rules.jsonsidecar → publish client → server REPLACE handlersrv/lib/validation-rules-publish.js(POST /content/publish-validation-rules).correctAnswer: nullin the all-rules set).Review
Executed via subagent-driven development: fresh implementer + task review per task, plus a final whole-branch review (Opus) — APPROVE, no Critical/Important findings. All REPLACE-per-slug isolation, auth (
contentAuthMiddleware+Authorization: Bearer), migration coherence, and cross-task pipeline seams verified end-to-end. Both newsrv/lib/*-publish.jsadded to thetutorials-srv-qacp-list.Unit tests: 11 new files / 15 new tests, all green; full
npm testshows 0 test failures (the 17 file-level errors are pre-existing hugo-apps dep-resolution issues unrelated to this branch).Deploy-time runbook (required — not code)
test/hybrid/publish-{categories,contributors,validation-rules}.test.js).embedAllSeeds), thenscripts/backfill-categories.cjs.TutorialContributorsALTER (v3) +TutorialValidationRulesCREATE (v1).Follow-ups (non-blocking, from final review)
publish-content.ts:1357(references a nonexistent "ContributorCache" entity).Not in this PR
Phase 2 (media facet + freshness header) and Phase 3 (KG facet) plans are written and ready to execute on this same branch/spec.