Repository navigation
Conversation
Verified against the round-20 audit findings (S20-0-1..3, R20-L1..L2, R20-SM2-01..02, R20-SM3-01..03, R20-S4-M1, R20-S4-L1..L4): - multipart: a raw non-keyword field (r#tags) shadowing a bare default function is renamed like its plain twin (the r# prefix kept them apart). - schema_impl: count_items_named ignores items under a false cfg on fn, impl, trait, const and static (their bodies were walked). - schema_impl/tests.rs split: identity / count tests moved to tests_identity.rs (the file was 1001 lines). - defaults: a literal default_value on a non-primitive field no longer advertises an OpenAPI default that serde does not fill (422 otherwise). - from_model/target_shape: omit_default primary keys and un-picked HasMany fields are dropped the way generate_type drops them. - same-file adapters: a plain, not Schema-derived struct of the adapter's name in the call-site file yields to the stored Schema. - seaorm: a text default with an unspaced parenthesis (Draft(WIP)) is a literal; a call with arguments needs a known SQL function name. - schema!: an explicitly imported bare name of an underived item is an error (glob imports stay lenient). - type_utils: a leading super run resolves as one prefix (super::super); const generic arguments are re-rooted; names only an external glob import supplies are emitted through that glob. - validation: raw path keywords (r#self, r#super, r#crate, r#Self, r#_) are rejected as field names. - test integrity: exact schema default assertion; vacuous inline_types constructor test removed; ecosystem default test covers an import from a non-ecosystem crate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… default R20-L1 stops advertising a SeaORM literal default that serde does not fill, so MemoStatus refs no longer carry "default": "draft". Regenerate openapi.json and the integration_test__openapi snapshot to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tarpaulin gate reported an uncovered line in the Counter visitor. The new trait override had no case where the trait is active, so its walk never ran. Add one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Round-20 schema macro audit fixes (
crates/vespera_macro, schema macro / schema_impl / multipart_impl areas). Each finding was checked against the code before fixing; all were confirmed real, none refuted.Per-finding outcome
schema_impl/tests.rswas 1001 lines; identity and count tests moved toschema_impl/tests_identity.rs.count_items_namednow skips fn, impl, trait, const and static items under a falsecfg. Cases added.r#tags) is matched against bare default fn names with ther#prefix stripped on both sides. Test added.default_valueon a non-primitive field no longer emits#[schema(default)]when no serde default is generated. Test updated.# [schema (default = "0")]assertion.target_shapedropsomit_defaultprimary keys and un-pickedHasManythe waygenerate_typedoes. Cases added.inline_field_struct_holds_constructor_inputsremoved.#[derive(Schema)]yields to the stored Schema. ASchema-derived file item still wins (round-19 behaviour kept). Pure-function tests added.Draft(WIP)is a literal. A call with arguments must name a known SQL function. Cases and a defaults-level test added.#[derive(Schema)]is an error. Glob imports stay lenient. Fixture-crate test added.self/superrun resolves as one prefix (super::super::x). Case added.r#self,r#super,r#crate,r#Self,r#_) rejected as field names. Cases added.Dateimported from a non-ecosystem crate.No finding was refuted.
Verification
cargo test -p vespera_macro(lib 5125 passed, integration 1 passed)cargo test -p vespera(all suites pass)cargo clippy -p vespera_macro --all-targets -- -D warningsand--all-featurescleancargo fmt -p vespera_macro -- --checkcleanNotes
.changepacks/changepack_log_schema_macro_round20.json(all 7 packages, Patch).crates/vespera_macro/src/schema_macro/**,schema_impl*, andmultipart_impl/**, plus the one changepack file. The parser is untouched.🤖 Generated with Claude Code