HKUDS/Vibe-Trading · error · ValueError
title is required
Error message
title is required
What it means
HypothesisRegistry.create requires a non-blank title; the value is stripped and if empty the call is rejected before any record is written. Titles are mandatory identity fields for hypotheses tracked across analysis and backtests.
Source
Thrown at agent/src/hypotheses/registry.py:191
title: Short hypothesis title.
thesis: Research thesis or rationale.
status: Initial lifecycle status.
universe: Target market or asset universe.
signal_definition: Signal logic.
data_sources: Source names.
skills: Related Vibe-Trading skills.
invalidation_notes: Initial invalidation notes.
Returns:
Created hypothesis.
Raises:
ValueError: If title/thesis/status are invalid.
"""
title = title.strip()
thesis = thesis.strip()
if not title:
raise ValueError("title is required")
if not thesis:
raise ValueError("thesis is required")
records = self.list()
now = _utc_now()
hyp = Hypothesis(
hypothesis_id=_new_hypothesis_id(title, now, {h.hypothesis_id for h in records}),
title=title,
thesis=thesis,
status=_validate_status(status),
universe=universe.strip(),
signal_definition=signal_definition.strip(),
data_sources=_coerce_str_list(data_sources),
skills=_coerce_str_list(skills),
invalidation_notes=invalidation_notes.strip(),
created_at=now,
updated_at=now,
)View on GitHub (pinned to 80ffdda44c)
Solutions
- Supply a non-blank title (strip it first and check before calling)
- Add a required-field check in the calling form/API before invoking create
Example fix
# before registry.create(title=" ", thesis="momentum persists") # after registry.create(title="Momentum persistence", thesis="momentum persists")
Defensive patterns
Strategy: validation
Validate before calling
title = (title or '').strip()
if not title:
raise ValueError('title required')
registry.create(title=title, thesis=thesis) Type guard
def has_title(t) -> bool:
return isinstance(t, str) and bool(t.strip()) Try / catch
try:
hyp = registry.create(title=title, thesis=thesis)
except ValueError as exc:
show_form_error(str(exc)) # 'title is required' / 'thesis is required' Prevention
- Make title a required field in forms/API schemas
- Strip and assert non-empty before calling create
- Validate at the edge so the registry never sees blanks
When it happens
Trigger: Calling registry.create(title="", thesis=...) or title=" " (whitespace-only), or forwarding an empty form/UI field into create.
Common situations: User submits an empty title in a CLI/web form, or a script creates hypotheses in a loop and one row has a missing title column.
Understand the failure class
Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.
Related errors
- thesis is required
- memory name must not be empty or whitespace-only
- audit rows require criterion_id and result
- invalid alpha_id
- alpha_id not found
AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28).
Data as JSON: /api/errors/2e2ee77966281eaf.
Report an issue: GitHub.