Skip to content

Clarify _BASE_FIELDS vs immutable fields to avoid contributor confusion #10

@mgoldsborough

Description

@mgoldsborough

Context

schema.py defines _BASE_FIELDS = {"id", "type", "version", "created_at", "updated_at"} (used for the required-without-default check), while entity.py defines immutable = {"id", "type", "version", "created_at", "created_by"} (used to strip fields on update). These differ (updated_at vs created_by) and serve different purposes.

Problem

The similar naming could confuse future contributors into thinking they should be the same set, or that changes to one should be mirrored in the other.

Suggestion

Add a clarifying comment on _BASE_FIELDS in schema.py noting it is specifically for the "required without default" warning check and is intentionally different from the immutable set in entity.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions