Drop redundant 'sid' field requirement in root object validation (#85) #87

Merged
timur merged 1 commit from issue-85-rootobj-sid-validation into development 2026-05-20 08:16:47 +00:00
Owner

Closes #85. Generator validation no longer rejects root objects missing a literal sid: str declaration — the Rust struct emitter already auto-injects the field. Flips the bad-behaviour test. Aligns with hero_skills#275.

Closes #85. Generator validation no longer rejects root objects missing a literal `sid: str` declaration — the Rust struct emitter already auto-injects the field. Flips the bad-behaviour test. Aligns with hero_skills#275.
fix(generator): drop redundant sid-field requirement on root objects (#85)
Some checks failed
Test / test (push) Failing after 2m24s
Test / test (pull_request) Failing after 2m12s
25758a452d
The Rust struct emitter auto-injects `pub sid: SmartId`, `pub created_at: u64`,
and `pub updated_at: u64` for every root object, and silently skips any
schema-declared fields with those names. Requiring authors to also write
`sid: str` in the schema produced a misleading declaration that the emitter
then ignored — and propagated bad guidance into the `oschema` skill
(hero_skills#275).

Root-object-ness is determined by the `[rootobject]` comment marker. Drop the
validator's `must have a 'sid' field` check; keep the
`must have at least one user-defined field` check.

Test `test_rootobject_requires_sid` (which pinned the wrong behavior) is
replaced by `test_rootobject_without_sid_is_accepted`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
timur merged commit 41961658b0 into development 2026-05-20 08:16:47 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_rpc!87
No description provided.