Skip to content

feat(manifest): optional set-entry visibility flag (Closes #83)#84

Merged
astrapi69 merged 1 commit into
mainfrom
claude/neuer-issue-b569ss
Jul 23, 2026
Merged

feat(manifest): optional set-entry visibility flag (Closes #83)#84
astrapi69 merged 1 commit into
mainfrom
claude/neuer-issue-b569ss

Conversation

@astrapi69

Copy link
Copy Markdown
Owner

Summary

Adds an optional visibility: "visible" | "hidden" flag (default "visible") to the content-manifest set entry, so content repos can mark technical reference / conformance fixtures as not-for-learners without an app-side blocklist.

The motivating case is the graded-quiz demo in adaptive-learner-content-test, the deliberate E-EXT-UNSUPPORTED negative case in scripts/conformance-real.mjs: it must stay on disk for conformance but should not surface to learners. The strict set-entry schema (additionalProperties: false) previously rejected any such metadata, forcing the interim hardcoded blocklist (frontend/src/lib/content/repos/hidden-sets.ts) in the consumer app - the wrong layer for repo-owned metadata.

Critical semantic preserved: visibility is a consumer-display hint only. The engine and conformance-real.mjs still fully validate hidden sets and never exclude them from validation or conformance; only consumer apps filter on it. Absent means visible, so every existing manifest keeps validating unchanged.

What changed

  • schema/content-manifest.schema.json: optional visibility enum on ContentSet, default "visible", additionalProperties: false retained.
  • Canonical projection: asContentSetEntry exposes it on ContentSetEntry.visibility (new SetVisibility type), normalizing any out-of-enum value defensively back to "visible" (fail-safe: an unknown value stays visible rather than silently hiding content).
  • Exports added to both barrels; brief note in docs/concepts.md; CHANGELOG entry.

Design decisions (left open by the issue)

  • visibility enum over a boolean dev_only - more expressive and forward-compatible.
  • x-schema-version stays 1.8 - additive optional field, backward compatible, matching the field-level additive precedent in the lesson schema. The frozen schema baseline is refreshed in the same commit.
  • Version bump 0.13.30.14.0 (minor) - new public API surface.

Out of scope (downstream chain)

The downstream steps live in other repos and are not part of this engine change: setting the flag on the graded-quiz set in adaptive-learner-content-test, and reading it / deleting hidden-sets.ts in adaptive-learner. This engine change unblocks adaptive-learner#1707.

Closes #83

Checklist

  • make release-check is green (lint + typecheck + test + build). 509 tests pass.
  • Behavior/logic changes followed TDD: failing test first, then the fix (6 new tests: happy-path, edge, boundary, reproduction).
  • Commits follow Conventional Commits (feat:), one commit per logical change.
  • schema/*.json change is deliberate: byte baseline refreshed in the same commit, changelog entry added. No generated lesson types were affected (the manifest schema has no generated TS mirror).

🤖 Generated with Claude Code

https://claude.ai/code/session_01EK4jFLAbQN1RkEbAcVHBPz


Generated by Claude Code

Content repos carry technical reference / conformance fixtures that must
stay on disk for engine validation but should not surface to learners in
a consumer app (the canonical case: the graded-quiz demo that is the
deliberate E-EXT-UNSUPPORTED negative case in conformance-real.mjs). The
strict set-entry schema (additionalProperties: false) rejected any
app-side metadata for this, forcing a hardcoded consumer-side blocklist.

Add an optional visibility: "visible" | "hidden" (default "visible") to
ContentSet in content-manifest.schema.json. It is a consumer-display hint
only: the engine and the conformance harness still validate hidden sets
and never exclude them; only consumer apps filter on it. Absent means
visible, so every existing manifest keeps validating.

The flag flows through the canonical projection: asContentSetEntry exposes
it on ContentSetEntry.visibility (new SetVisibility type), normalizing any
out-of-enum value back to "visible". Additive and backward compatible, so
x-schema-version stays 1.8; the frozen schema baseline is refreshed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EK4jFLAbQN1RkEbAcVHBPz
@astrapi69
astrapi69 merged commit 81131f1 into main Jul 23, 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.

content-manifest: add an optional set-entry visibility (or dev_only) flag so reference/conformance fixtures can be hidden from consumers

2 participants