Repository navigation
feat(core): v0.5.8 core foundations - #592
Merged
Merged
Conversation
yevheniidehtiar
force-pushed
the
feat/v058-core-foundations
branch
2 times, most recently
from
October 9, 2026 22:05
a05dc9f to
b2fc152
Compare
added 10 commits
October 10, 2026 00:57
…er.pk/datetime_kind (st-v058-byoa-13)
…pes (st-v058-byoa-13)
…al base64 (st-v058-byoa-18)
…one-key case (st-v058-byoa-14)
…it (st-v058-byoa-16)
…resolver (st-v058-byoa-19)
yevheniidehtiar
force-pushed
the
feat/v058-core-foundations
branch
from
October 9, 2026 23:05
b2fc152 to
37eef22
Compare
dodjer88
approved these changes
Oct 10, 2026
This was referenced Oct 10, 2026
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.
Why
First slice of v0.5.8 "Bring Your Own App" (SDD
docs/specs/bring-your-own-app.md): the pure core building blocks that later stories wire into adapters, routing and views. This adds no new routes, templates or middleware. The one runtime change is in the auth timestamps.Changes
core/primary_key.py(SDD A.1):PrimaryKeyInfocodec (parse/to_str/to_json/value_of/path_convertor),InvalidPrimaryKey,DEFAULT_PK.BaseAdaptergains a non-abstractpk(defaults toDEFAULT_PK) anddatetime_kind(), so third-party adapters keep working unchanged.core/timezones.py+settings.timezone(A.7):utc_now,is_auto_now_factory,parse_datetime_input(fold=0 in DST gaps),format_datetime_input,to_display. NewHYPERADMIN_TIMEZONE(defaultUTC, validated withZoneInfo). Runtime deptzdata; sys_platform == 'win32'.auth/_types.UTCNaiveDateTimekeeps the naivetimestampDDL (no migration) and returns aware UTC values.created_aton User/Group/Permission andUser.updated_atuse it withdefault_factory=utc_now. Pinningsa_typekeeps the DDL stable on sqlmodel <0.0.45 and >=0.0.45.PydanticFormrecognises the new auto-now factory.AdminAuthenticationRequired/AdminAccessDenied+core/csrf.CsrfTokenSigner(D.1): stdlib-only signed double-submit tokens (<nonce>.<hmac>, constant-time checks). Nothing uses it yet.core/filtering.py(D.3):FilterCondition,FilterValueError,coerce_filter_value,parse_filter_params(whitelist;exact/gte/lte/in/isnull; whole-day bounds for dates on datetime fields, localised for aware columns),normalize_filters. Adapters start applying these in st-v058-byoa-24.core/introspection.pythat fails mypy on Python 3.10.Size note:
core/filtering.pyis 332 LOC, over the CONSTITUTION §5 ~300-line review trigger. It is kept as one module because it has a single responsibility: turning query params into typed conditions.Boundaries: the new
core/*modules import only the stdlib, pydantic andzoneinfo; tests check this forcsrf.pyandfiltering.py.auth/models.pystill imports nothing fromcore/directly.Verification
uv run poe lint— passeduv run pytest tests -o addopts="" -q -n 4 --ignore=tests/e2e— 1123 passeduv run pytest tests/e2e -o addopts="" -q -n 4— 136 passedManual test scenarios
Given the simple example with built-in auth and a fresh SQLite DB
When you run
hyperadmin createsuperuserand load the user in a Python shellThen
user.created_at.tzinfois UTCAnd the SQLite column holds a naive
YYYY-MM-DD HH:MM:SS.ffffffUTC stringGiven a database created before this branch
When the admin starts
Then users still list, and the
created_atvalues are unchanged and now shown as UTCGiven
HYPERADMIN_TIMEZONE=Mars/OlympusWhen the app starts
Then settings validation fails and the error names
timezoneGiven a model with
created_at = Field(default_factory=utc_now)When you open its create form
Then no
created_atinput is renderedWhen you open the list, detail, create, edit and delete pages for int-pk models in the example app
Then everything works as before (URLs, filters and popups are unchanged)
🤖 Generated with Claude Code