desloppify: code-health pass (objective ~99 both; FE overall 89.6, BE 87.6) - #3
Open
croto-bot wants to merge 10 commits into
Open
desloppify: code-health pass (objective ~99 both; FE overall 89.6, BE 87.6)#3croto-bot wants to merge 10 commits into
croto-bot wants to merge 10 commits into
Conversation
added 10 commits
August 5, 2026 21:51
v7 adds monorepo per-project scan guidance, Rovo Dev runner, agent directives, and subagent parallelism limits. Installed desloppify via uv tool install.
- register: explicit HTTP_201_CREATED (resource creation semantics) - PATCH /me: HTTP_202_ACCEPTED -> 200 (synchronous update) - check_password: bare except Exception -> except Argon2Error - ExternalApiService: add httpx.RequestError handler (502) - remove del-token hack + TODO/# Example: placeholder comments 569 tests pass; ruff clean on edited files.
…s cleanup - Remove unused recursive_partial_model + 3 helpers (~211 LOC) and its tests - Remove dead ORM base classes JSONUpdatesMixing/TimestampOrmBaseModel/JsonOrmBaseModel - items router: replace cast() fiction with ItemResponse.model_validate() - items service: simplify QueryOptions construction, hoist imports - auth: remove cast in validate_session (honest User return type) - centralize OAuth provider allowlist (OAUTH_PROVIDER_NAMES) - update item router tests to new behavior 554 tests pass.
- Delete duplicate orphan src/lib/schemas.test.ts - Rewrite false-confidence useItems.test.ts (now exercises real hooks, asserts cache invalidation + optimistic rollback) - Strengthen useAuthSubmit.test.ts (URL/payload/toast/error assertions) - Add co-located tests for 21 untested/transitive modules (routes, dialogs, shadcn/ui primitives, config, router) - Exclude playwright.config.ts (test infra, not unit-testable) 192 tests pass (was 115); lint clean.
…ests - Surface error_code in HTTP responses via custom exception handler + ErrorResponse schema (error_code previously dead metadata) - Fix 4 ruff errors in app/database/db/ (TYPE_CHECKING); document optimizer entry points (it is load-bearing on the auth guard path, not dead) - Tests: convert router tests to TestClient route-level, real-arg User fixture, domain-behavior assertions on repos, add base_repository/dependencies/logging coverage (+43 tests, 554->597) 597 tests pass.
…tests - api-client: wrap network failures into ApiError (no raw TypeError leak); surface invalid JSON error bodies instead of silent swallow - error-handler: shared getErrorMessage helper; items page uses it - Relocate executeAuthSubmit out of hooks/ into lib/auth-actions - sonner.tsx: align to function-declaration convention - Add tests for auth-actions, useAuthSubmit hook, items route (+24 tests) 216 tests pass; lint clean.
- Rename sanity_check->health_check, _get_insert_dialect->_get_postgres_insert, load_user_context->get_current_user (honest names, all call sites) - Relocate app/context.py -> app/core/context.py (no longer top-level orphan) - Move get_auth_service into app/user/auth/dependencies.py (auth owns its DI) - Document middleware placement rule (middlewares/ vs core/logging) - Fix UserFilter stale first_name/last_name/full_name -> display_name - Remove redundant exception docstrings + ItemRepository method-list docstring - Remove UserService.create policy bypass (restore wide-event logging) - Remove dead _serialize_record 597 tests pass.
…, tests
- executeAuthSubmit now rethrows after toasting (callers can observe failure)
- Extract ItemsPageHeader to remove items.tsx scaffold duplication
- Move feature-scoped files lib/ -> features/{auth,items}/ (lib/ infra-only)
- Delete orphan DEMO_PAGE.md; rewrite README + FRONTEND_ARCHITECTURE to match
real app; fix config/useItems/Items naming drift
- Strengthen useAuthSubmit + items tests (+15 tests, deeper assertions)
231 tests pass; lint + tsc clean.
… cleanup - Error handler now validates via ErrorResponse schema (honors contract) - ItemService.get_all_paginated typed Page[Item] (was Any); drop type:ignore - PATCH /me returns UserResponse (consistent return shape across PATCH endpoints) - Remove stale config: AWS/Axiom/fastapi-limiter/JWT-secret settings + REPOSITORY_NAME - Remove remaining restating exception docstrings; document dual auth-guard protocol 597 tests pass.
- useAuthSubmit rewrapped in useMutation (standard invalidation pattern) - Logout single-teardown (clearAuthToken owns state, was running twice) - ErrorBoundary: deprecated substr -> crypto.randomUUID - ui/button forwardRef -> function declaration; textarea quote consistency - Trim JSDoc bloat; remove restating comments; title TanStack->Manta - Remove package-lock.json (bun is sole package manager) 231 tests pass; lint clean.
Collaborator
Author
Linear Clone Showcase — Built on the
|
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
Full desloppify code-health pass on both projects, driven by glm-5.2 subagent reviews + execution. Skill document updated to v7.
Scores (final)
Mechanical/objective health is essentially maxed (~99) on both. Subjective dimensions were scored via 4 rounds of 20-dimension holistic review (glm-5.2 subagents).
What changed
Backend (4388 insertions / 13970 deletions net — heavy dead-code removal):
recursive_partial_model+ dead ORM mixin classeserror_codein all HTTP error responses (was dead metadata) viaErrorResponseschema + handlercast()fiction →ItemResponse.model_validate();get_all_paginatedtypedPage[Item]validate_sessionhonestUserreturn; OAuth provider allowlist centralized;get_auth_servicemoved into auth packagecheck_passwordcatchesArgon2Error(not bareException);ExternalApiServicehandleshttpx.RequestErrorUserService.createpolicy bypasshealth_check,_get_postgres_insert,get_current_userFrontend:
useItemstest, added co-located tests for 21 modules (231 tests, was 115)ApiError(no rawTypeErrorleak); invalid JSON error bodies surfacedexecuteAuthSubmitnow rethrows (callers observe failure);useAuthSubmitrewrapped inuseMutationErrorBoundarysubstr→crypto.randomUUID; buttonforwardRef→function declarationlib/→features/{auth,items}/; removedpackage-lock.json(bun-only)Remaining gap to 90 (overall)
_ph/settingssingletons. These need focused refactors.forwardRef/function split and a couple of auth-orchestration edges.Both verified/objective scores are ~99. Subjective scores reflect honest holistic review and are bounded by ±5–10 reviewer variance per dimension.
Test plan
uv run pytest tests/ -q→ 597 passedbun run test→ 231 passed;bun run lintclean;tsc --noEmitclean (src)