-
Notifications
You must be signed in to change notification settings - Fork 0
feat(backend): retire JsonQueryBuilder — full typed-delegate migration + web-schema re-sync (257→4 JQB, 60→0 raw) #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
393db57
feat(backend): Phase A — schema re-sync from web + v0.7.0 connector w…
383111c
fix(backend): resolve all schema-drift runtime breakage from the re-sync
a8c4f0b
feat(backend): Phase B (tranche 1) — retire JQB in domain + payout repos
5a8b7c6
chore(mobile): consume prisma_flutter_connector ^0.7.0 from pub.dev
2bd5ab0
chore(backend): re-sync schema to Jul-19 web source (129 models) + co…
1966956
feat(backend): retire JQB in all routes, route handlers, and services
fde0e4f
feat(backend): retire JQB + raw helpers across all repositories (bar …
753056d
feat(backend): appointment repository finale — 85 JQB sites → typed (…
756dd82
Merge origin/dev: schema-sync PR #120 + payment-free booking into typ…
b509eb9
feat(backend): connector ^0.9.0 — zero JsonQueryBuilder, gate at 0/0
13194c0
fix(stream): batch + dedupe user upserts — stop tripping Stream's Upd…
1d1505e
fix(backend): PR review — encrypt PAN, link OAuth profiles, idempoten…
a2f7dfc
fix(backend): PR review — validate enum inputs, ISO8601 scheduledAt, …
4c18c6e
fix(backend): PR review — guard client-input enum mappings (400 not 500)
3e312dd
style(backend): dart format pass (map line-wrapping from earlier tran…
5b4d3f3
fix(backend): PR review — professional-background PUT returns 400 on …
67aaa88
fix(backend): PR review round 2 — cancel 400, PAN decrypt logging, re…
f8c8a57
fix(backend): restore null-on-missing contract for nullable update me…
6589e74
test(backend): repair unit tests for the typed-delegate surface (user…
f0cfc32
test(backend): migrate account/verification/session/support-ticket te…
3221de2
test(backend): green suite — migrate explore scaffold, gate un-migrat…
24ad9d6
test(backend): migrate appointment + checkout suites; fix BigInt and …
1048862
test(backend): migrate the last 3 suites — full test suite green (307…
6833bfe
ci(backend): add Backend CI and fix the dead branch triggers
200e5be
ci(backend): resolve deps via the Flutter SDK
ca060ee
ci: bump the stale Flutter pin and correct the declared SDK floors
b8b7919
Revert the SDK-floor bump: it triggers Dart 3.7's new formatter
5486bfe
ci(app): stop the Flutter analyzer walking into backend/ and build/
4d00806
style(app): clear the mechanical lint debt exposed by re-enabling CI
d074bd1
fix(backend): PR review round 3 — real warnings the CI gate was hiding
d082409
fix(app): clear the last 10 lint issues; use action major tags not SHAs
2c69f1f
style(app): brace the wrapped if in auth_repository_impl
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| name: Backend CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [dev, main, develop] | ||
| paths: | ||
| - 'backend/**' | ||
| - '.github/workflows/backend-ci.yml' | ||
| pull_request: | ||
| branches: [dev, main, develop] | ||
| paths: | ||
| - 'backend/**' | ||
| - '.github/workflows/backend-ci.yml' | ||
|
|
||
| # Read-only by default; no job here needs to write to the repo. | ||
| permissions: | ||
| contents: read | ||
|
|
||
| # Supersede in-flight runs for the same ref instead of queueing them. | ||
| concurrency: | ||
| group: backend-ci-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| # Kept in step with flutter-ci.yml's FLUTTER_VERSION. Must ship Dart >=3.7 | ||
| # (bcrypt requires it) — the old 3.24.3 pin shipped Dart 3.5.3 and failed | ||
| # dependency resolution. | ||
| FLUTTER_VERSION: '3.44.1' | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: backend | ||
|
|
||
| jobs: | ||
| backend: | ||
| name: Analyze, Format, Test | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| # Don't leave GITHUB_TOKEN in .git/config for later steps to read. | ||
| persist-credentials: false | ||
|
|
||
| # The backend is server-side Dart, but prisma_flutter_connector depends on | ||
| # the Flutter SDK, so pub resolution needs Flutter (not plain Dart). | ||
| - name: Setup Flutter | ||
| uses: subosito/flutter-action@v2 | ||
| with: | ||
| flutter-version: ${{ env.FLUTTER_VERSION }} | ||
| cache: true | ||
|
|
||
| # lib/generated/** is gitignored — it is derived from prisma/schema.prisma | ||
| # (copied verbatim from familiarise_web) and must be regenerated here. | ||
| - name: Regenerate Prisma client + freezed | ||
| run: ./scripts/regenerate-build.sh --prisma | ||
|
|
||
| # `dart analyze` exits non-zero on *any* issue, including ~1k pre-existing | ||
| # style infos, so gate on severity instead. Parse the JSON report rather | ||
| # than the human-readable output: the text format labels these findings | ||
| # inconsistently (it showed 0 warnings where JSON showed 76), so a | ||
| # grep-based gate silently passed real warnings. | ||
| - name: Analyze (fail on errors + warnings) | ||
| run: | | ||
| dart analyze --format=json lib routes test > analyze.json || true | ||
| python3 - <<'EOF' | ||
| import json, sys, collections | ||
| with open('analyze.json') as f: | ||
| diagnostics = json.load(f)['diagnostics'] | ||
| bad = [d for d in diagnostics if d['severity'] in ('ERROR', 'WARNING')] | ||
| print('diagnostics by severity:', | ||
| dict(collections.Counter(d['severity'] for d in diagnostics))) | ||
| for d in bad: | ||
| loc = d['location'] | ||
| print(f"::error file={loc['file']}," | ||
| f"line={loc['range']['start']['line']}::" | ||
| f"{d['severity']} {d['code']}: {d['problemMessage']}") | ||
| if bad: | ||
| sys.exit(f"{len(bad)} error(s)/warning(s) found") | ||
| print('No errors or warnings.') | ||
| EOF | ||
|
|
||
| # git ls-files lists tracked files only, so the gitignored generated | ||
| # client is excluded for free. | ||
| - name: Check formatting | ||
| run: dart format --output=none --set-exit-if-changed $(git ls-files '*.dart') | ||
|
|
||
| - name: Test | ||
| run: dart test test/ | ||
|
|
||
| # Ratchet: the JQB → typed-delegate migration finished at 0/0. This fails | ||
| # the build if raw JsonQueryBuilder or the removed raw finders creep back. | ||
| - name: JQB gate (no raw query builders) | ||
| run: ./scripts/jqb-gate.sh | ||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,10 @@ | ||
| include: package:dart_frog_lint/recommended.yaml | ||
| include: package:dart_frog_lint/recommended.yaml | ||
|
|
||
| analyzer: | ||
| exclude: | ||
| # Generated from prisma/schema.prisma by prisma_flutter_connector, plus the | ||
| # freezed/json_serializable output. Gitignored and never hand-edited, so it | ||
| # is not worth linting (and it dominates the issue count otherwise). | ||
| - lib/generated/** | ||
| - "**/*.freezed.dart" | ||
| - "**/*.g.dart" |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.