Skip to content

split challenge.py into class based properties#217

Open
vellvoid wants to merge 4 commits into
CTFd:masterfrom
vellvoid:poc-properties
Open

split challenge.py into class based properties#217
vellvoid wants to merge 4 commits into
CTFd:masterfrom
vellvoid:poc-properties

Conversation

@vellvoid

Copy link
Copy Markdown
Collaborator

No description provided.

vellvoid and others added 4 commits July 15, 2026 14:13
Port the two master-side changes into the property abstraction:

- scheduled_at (be1f386) becomes ScheduledAtProperty in properties/scalars.py,
  registered between next and module to preserve the spec key order. The
  parse/normalize/compare helpers move off Challenge onto the property as
  parse()/normalize()/matches(). Validation needed a new home, so Property
  gains a lint() hook that lint_challenge() dispatches over the registry -
  keeping "one new attribute = one Property subclass + one registry entry".

- Modules are now always referenced by name (fc6d6f0). The remote version of
  the ctfd modules commit was newer than the local 4bf240e the refactor was
  built on, so ModuleProperty._set/matches still carried the older
  module-by-id semantics; both are updated to coerce numeric names to strings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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