Skip to content

refactor: define executor, CLI, auth and dev server shapes natively - #373

Merged
kvlonge merged 3 commits into
mainfrom
refactor/native-executor-cli-shapes
Nov 11, 2026
Merged

kvlonge merged 3 commits into
mainfrom
refactor/native-executor-cli-shapes

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Why

Python in SQLTide should be a thin wrapper; the native core already builds and reads these shapes.

Changes

  • Executor operation shapes (destruction, readiness, deployment, auditing, observability, janitor, reconcile, testing, doctor) are native classes; the old modules re-export them.
  • CLI, auth, authorization, workflow, sensor error, dev server and diagnostic shapes, enums, exceptions and constants are native; lazy constants that depend on Python-owned enums or package metadata resolve on first read.
  • Removed names and reasons: REMOVED in scripts/shape_surface/constants.py.
  • Boundary: remaining_lines 4784→2685; 102 pure re-export files (728 lines) reported apart. New stays: rule 1 executor/destruction/types.py (plan-store and planning-connection protocols, clock alias) and dev_server/types.py (authorization-guard and reporter protocols, Kafka type aliases); rule 4 auth/models.py (pydantic request bodies the native dev server validates).

Misuse-only messages

Generic CPython errors name the dotted type; native exception constructor TypeErrors are worded differently. Whether a call raises, the exception type and .args match.

Introspection and subclassing of internal shapes

As in the previous shape release: no vars()/__dict__, generic field types, annotations, signatures and docstrings, Python subclasses are not dataclass subclasses, and passing imports of old modules are gone (no docs or examples use them).

Verification

make check-ci on the final head; goldens unedited. Against 0.65.13: 6×1500 differential cases per slice match, including raise-or-not, exception type and .args for misuse calls; 30 planted mutations caught; 16 CLI project variants and 23 dev-server API responses identical after masking.

Destruction, readiness, deployment, auditing, observability, janitor,
reconcile, testing and doctor shapes, enums, exceptions and constants are
native classes; the old modules re-export them. The destruction types
module keeps its plan-store and planning-connection protocols and clock
alias. Movable Python drops from 4784 to 3747 lines.
…e core

CLI, auth, authorization, workflow, sensor error, dev server and
diagnostic shapes, enums, exceptions and constants are native classes; the
old modules re-export them. Account request bodies stay pydantic models
that the native dev server validates, and the dev server types module
keeps its protocols and type aliases. Movable Python drops from 3747 to
2685 lines.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Deploying sqltide with  Cloudflare Pages  Cloudflare Pages

Latest commit: cd38bc0
Status: ✅  Deploy successful!
Preview URL: https://a379fbb7.sqltide.pages.dev
Branch Preview URL: https://wip-native-shapes-4.sqltide.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying sqltide with  Cloudflare Pages  Cloudflare Pages

Latest commit: cd38bc0
Status:⚡️  Build in progress...

View logs

@kvlonge
kvlonge enabled auto-merge (squash) November 11, 2026 03:25
@kvlonge
kvlonge merged commit 3ce850f into main Nov 11, 2026
17 checks passed
@kvlonge
kvlonge deleted the refactor/native-executor-cli-shapes branch November 11, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant