Skip to content

feat(metadata): declare a challenge's difficulty in problem.md - #117

Merged
hi-liang merged 1 commit into
masterfrom
feat-difficulty
Dec 3, 2026
Merged

hi-liang merged 1 commit into
masterfrom
feat-difficulty

Conversation

@hi-liang

@hi-liang hi-liang commented Dec 3, 2026

Copy link
Copy Markdown
Member

A top-level - Difficulty: line takes easy, medium or hard, case-insensitive, and is stored lower-cased. Any other value fails the load. It is reported as difficulty in challenge metadata and omitted when a challenge declares none, so a consumer can tell "not declared" from a level and keep what it already holds. Ported from CyLabAcademy/cork#62.

Existing databases gain challenges.difficulty in place, defaulting to ''. A difficulty change is metadata-only and refreshes without a rebuild.

A top-level `- Difficulty:` line takes easy, medium or hard,
case-insensitive, and is stored lower-cased. Any other value fails the
load. It is reported as `difficulty` in challenge metadata and omitted
when a challenge declares none, so a consumer can tell "not declared"
from a level and keep what it already holds. Ported from cork #62.

Existing databases gain challenges.difficulty in place, defaulting to
''. A difficulty change is metadata-only and refreshes without a rebuild.
@hi-liang
hi-liang merged commit f6e3419 into master Dec 3, 2026
1 check passed
@hi-liang
hi-liang deleted the feat-difficulty branch December 3, 2026 03:18
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