Flea Flicker
17b44e3b00
Merge origin/uat into promote/dev-to-uat-gro-1866
...
CI / Lint & Typecheck (pull_request) Successful in 36s
CI / Test (pull_request) Successful in 33s
CI / Build & Push Docker Images (pull_request) Successful in 3m11s
Conflicts resolved:
- src/middleware/rbac.ts: keep dev version (email null-guard, type assertion, single null-check)
- .gitea/workflows/ci.yml: keep uat version (branches: [main, dev, uat])
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-28 21:39:39 +00:00
Flea Flicker
2e0d63f7f6
fix(gro-1866): address QA review failures — portalSession null-guard,
...
CI / Test (push) Successful in 32s
CI / Lint & Typecheck (push) Successful in 34s
CI / Build & Push Docker Images (push) Successful in 2m34s
email null-dereference guard, externalize DEMO_STAFF_ID
1. portal.ts:138 — add null guard for portalSession before accessing .id
(TS18048: 'portalSession' is possibly 'undefined')
2. rbac.ts:130 — guard jwt.email before split() to prevent runtime throw
3. portal.ts:39,105 — externalize DEMO_STAFF_ID as env var
(process.env.DEMO_STAFF_ID ?? "00000000-...")
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-28 19:50:14 +00:00
The Dogfather
7bdb92999a
Merge pull request 'fix(gro-1866): add session-from-auth portal endpoint + role scope' ( #93 ) from fix/gro-1866-sso-bridge into dev
...
CI / Test (push) Successful in 34s
CI / Lint & Typecheck (push) Successful in 38s
CI / Build & Push Docker Images (push) Failing after 1m46s
fix(gro-1866): add session-from-auth portal endpoint + role scope (#93 )
Bridges Better Auth SSO sessions to portal sessions for real customers.
Adds role to genericOAuth scopes for Authentik role propagation.
Closes GRO-1866
2026-05-28 18:46:38 +00:00
Flea Flicker
b96b6c06fc
fix: add missing getAuth import and fix db.insert() mock chain
...
Fixes two bugs found in QA review:
- ReferenceError: getAuth not defined in beforeEach - add import
- TypeError: wrong mock chain insert().into().values() vs insert().values()
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-28 15:59:41 +00:00
Flea Flicker
fa67b75b76
docs: add UAT test cases TC-API-8.8 through TC-API-8.11 for SSO bridge
...
Adds manual test cases covering:
- TC-API-8.8: valid Better Auth session → portal session (201)
- TC-API-8.9: no session → 401
- TC-API-8.10: no matching client → 404
- TC-API-8.11: returned sessionId works on subsequent portal calls
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-28 15:01:24 +00:00
Flea Flicker
7e329ff72f
fix(gro-1866): add session-from-auth portal endpoint and role scope
...
Adds POST /api/portal/session-from-auth which bridges a valid Better Auth
customer session (from SSO login) to a portal impersonation session, so
real SSO customers can access the client portal.
The endpoint is registered before the validatePortalSession catch-all so it
is not subject to that middleware. It validates the Better Auth session
from request cookies, looks up the client by email, creates an active
impersonation session, and returns { sessionId, clientId, clientName }.
Also adds "role" to the genericOAuth scopes so Authentik propagates the
role claim into Better Auth user objects (GRO-1862 root cause fix).
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-28 15:00:15 +00:00
Flea Flicker
b050fb9a5f
Merge pull request 'feat(db): add migration 0034 for extended pet profile columns (GRO-1850)' ( #92 ) from fix/gro-1850-pet-profile-migration into dev
CI / Lint & Typecheck (push) Successful in 14s
CI / Test (push) Successful in 13s
CI / Build & Push Docker Images (push) Successful in 1m20s
2026-05-28 11:39:51 +00:00
Flea Flicker
63ed91e5f3
feat(db): add migration 0034 for extended pet profile columns
...
CI / Lint & Typecheck (pull_request) Successful in 11s
CI / Test (pull_request) Successful in 11s
CI / Build & Push Docker Images (pull_request) Successful in 50s
GRO-1850: Adds temperament_score, temperament_flags, medical_alerts,
and preferred_cuts to the pets table.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-28 11:39:21 +00:00
The Dogfather
45b3d4343d
Merge pull request 'promote: dev → uat (GRO-1790 pet profile summary fixes)' ( #91 ) from promote/dev-to-uat-gro-1790 into uat
...
CI / Lint & Typecheck (push) Successful in 12s
CI / Test (push) Successful in 15s
CI / Build & Push Docker Images (push) Successful in 35s
promote: dev → uat (GRO-1790 pet profile summary fixes)
Merged by CTO after QA approval.
Refs: GRO-1798, GRO-1790
2026-05-26 12:36:06 +00:00
Flea Flicker
32156e9a45
fix: restore pet profile summary endpoint from dev (GRO-1177)
CI / Lint & Typecheck (pull_request) Successful in 13s
CI / Test (pull_request) Successful in 12s
CI / Build & Push Docker Images (pull_request) Successful in 41s
2026-05-26 12:30:10 +00:00
Flea Flicker
ed3d7df1c9
Merge dev into promote/dev-to-uat-gro-1790
...
CI / Lint & Typecheck (pull_request) Successful in 11s
CI / Test (pull_request) Successful in 11s
CI / Build & Push Docker Images (pull_request) Successful in 1m9s
Resolve .ci-trigger conflict preferring dev version.
2026-05-26 12:11:44 +00:00
The Dogfather
9622b109d0
Merge pull request 'feat(GRO-1177): add pet profile summary endpoint' ( #30 ) from flea-flicker/pet-profile-summary into dev
...
CI / Lint & Typecheck (push) Successful in 12s
CI / Test (push) Successful in 12s
CI / Build & Push Docker Images (push) Successful in 2m52s
feat(GRO-1177): add pet profile summary endpoint (#30 )
Adds GET /api/pets/:id/profile-summary with aggregated pet profile,
grooming history, visit count, and upcoming appointment.
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-26 11:40:16 +00:00
Barcode Betty
a25b2fe281
docs: add TC-API-3.18 and TC-API-3.19 to UAT_PLAYBOOK for visitCount regression + date filter
...
CI / Lint & Typecheck (pull_request) Successful in 12s
CI / Test (pull_request) Successful in 12s
CI / Build & Push Docker Images (pull_request) Successful in 1m4s
Updated UAT_PLAYBOOK.md §3.3 — new visitCount cap and past appointment filter test cases
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-26 11:34:25 +00:00
Barcode Betty
de33edd7c6
fix: address CTO review — visitCount bug + upcomingAppointment date filter
...
- Replace .select({ count: appointments.id }).limit(1) + .length with
sql<number>`count(*)::int` pattern per project standard (references invoices.ts:86)
- Add gte(appointments.startTime, new Date()) to upcomingAppointment query
so past appointments in scheduled/confirmed status are excluded
- Add visitCount regression tests: 2+ completed appointments → visitCount >= 2,
no completed → visitCount = 0
Updated UAT_PLAYBOOK.md §profile-summary (visitCount regression + date filter)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-26 11:34:11 +00:00
Scrubs McBarkley
403634eb96
Merge pull request 'promote: uat → main (GRO-1757 SSO auto-provision fix)' ( #89 ) from uat into main
CI / Lint & Typecheck (push) Successful in 9s
CI / Test (push) Successful in 9s
CI / Build & Push Docker Images (push) Successful in 50s
2026-05-26 02:15:57 +00:00
Lint Roller
3b9e82adff
fix(rbac): guard noUncheckedIndexedAccess in name derivation and newStaff insert
...
CI / Lint & Typecheck (push) Successful in 12s
CI / Test (push) Successful in 14s
CI / Build & Push Docker Images (push) Successful in 46s
With noUncheckedIndexedAccess:true, split("@")[0] returns string|undefined,
making `name` typed as string|undefined and failing the notNull staff.name
insert constraint. Fix by using ?? fallback on the array access.
Also add newStaff null guard after .returning() destructure — array
destructuring yields T|undefined with noUncheckedIndexedAccess enabled.
2026-05-26 01:48:41 +00:00
Lint Roller
385ed10211
fix(rbac): guard noUncheckedIndexedAccess in name derivation and newStaff insert
...
CI / Test (push) Successful in 10s
CI / Lint & Typecheck (push) Successful in 10s
CI / Build & Push Docker Images (push) Successful in 43s
CI / Test (pull_request) Successful in 9s
CI / Lint & Typecheck (pull_request) Successful in 10s
CI / Build & Push Docker Images (pull_request) Failing after 10s
With noUncheckedIndexedAccess:true, split("@")[0] returns string|undefined,
making `name` typed as string|undefined and failing the notNull staff.name
insert constraint. Fix by using ?? fallback on the array access.
Also add newStaff null guard after .returning() destructure — array
destructuring yields T|undefined with noUncheckedIndexedAccess enabled.
2026-05-26 01:48:12 +00:00
Lint Roller
8e8a87767c
fix(ci): remove duplicate provenance keys + add uat push trigger (GRO-1762)
CI / Lint & Typecheck (push) Successful in 12s
CI / Test (push) Successful in 13s
CI / Build & Push Docker Images (push) Failing after 41s
2026-05-26 01:34:42 +00:00
The Dogfather
152abfc4d5
fix(ci): remove duplicate provenance keys causing YAML parse error
...
CI / Test (push) Successful in 9s
CI / Lint & Typecheck (push) Successful in 12s
CI / Build & Push Docker Images (push) Successful in 1m10s
Duplicate 'provenance: false' in each docker/build-push-action step caused
Gitea to reject the workflow file, breaking push CI and workflow_dispatch.
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-26 01:26:05 +00:00
The Dogfather
b796d36aed
fix(ci): remove duplicate provenance keys causing YAML parse error
...
CI / Lint & Typecheck (push) Failing after 4s
CI / Test (push) Successful in 15s
CI / Build & Push Docker Images (push) Has been skipped
Duplicate 'provenance: false' in each docker/build-push-action step caused
Gitea to reject the workflow file, breaking push CI and workflow_dispatch.
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-26 01:25:57 +00:00
Flea Flicker
d9ba6045ad
chore: direct push CI trigger for GRO-1757 ( b61d899f) to include in dev image
...
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-26 00:45:05 +00:00
The Dogfather
2f17b1ab85
Promo/Gro 1764 Uat ( #86 )
2026-05-26 00:36:15 +00:00
Lint Roller
b83a793de4
chore: PR CI build trigger for GRO-1757 image (do not merge) ( #87 )
...
Co-authored-by: Lint Roller <lint@groombook.dev >
Co-committed-by: Lint Roller <lint@groombook.dev >
2026-05-26 00:36:04 +00:00
Lint Roller
a610ef9d39
chore: trigger CI for GRO-1757 + GRO-1764
...
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-26 00:08:02 +00:00
Flea Flicker
2a0b3cf3d3
Merge remote-tracking branch 'origin/dev' into dev-to-uat
2026-05-25 23:54:49 +00:00
Flea Flicker
cf3d30f19e
Merge pull request 'fix(GRO-1764): change Max coat_type short→smooth in UAT seed' ( #85 ) from fix/gro-1764-coat-type-enum into dev
2026-05-25 23:54:36 +00:00
Flea Flicker
0625961adf
fix(GRO-1764): change Max coat_type "short" to "smooth" in UAT seed
...
The DB coat_type enum only accepts: smooth, double, wire, curly, long, hairless.
"short" is not a valid value — corrected to "smooth".
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-25 23:52:53 +00:00
Lint Roller
78762b5278
Merge pull request 'promote: dev → uat (GRO-1757 SSO auto-provision fix)' ( #84 ) from dev into uat
...
promote: dev → uat (GRO-1757 SSO auto-provision fix)
2026-05-25 23:48:09 +00:00
Scrubs McBarkley
b61d899f81
fix(GRO-1757): auto-provision staff for OIDC users + UAT playbook updates ( #83 )
2026-05-25 23:39:57 +00:00
Flea Flicker
c8bbb12edb
Merge pull request 'promote(dev→main): GRO-1752 schema fix for UAT (CI trigger)' ( #82 ) from dev into main
2026-05-25 23:28:27 +00:00
Flea Flicker
38047d5ea3
chore: trigger CI on dev for GRO-1754
2026-05-25 23:27:16 +00:00
Flea Flicker
ba95088653
Merge pull request 'chore: trigger CI from uat for GRO-1754' ( #81 ) from fix/gro-1754-uat-ci into main
2026-05-25 23:23:15 +00:00
Flea Flicker
dd83f29736
chore: trigger CI from uat for GRO-1754
2026-05-25 23:22:04 +00:00
Flea Flicker
fbcaedf155
chore: trigger CI for GRO-1754 UAT bump check
2026-05-25 23:20:51 +00:00
Flea Flicker
7cfb24d542
Merge pull request 'chore: trigger CI for GRO-1754' ( #80 ) from fix/gro-1754-trigger-ci-v2 into dev
2026-05-25 23:16:05 +00:00
Flea Flicker
b0d9e5816f
chore: trigger CI v2 for GRO-1754
2026-05-25 23:14:01 +00:00
Flea Flicker
7a0662541d
chore: trigger CI for GRO-1754
2026-05-25 19:20:51 +00:00
Flea Flicker
5e78df85f1
chore: trigger CI for GRO-1754 UAT bump
2026-05-25 19:16:53 +00:00
The Dogfather
aa9670d4dc
Merge pull request 'promote(dev→uat): add missing extended pet profile fields (GRO-1752)' ( #79 ) from dev into uat
...
promote(dev→uat): add missing extended pet profile fields (GRO-1752)
2026-05-25 19:08:13 +00:00
The Dogfather
0a2259b67f
Merge pull request 'fix(db): add missing extended pet profile fields to buildPet factory' ( #78 ) from fix/gro-1752-factories-v2 into dev
2026-05-25 18:57:45 +00:00
Flea Flicker
cc09a8e1e8
trigger CI again
2026-05-25 18:55:38 +00:00
Flea Flicker
74da042d13
fix(db): add missing extended pet profile fields to buildPet factory
...
Lint Roller (QA) flagged that buildPet in factories.ts was missing the
4 fields added to the pets table schema, causing TS2739 in the Docker
build job (run 1701, job 3717).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com >
2026-05-25 18:53:56 +00:00
Flea Flicker
ad1b210de1
fix(schema): add missing extended pet profile fields to packages/db ( #73 )
2026-05-25 18:20:57 +00:00
Flea Flicker
e5f16a5fe5
Merge pull request 'chore: promote dev → uat (GRO-1749 seed data sync)' ( #72 ) from promo/gro-1749-uat into uat
2026-05-25 18:02:30 +00:00
Flea Flicker
a03771f7e7
fix(gro-1749): sync UAT seed data to root src and fix route path ( #71 )
...
Co-authored-by: Flea Flicker <flea@groombook.dev >
Co-committed-by: Flea Flicker <flea@groombook.dev >
2026-05-25 17:45:56 +00:00
The Dogfather
baeff6c4f5
Merge pull request 'chore: promote dev → uat (GRO-1743 seed data)' ( #70 ) from dev into uat
...
Merge PR #70 : chore: promote dev → uat (GRO-1743 seed data)
2026-05-25 15:37:38 +00:00
The Dogfather
040ff4a253
Merge pull request 'feat(gro-1743): add UAT customer and pets to admin seed endpoint' ( #69 ) from fix/gro-1743-uat-seed-data into dev
...
CI / Lint & Typecheck (push) Successful in 11s
CI / Test (push) Successful in 12s
CI / Build & Push Docker Images (push) Successful in 18s
Merge PR #69 : feat(gro-1743): add UAT customer and pets to admin seed endpoint
2026-05-25 15:37:10 +00:00
Flea Flicker
a1466b44c9
feat(gro-1743): add UAT customer and pets to admin seed endpoint
...
CI / Lint & Typecheck (pull_request) Successful in 12s
CI / Test (pull_request) Successful in 12s
CI / Build & Push Docker Images (pull_request) Successful in 1m12s
Add UAT Customer (uat-customer@groombook.dev ) with two pets (Bella and Max)
to the idempotent admin seed endpoint for portal UAT testing.
- Client: UAT Customer, email: uat-customer@groombook.dev , phone: 555-0100, status: active
- Pet 1: Bella, Dog, Poodle, coatType: curly
- Pet 2: Max, Dog, Labrador Retriever, coatType: short
Issue: GRO-1743
Co-Authored-By: Paperclip <noreply@paperclip.ing >
2026-05-25 15:29:36 +00:00
The Dogfather
8d9a9d8dba
Merge pull request 'chore: promote dev → uat (GRO-1678 TCP resilience + backlog fixes)' ( #67 ) from dev into uat
...
chore: promote dev → uat (GRO-1678 TCP resilience + backlog fixes)
2026-05-24 23:49:11 +00:00
Scrubs McBarkley
b486c44a82
fix(api): add timeouts for OIDC discovery fetch and DB connection ( #66 )
CI / Lint & Typecheck (push) Successful in 10s
CI / Test (push) Successful in 9s
CI / Build & Push Docker Images (push) Successful in 45s
2026-05-24 20:11:44 +00:00