Commit graph

416 commits

Author SHA1 Message Date
Tracewebstudio Dev
0163349988 fix: skip broken migrations that reference dropped professionals table
All checks were successful
build-and-release / build (companies) (push) Successful in 1m39s
build-and-release / build (cron) (push) Successful in 52s
build-and-release / build (catering-services) (push) Successful in 2m9s
build-and-release / build (developers) (push) Successful in 1m32s
build-and-release / build (customers) (push) Successful in 1m51s
build-and-release / build (employees) (push) Successful in 1m52s
build-and-release / build (gateway) (push) Successful in 2m1s
build-and-release / build (fitness-trainers) (push) Successful in 2m11s
build-and-release / build (job-seekers) (push) Successful in 1m54s
build-and-release / build (graphic-designers) (push) Successful in 2m15s
build-and-release / build (leads) (push) Successful in 1m39s
build-and-release / build (jobs) (push) Successful in 2m9s
build-and-release / build (makeup-artists) (push) Successful in 2m39s
build-and-release / build (photographers) (push) Successful in 1m52s
build-and-release / build (tutors) (push) Successful in 2m31s
build-and-release / build (ugc-content-creators) (push) Successful in 2m43s
build-and-release / build (payments) (push) Successful in 4m9s
build-and-release / build (social-media-managers) (push) Successful in 4m8s
build-and-release / build (video-editors) (push) Successful in 2m39s
build-and-release / build (users) (push) Successful in 7m7s
Several migrations reference a professionals table that was replaced by
per-profession profile tables in 20260317195000. Rename to .skip so
sqlx migrate run succeeds on a fresh local dev database. Affected:
- portfolio_payments (references professionals FK)
- reviews and reviews_admin_fields (same)
- create_verifications_table (duplicate, conflicts with existing table)
- complete_migration (data migration referencing professionals)
- add_user_role_profile_id (NOT NULL violation on empty tables)
- remove_external_links (column subjects_taught missing)
- external_role_management_phase1/2 (persona_type_id missing)
- tracecoin_security_hardening and related (column type vs transaction_type)
- ai_credits_wallet, ai_credit_packages (relation already exists)
- Various ai refund/coupon/lifecycle migrations (ai_credit_ledger missing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-17 00:48:50 +02:00
Ashwin Kumar Sivakumar
3e2f3dd85d perf(ci): cache cargo registry and target dir across image builds
All checks were successful
build-and-release / build (employees) (push) Successful in 5m50s
build-and-release / build (developers) (push) Successful in 6m1s
build-and-release / build (catering-services) (push) Successful in 6m29s
build-and-release / build (cron) (push) Successful in 6m45s
build-and-release / build (companies) (push) Successful in 7m13s
build-and-release / build (customers) (push) Successful in 7m27s
build-and-release / build (fitness-trainers) (push) Successful in 1m57s
build-and-release / build (gateway) (push) Successful in 1m52s
build-and-release / build (jobs) (push) Successful in 1m9s
build-and-release / build (graphic-designers) (push) Successful in 2m24s
build-and-release / build (job-seekers) (push) Successful in 2m32s
build-and-release / build (makeup-artists) (push) Successful in 2m0s
build-and-release / build (leads) (push) Successful in 2m39s
build-and-release / build (tutors) (push) Successful in 1m40s
build-and-release / build (ugc-content-creators) (push) Successful in 1m38s
build-and-release / build (social-media-managers) (push) Successful in 2m39s
build-and-release / build (payments) (push) Successful in 3m45s
build-and-release / build (video-editors) (push) Successful in 1m41s
build-and-release / build (photographers) (push) Successful in 4m38s
build-and-release / build (users) (push) Successful in 7m27s
Dockerfile.simple had no build caching at all - every push recompiled the
full dependency tree from scratch for every service, in release mode,
targeting musl with static OpenSSL (the slowest possible combination).
BuildKit cache mounts for /app/target and the cargo registry/git caches
persist across builds on the same runner node and are shared across all
20 services, since they overlap heavily on workspace dependencies.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 21:07:33 +05:30
Ashwin Kumar Sivakumar
f5201965d8 Issue each account its own LiteLLM virtual key instead of the shared master key
All checks were successful
build-and-release / build (cron) (push) Successful in 5m1s
build-and-release / build (catering-services) (push) Successful in 9m1s
build-and-release / build (customers) (push) Successful in 9m3s
build-and-release / build (developers) (push) Successful in 9m23s
build-and-release / build (employees) (push) Successful in 10m36s
build-and-release / build (companies) (push) Successful in 10m59s
build-and-release / build (gateway) (push) Successful in 3m26s
build-and-release / build (fitness-trainers) (push) Successful in 8m52s
build-and-release / build (jobs) (push) Successful in 4m46s
build-and-release / build (graphic-designers) (push) Successful in 8m44s
build-and-release / build (job-seekers) (push) Successful in 9m22s
build-and-release / build (makeup-artists) (push) Successful in 8m33s
build-and-release / build (leads) (push) Successful in 10m17s
build-and-release / build (payments) (push) Successful in 8m40s
build-and-release / build (photographers) (push) Successful in 9m36s
build-and-release / build (social-media-managers) (push) Successful in 8m38s
build-and-release / build (tutors) (push) Successful in 8m42s
build-and-release / build (ugc-content-creators) (push) Successful in 7m27s
build-and-release / build (video-editors) (push) Successful in 7m46s
build-and-release / build (users) (push) Successful in 10m0s
register() now generates a per-account LiteLLM key (best-effort, non-blocking)
and stores it on the user. New internal endpoint GET /internal/users/{id}/llm-key
lets other services fetch (or lazily backfill) an account's key, authenticated
via the existing X-AI-Service-Key shared secret.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 20:29:00 +05:30
Ashwin Kumar Sivakumar
74664176da chore: retrigger isolated CI builds for users, social-media-managers (again)
All checks were successful
build-and-release / build (companies) (push) Successful in 9s
build-and-release / build (customers) (push) Successful in 7s
build-and-release / build (developers) (push) Successful in 4s
build-and-release / build (catering-services) (push) Successful in 14s
build-and-release / build (cron) (push) Successful in 13s
build-and-release / build (employees) (push) Successful in 3s
build-and-release / build (gateway) (push) Successful in 4s
build-and-release / build (fitness-trainers) (push) Successful in 6s
build-and-release / build (job-seekers) (push) Successful in 4s
build-and-release / build (graphic-designers) (push) Successful in 6s
build-and-release / build (jobs) (push) Successful in 4s
build-and-release / build (makeup-artists) (push) Successful in 4s
build-and-release / build (leads) (push) Successful in 5s
build-and-release / build (payments) (push) Successful in 5s
build-and-release / build (photographers) (push) Successful in 4s
build-and-release / build (tutors) (push) Successful in 4s
build-and-release / build (ugc-content-creators) (push) Successful in 5s
build-and-release / build (video-editors) (push) Successful in 4s
build-and-release / build (social-media-managers) (push) Successful in 6m13s
build-and-release / build (users) (push) Successful in 7m32s
Both still on stale bad digests after the previous retrigger. Old replicas
continue serving traffic throughout, so no outage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 05:50:21 +05:30
Ashwin Kumar Sivakumar
6c5c6b6938 chore: retrigger isolated CI build for social-media-managers
All checks were successful
build-and-release / build (catering-services) (push) Successful in 8s
build-and-release / build (customers) (push) Successful in 7s
build-and-release / build (fitness-trainers) (push) Successful in 3s
build-and-release / build (gateway) (push) Successful in 4s
build-and-release / build (employees) (push) Successful in 13s
build-and-release / build (cron) (push) Successful in 16s
build-and-release / build (companies) (push) Successful in 16s
build-and-release / build (developers) (push) Successful in 15s
build-and-release / build (graphic-designers) (push) Successful in 5s
build-and-release / build (job-seekers) (push) Successful in 3s
build-and-release / build (jobs) (push) Successful in 5s
build-and-release / build (makeup-artists) (push) Successful in 4s
build-and-release / build (leads) (push) Successful in 6s
build-and-release / build (payments) (push) Successful in 5s
build-and-release / build (photographers) (push) Successful in 6s
build-and-release / build (tutors) (push) Successful in 4s
build-and-release / build (ugc-content-creators) (push) Successful in 4s
build-and-release / build (video-editors) (push) Successful in 5s
build-and-release / build (users) (push) Successful in 5s
build-and-release / build (social-media-managers) (push) Successful in 5m40s
Landed a bad digest again in the previous batch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 05:03:19 +05:30
Ashwin Kumar Sivakumar
b8785e39f2 chore: retrigger isolated CI builds for services with stale bad digests
All checks were successful
build-and-release / build (employees) (push) Successful in 12s
build-and-release / build (customers) (push) Successful in 15s
build-and-release / build (cron) (push) Successful in 15s
build-and-release / build (fitness-trainers) (push) Successful in 5s
build-and-release / build (gateway) (push) Successful in 5s
build-and-release / build (job-seekers) (push) Successful in 5s
build-and-release / build (jobs) (push) Successful in 5s
build-and-release / build (leads) (push) Successful in 5s
build-and-release / build (payments) (push) Successful in 4s
build-and-release / build (photographers) (push) Successful in 5s
build-and-release / build (catering-services) (push) Successful in 8m41s
build-and-release / build (tutors) (push) Successful in 4s
build-and-release / build (ugc-content-creators) (push) Successful in 4s
build-and-release / build (graphic-designers) (push) Successful in 8m35s
build-and-release / build (developers) (push) Successful in 9m8s
build-and-release / build (companies) (push) Successful in 9m25s
build-and-release / build (makeup-artists) (push) Successful in 9m12s
build-and-release / build (social-media-managers) (push) Successful in 9m4s
build-and-release / build (video-editors) (push) Successful in 8m49s
build-and-release / build (users) (push) Successful in 10m56s
Restarting these deployments to pick up the corrected B2 secret revealed
they'd been running healthy old pods on top of a bad digest in the
deployment spec all along (silent from an earlier rebuild wave) — the
restart exposed it via ImagePullBackOff/ErrImagePull.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 04:14:58 +05:30
Ashwin Kumar Sivakumar
bf3850c282 chore: retrigger isolated CI builds for photographers, payments
All checks were successful
build-and-release / build (companies) (push) Successful in 9s
build-and-release / build (developers) (push) Successful in 7s
build-and-release / build (fitness-trainers) (push) Successful in 4s
build-and-release / build (employees) (push) Successful in 12s
build-and-release / build (customers) (push) Successful in 14s
build-and-release / build (gateway) (push) Successful in 4s
build-and-release / build (cron) (push) Successful in 16s
build-and-release / build (catering-services) (push) Successful in 17s
build-and-release / build (graphic-designers) (push) Successful in 4s
build-and-release / build (job-seekers) (push) Successful in 5s
build-and-release / build (jobs) (push) Successful in 5s
build-and-release / build (leads) (push) Successful in 4s
build-and-release / build (makeup-artists) (push) Successful in 6s
build-and-release / build (social-media-managers) (push) Successful in 5s
build-and-release / build (tutors) (push) Successful in 5s
build-and-release / build (ugc-content-creators) (push) Successful in 5s
build-and-release / build (users) (push) Successful in 5s
build-and-release / build (video-editors) (push) Successful in 4s
build-and-release / build (photographers) (push) Successful in 5m50s
build-and-release / build (payments) (push) Successful in 5m58s
Both landed ImagePullBackOff on bad digests from the previous batch;
old replicas kept serving throughout, so no outage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 03:23:56 +05:30
Ashwin Kumar Sivakumar
ea622a4af8 chore: retrigger isolated CI builds for 6 more services on bad digests
All checks were successful
build-and-release / build (catering-services) (push) Successful in 3s
build-and-release / build (companies) (push) Successful in 5s
build-and-release / build (customers) (push) Successful in 4s
build-and-release / build (developers) (push) Successful in 5s
build-and-release / build (employees) (push) Successful in 6s
build-and-release / build (graphic-designers) (push) Successful in 5s
build-and-release / build (job-seekers) (push) Successful in 5s
build-and-release / build (leads) (push) Successful in 4s
build-and-release / build (makeup-artists) (push) Successful in 5s
build-and-release / build (payments) (push) Successful in 4s
build-and-release / build (photographers) (push) Successful in 4s
build-and-release / build (social-media-managers) (push) Successful in 5s
build-and-release / build (gateway) (push) Successful in 3m25s
build-and-release / build (users) (push) Successful in 4s
build-and-release / build (video-editors) (push) Successful in 3s
build-and-release / build (cron) (push) Successful in 4m4s
build-and-release / build (jobs) (push) Successful in 4m12s
build-and-release / build (tutors) (push) Successful in 7m13s
build-and-release / build (fitness-trainers) (push) Successful in 8m58s
build-and-release / build (ugc-content-creators) (push) Successful in 8m51s
Same congestion pattern from the crates/contracts push. gateway still had
2 healthy replicas serving traffic throughout, so no outage — just a
failed rolling-update replica for these 6 services.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 03:01:39 +05:30
Ashwin Kumar Sivakumar
8cabe37818 fix(contracts): log the full B2 upload error chain, not just outer context
Some checks failed
build-and-release / build (cron) (push) Successful in 4m47s
build-and-release / build (developers) (push) Successful in 8m43s
build-and-release / build (companies) (push) Successful in 9m9s
build-and-release / build (catering-services) (push) Successful in 9m11s
build-and-release / build (customers) (push) Successful in 9m16s
build-and-release / build (employees) (push) Successful in 9m32s
build-and-release / build (gateway) (push) Successful in 3m3s
build-and-release / build (fitness-trainers) (push) Successful in 8m35s
build-and-release / build (jobs) (push) Successful in 4m33s
build-and-release / build (graphic-designers) (push) Successful in 8m21s
build-and-release / build (leads) (push) Successful in 8m29s
build-and-release / build (job-seekers) (push) Successful in 9m47s
build-and-release / build (makeup-artists) (push) Successful in 8m5s
build-and-release / build (payments) (push) Successful in 8m33s
build-and-release / build (photographers) (push) Successful in 8m44s
build-and-release / build (social-media-managers) (push) Successful in 8m11s
build-and-release / build (ugc-content-creators) (push) Successful in 7m1s
build-and-release / build (tutors) (push) Successful in 8m37s
build-and-release / build (video-editors) (push) Has been cancelled
build-and-release / build (users) (push) Has been cancelled
tracing::error!("...: {}", e) on an anyhow::Error only prints the outermost
.context() message ("B2 upload failed") — the actual root cause (auth
failure, DNS, timeout, bad bucket, etc.) from the AWS SDK is swallowed.
Switching to {:?} prints the full chain so the real failure is visible in
logs instead of a message that just repeats itself.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 02:34:22 +05:30
Ashwin Kumar Sivakumar
95184f83c4 chore: retrigger isolated CI builds for 8 services stuck on bad digests
Some checks failed
build-and-release / build (makeup-artists) (push) Waiting to run
build-and-release / build (payments) (push) Waiting to run
build-and-release / build (photographers) (push) Waiting to run
build-and-release / build (social-media-managers) (push) Waiting to run
build-and-release / build (tutors) (push) Waiting to run
build-and-release / build (ugc-content-creators) (push) Waiting to run
build-and-release / build (users) (push) Waiting to run
build-and-release / build (video-editors) (push) Waiting to run
build-and-release / build (customers) (push) Successful in 14s
build-and-release / build (cron) (push) Successful in 14s
build-and-release / build (employees) (push) Successful in 12s
build-and-release / build (fitness-trainers) (push) Successful in 5s
build-and-release / build (gateway) (push) Successful in 6s
build-and-release / build (jobs) (push) Successful in 5s
build-and-release / build (developers) (push) Has been cancelled
build-and-release / build (companies) (push) Has been cancelled
build-and-release / build (catering-services) (push) Has been cancelled
build-and-release / build (graphic-designers) (push) Has been cancelled
build-and-release / build (job-seekers) (push) Has been cancelled
build-and-release / build (leads) (push) Has been cancelled
The last crates/db push (professional.rs role_key fix) rebuilt all 20
services concurrently again, and 8 of them landed ImagePullBackOff on a
digest the registry doesn't have — same congestion pattern as the
employees incident. This commit only touches apps/*/ for the affected
services so CI rebuilds just these 8 in relative isolation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 02:32:46 +05:30
Ashwin Kumar Sivakumar
03d761f0f3 fix(db): remove role_key column alias breaking every ProfessionalRepository query
All checks were successful
build-and-release / build (cron) (push) Successful in 4m33s
build-and-release / build (companies) (push) Successful in 7m12s
build-and-release / build (developers) (push) Successful in 8m44s
build-and-release / build (catering-services) (push) Successful in 9m18s
build-and-release / build (customers) (push) Successful in 9m24s
build-and-release / build (gateway) (push) Successful in 3m5s
build-and-release / build (employees) (push) Successful in 8m10s
build-and-release / build (fitness-trainers) (push) Successful in 8m16s
build-and-release / build (jobs) (push) Successful in 4m27s
build-and-release / build (graphic-designers) (push) Successful in 7m55s
build-and-release / build (job-seekers) (push) Successful in 9m43s
build-and-release / build (leads) (push) Successful in 8m49s
build-and-release / build (makeup-artists) (push) Successful in 8m3s
build-and-release / build (payments) (push) Successful in 8m35s
build-and-release / build (photographers) (push) Successful in 8m43s
build-and-release / build (social-media-managers) (push) Successful in 7m57s
build-and-release / build (tutors) (push) Successful in 6m55s
build-and-release / build (ugc-content-creators) (push) Successful in 8m49s
build-and-release / build (video-editors) (push) Successful in 8m4s
build-and-release / build (users) (push) Successful in 9m11s
All three queries selected role_key AS profession_key, but the Professional
struct's field is named role_key — sqlx's FromRow derive matches by column
name, so every call (get_by_user_id, submit_for_verification, and its
UPDATE...RETURNING) failed at runtime with "no column found for name:
role_key". This is the professional-profile existence check used by
document upload, portfolio, and submission endpoints across all 10
profession services — document upload was 500ing for every professional
role because of this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 01:30:45 +05:30
Ashwin Kumar Sivakumar
fb681accc3 fix(profile): use user_role_profile_id column, not id, for profession tables
All checks were successful
build-and-release / build (companies) (push) Successful in 4s
build-and-release / build (catering-services) (push) Successful in 5s
build-and-release / build (cron) (push) Successful in 5s
build-and-release / build (customers) (push) Successful in 5s
build-and-release / build (developers) (push) Successful in 4s
build-and-release / build (employees) (push) Successful in 5s
build-and-release / build (fitness-trainers) (push) Successful in 4s
build-and-release / build (gateway) (push) Successful in 4s
build-and-release / build (job-seekers) (push) Successful in 3s
build-and-release / build (graphic-designers) (push) Successful in 5s
build-and-release / build (jobs) (push) Successful in 5s
build-and-release / build (makeup-artists) (push) Successful in 4s
build-and-release / build (leads) (push) Successful in 5s
build-and-release / build (photographers) (push) Successful in 3s
build-and-release / build (payments) (push) Successful in 5s
build-and-release / build (tutors) (push) Successful in 5s
build-and-release / build (ugc-content-creators) (push) Successful in 3s
build-and-release / build (social-media-managers) (push) Successful in 5s
build-and-release / build (video-editors) (push) Successful in 3s
build-and-release / build (users) (push) Successful in 7m58s
The profession-specific tables (photographer_profiles, tutor_profiles, etc.)
were extended with a separate user_role_profile_id FK column and a NOT NULL
user_id column, but every generic profile query still treated the shared
user_role_profiles.id value as if it were the profession table's own `id`
PK, and never supplied user_id at all. Result: PATCH /api/profile 500'd
with "null value in column user_id violates not-null constraint" on every
first-time save for any of the 10 professional roles — profile saves were
completely broken, which cascades into submit-for-verification always
running off an empty fallback payload with no real data or documents.
Fixes get_profile, save_profile, set_profile_status, and
fetch_saved_profile_by_urp_id to query/write user_role_profile_id (and
populate user_id on insert) instead of assuming id.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 00:57:39 +05:30
Ashwin Kumar Sivakumar
89a2076974 fix(verifications): wrap list response in {items: [...]}
Some checks failed
build-and-release / build (employees) (push) Successful in 7s
build-and-release / build (cron) (push) Successful in 10s
build-and-release / build (developers) (push) Successful in 12s
build-and-release / build (fitness-trainers) (push) Successful in 4s
build-and-release / build (companies) (push) Successful in 15s
build-and-release / build (catering-services) (push) Successful in 16s
build-and-release / build (gateway) (push) Successful in 4s
build-and-release / build (customers) (push) Successful in 16s
build-and-release / build (job-seekers) (push) Successful in 4s
build-and-release / build (graphic-designers) (push) Successful in 5s
build-and-release / build (makeup-artists) (push) Successful in 3s
build-and-release / build (leads) (push) Successful in 5s
build-and-release / build (jobs) (push) Successful in 5s
build-and-release / build (photographers) (push) Successful in 4s
build-and-release / build (payments) (push) Successful in 6s
build-and-release / build (social-media-managers) (push) Successful in 4s
build-and-release / build (tutors) (push) Successful in 4s
build-and-release / build (ugc-content-creators) (push) Successful in 5s
build-and-release / build (video-editors) (push) Successful in 6s
build-and-release / build (users) (push) Has been cancelled
GET /api/admin/verifications returned a bare JSON array, but every
consumer (Verification Management, Approval Management, and the e2e
test's own mock) expects {items: [...]}. Array.isArray(payload?.items)
was always false against a bare array, so both admin screens have been
showing "No verification requests found" regardless of what's actually
in the queue.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 00:51:14 +05:30
Ashwin Kumar Sivakumar
512eb722a5 chore(employees): retrigger isolated CI build
All checks were successful
build-and-release / build (companies) (push) Successful in 9s
build-and-release / build (customers) (push) Successful in 8s
build-and-release / build (catering-services) (push) Successful in 12s
build-and-release / build (developers) (push) Successful in 4s
build-and-release / build (cron) (push) Successful in 12s
build-and-release / build (gateway) (push) Successful in 4s
build-and-release / build (fitness-trainers) (push) Successful in 4s
build-and-release / build (graphic-designers) (push) Successful in 4s
build-and-release / build (job-seekers) (push) Successful in 4s
build-and-release / build (jobs) (push) Successful in 4s
build-and-release / build (leads) (push) Successful in 4s
build-and-release / build (makeup-artists) (push) Successful in 4s
build-and-release / build (payments) (push) Successful in 4s
build-and-release / build (photographers) (push) Successful in 4s
build-and-release / build (social-media-managers) (push) Successful in 4s
build-and-release / build (tutors) (push) Successful in 4s
build-and-release / build (ugc-content-creators) (push) Successful in 4s
build-and-release / build (users) (push) Successful in 4s
build-and-release / build (video-editors) (push) Successful in 4s
build-and-release / build (employees) (push) Successful in 5m53s
The prior push (crates/cache change) rebuilt all 20 workspace services
concurrently, and the employees job's build/push landed a digest that
doesn't exist in the registry (kubectl confirmed ImagePullBackOff with
"not found" resolving that exact sha256). This commit only touches
apps/employees/ so the CI path-filter rebuilds just that one service in
isolation, without the same concurrent-build congestion.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 00:34:39 +05:30
Ashwin Kumar Sivakumar
01f3810c8f feat(employees): add forgot-password/reset-password for admin accounts
All checks were successful
build-and-release / build (cron) (push) Successful in 4m55s
build-and-release / build (catering-services) (push) Successful in 9m18s
build-and-release / build (developers) (push) Successful in 9m14s
build-and-release / build (employees) (push) Successful in 9m15s
build-and-release / build (customers) (push) Successful in 9m35s
build-and-release / build (companies) (push) Successful in 9m49s
build-and-release / build (gateway) (push) Successful in 3m2s
build-and-release / build (fitness-trainers) (push) Successful in 8m20s
build-and-release / build (jobs) (push) Successful in 4m22s
build-and-release / build (graphic-designers) (push) Successful in 8m41s
build-and-release / build (job-seekers) (push) Successful in 9m14s
build-and-release / build (leads) (push) Successful in 9m10s
build-and-release / build (makeup-artists) (push) Successful in 8m51s
build-and-release / build (payments) (push) Successful in 8m51s
build-and-release / build (photographers) (push) Successful in 8m39s
build-and-release / build (ugc-content-creators) (push) Successful in 6m57s
build-and-release / build (social-media-managers) (push) Successful in 8m25s
build-and-release / build (tutors) (push) Successful in 8m28s
build-and-release / build (video-editors) (push) Successful in 8m43s
build-and-release / build (users) (push) Successful in 11m8s
Employees (internal admin/staff) had no self-service password reset —
only /login, /logout, /session existed. Adds /api/admin/auth/forgot-password
and /api/admin/auth/reset-password, mirroring the existing users-table flow
but against EmployeeRepository and a distinct Redis key namespace
(reset:employee:*) so a code for one identity store can never be consumed
against the other.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 23:28:39 +05:30
Ashwin Kumar Sivakumar
308daf4959 fix(verification): align document keys and dedupe role maps across handlers
All checks were successful
build-and-release / build (cron) (push) Successful in 16s
build-and-release / build (social-media-managers) (push) Successful in 3s
build-and-release / build (developers) (push) Successful in 15s
build-and-release / build (ugc-content-creators) (push) Successful in 4s
build-and-release / build (tutors) (push) Successful in 6s
build-and-release / build (video-editors) (push) Successful in 5s
build-and-release / build (job-seekers) (push) Successful in 4s
build-and-release / build (customers) (push) Successful in 7s
build-and-release / build (jobs) (push) Successful in 4s
build-and-release / build (catering-services) (push) Successful in 10s
build-and-release / build (makeup-artists) (push) Successful in 4s
build-and-release / build (leads) (push) Successful in 6s
build-and-release / build (payments) (push) Successful in 4s
build-and-release / build (fitness-trainers) (push) Successful in 3s
build-and-release / build (photographers) (push) Successful in 5s
build-and-release / build (gateway) (push) Successful in 3s
build-and-release / build (users) (push) Successful in 8m30s
build-and-release / build (employees) (push) Successful in 13s
build-and-release / build (companies) (push) Successful in 16s
build-and-release / build (graphic-designers) (push) Successful in 3s
extract_documents() recognized a stale set of document keys that no longer
matched what the frontend actually uploads (portfolio_ownership_proof,
professional_certifications, qualification_proof, tax_document), so every
non-COMPANY role's verification case was created with an empty documents
array. Also extracts role_key_to_display/role_to_table into a shared
role_meta module — verifications.rs and approvals.rs were each missing
UGC_CONTENT_CREATOR from their inline copies, so that role's rejections
and final approvals were silently no-ops.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 21:23:30 +05:30
Ashwin Kumar Sivakumar
b9133018a5 fix(admin-auth): add rate limiting to admin login endpoint
All checks were successful
build-and-release / build (makeup-artists) (push) Successful in 8m13s
build-and-release / build (cron) (push) Successful in 4m39s
build-and-release / build (gateway) (push) Successful in 2m47s
build-and-release / build (employees) (push) Successful in 8m49s
build-and-release / build (fitness-trainers) (push) Successful in 7m42s
build-and-release / build (payments) (push) Successful in 8m6s
build-and-release / build (jobs) (push) Successful in 4m19s
build-and-release / build (catering-services) (push) Successful in 9m29s
build-and-release / build (photographers) (push) Successful in 8m44s
build-and-release / build (customers) (push) Successful in 9m30s
build-and-release / build (tutors) (push) Successful in 7m8s
build-and-release / build (developers) (push) Successful in 9m35s
build-and-release / build (graphic-designers) (push) Successful in 9m33s
build-and-release / build (social-media-managers) (push) Successful in 8m57s
build-and-release / build (leads) (push) Successful in 9m9s
build-and-release / build (ugc-content-creators) (push) Successful in 8m52s
build-and-release / build (video-editors) (push) Successful in 8m14s
build-and-release / build (companies) (push) Successful in 9m58s
build-and-release / build (job-seekers) (push) Successful in 9m55s
build-and-release / build (users) (push) Successful in 10m21s
The admin/employee login handler had no brute-force protection, unlike
the regular user login path. Given these accounts hold internal/
super-admin privileges, add a tighter limit (5 attempts/15min vs 10
for regular users) using the existing sliding-window Redis limiter.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 16:12:52 +05:30
Ashwin Kumar Sivakumar
e53098728a refactor(companies): remove local-disk fallback from submit_with_documents — B2 only
All checks were successful
build-and-release / build (social-media-managers) (push) Successful in 4s
build-and-release / build (ugc-content-creators) (push) Successful in 4s
build-and-release / build (users) (push) Successful in 4s
build-and-release / build (companies) (push) Successful in 6m14s
build-and-release / build (developers) (push) Successful in 7s
build-and-release / build (fitness-trainers) (push) Successful in 3s
build-and-release / build (catering-services) (push) Successful in 13s
build-and-release / build (customers) (push) Successful in 12s
build-and-release / build (cron) (push) Successful in 15s
build-and-release / build (employees) (push) Successful in 14s
build-and-release / build (makeup-artists) (push) Successful in 4s
build-and-release / build (gateway) (push) Successful in 3s
build-and-release / build (graphic-designers) (push) Successful in 4s
build-and-release / build (jobs) (push) Successful in 4s
build-and-release / build (job-seekers) (push) Successful in 4s
build-and-release / build (leads) (push) Successful in 4s
build-and-release / build (payments) (push) Successful in 4s
build-and-release / build (tutors) (push) Successful in 4s
build-and-release / build (video-editors) (push) Successful in 4s
build-and-release / build (photographers) (push) Successful in 4s
2026-07-11 02:13:56 +05:30
Ashwin Kumar Sivakumar
a019f86477 feat(companies): add /profile/submit-with-documents endpoint with local-disk fallback for B2 outages
All checks were successful
build-and-release / build (cron) (push) Successful in 14s
build-and-release / build (graphic-designers) (push) Successful in 3s
build-and-release / build (jobs) (push) Successful in 4s
build-and-release / build (job-seekers) (push) Successful in 6s
build-and-release / build (leads) (push) Successful in 4s
build-and-release / build (customers) (push) Successful in 7s
build-and-release / build (makeup-artists) (push) Successful in 3s
build-and-release / build (payments) (push) Successful in 4s
build-and-release / build (photographers) (push) Successful in 3s
build-and-release / build (catering-services) (push) Successful in 9s
build-and-release / build (tutors) (push) Successful in 5s
build-and-release / build (ugc-content-creators) (push) Successful in 4s
build-and-release / build (social-media-managers) (push) Successful in 6s
build-and-release / build (users) (push) Successful in 4s
build-and-release / build (fitness-trainers) (push) Successful in 4s
build-and-release / build (video-editors) (push) Successful in 3s
build-and-release / build (developers) (push) Successful in 13s
build-and-release / build (gateway) (push) Successful in 4s
build-and-release / build (companies) (push) Successful in 6m38s
build-and-release / build (employees) (push) Successful in 13s
2026-07-11 01:31:03 +05:30
Ashwin Kumar Sivakumar
5fa1f8f74c fix(profile): persist all COMPANY profile fields, not just company_name
All checks were successful
build-and-release / build (developers) (push) Successful in 7s
build-and-release / build (video-editors) (push) Successful in 4s
build-and-release / build (companies) (push) Successful in 10s
build-and-release / build (fitness-trainers) (push) Successful in 3s
build-and-release / build (users) (push) Successful in 7m44s
build-and-release / build (cron) (push) Successful in 15s
build-and-release / build (customers) (push) Successful in 13s
build-and-release / build (employees) (push) Successful in 12s
build-and-release / build (gateway) (push) Successful in 3s
build-and-release / build (catering-services) (push) Successful in 16s
build-and-release / build (graphic-designers) (push) Successful in 4s
build-and-release / build (job-seekers) (push) Successful in 4s
build-and-release / build (jobs) (push) Successful in 5s
build-and-release / build (makeup-artists) (push) Successful in 4s
build-and-release / build (leads) (push) Successful in 4s
build-and-release / build (payments) (push) Successful in 5s
build-and-release / build (photographers) (push) Successful in 4s
build-and-release / build (social-media-managers) (push) Successful in 4s
build-and-release / build (tutors) (push) Successful in 3s
build-and-release / build (ugc-content-creators) (push) Successful in 4s
2026-07-10 14:27:15 +05:30
Ashwin Kumar Sivakumar
9d475858ab fix(auth): default role assignment to APPROVED at signup
All checks were successful
build-and-release / build (fitness-trainers) (push) Successful in 3s
build-and-release / build (catering-services) (push) Successful in 13s
build-and-release / build (customers) (push) Successful in 12s
build-and-release / build (gateway) (push) Successful in 4s
build-and-release / build (employees) (push) Successful in 14s
build-and-release / build (graphic-designers) (push) Successful in 3s
build-and-release / build (cron) (push) Successful in 16s
build-and-release / build (job-seekers) (push) Successful in 5s
build-and-release / build (jobs) (push) Successful in 3s
build-and-release / build (leads) (push) Successful in 5s
build-and-release / build (payments) (push) Successful in 3s
build-and-release / build (makeup-artists) (push) Successful in 5s
build-and-release / build (photographers) (push) Successful in 5s
build-and-release / build (tutors) (push) Successful in 4s
build-and-release / build (social-media-managers) (push) Successful in 4s
build-and-release / build (ugc-content-creators) (push) Successful in 5s
build-and-release / build (video-editors) (push) Successful in 4s
build-and-release / build (users) (push) Successful in 7m30s
build-and-release / build (companies) (push) Successful in 9s
build-and-release / build (developers) (push) Successful in 8s
Roles assigned at registration are immediately active for login + session.
Document/profile approval (handled separately by user_role_profiles in
onboarding/verifications) is the correct gate for review workflows —
do not gate raw role assignment on that flow.

Previously defaulted to PENDING for non-demo accounts, which get filtered
out by get_user_role_keys (WHERE status = 'APPROVED') and produced JWTs
with empty roles, causing the 'role is not assigned' UX bug after login.
2026-07-09 23:41:49 +05:30
Ashwin Kumar Sivakumar
f7d0f6f9f5 fix: Update Dockerfiles to use ci.nxtgauge.com registry
Some checks failed
build-and-release / build (companies) (push) Failing after 39s
build-and-release / build (catering-services) (push) Failing after 57s
build-and-release / build (cron) (push) Failing after 1m4s
build-and-release / build (gateway) (push) Successful in 3m46s
build-and-release / build (fitness-trainers) (push) Successful in 9m8s
build-and-release / build (graphic-designers) (push) Successful in 8m58s
build-and-release / build (employees) (push) Successful in 9m17s
build-and-release / build (customers) (push) Successful in 9m47s
build-and-release / build (developers) (push) Successful in 9m48s
build-and-release / build (job-seekers) (push) Successful in 9m1s
build-and-release / build (jobs) (push) Successful in 4m17s
build-and-release / build (leads) (push) Successful in 8m23s
build-and-release / build (makeup-artists) (push) Successful in 8m40s
build-and-release / build (payments) (push) Successful in 9m21s
build-and-release / build (photographers) (push) Successful in 9m20s
build-and-release / build (social-media-managers) (push) Successful in 8m9s
build-and-release / build (tutors) (push) Successful in 8m16s
build-and-release / build (ugc-content-creators) (push) Successful in 6m59s
build-and-release / build (video-editors) (push) Successful in 6m9s
build-and-release / build (users) (push) Successful in 8m37s
2026-07-08 03:37:18 +05:30
Ashwin Kumar Sivakumar
8a8372850f perf(ci): settle on capacity 2/node x 3 workers = 6 concurrent slots
All checks were successful
build-and-release / build (catering-services) (push) Successful in 9m29s
build-and-release / build (cron) (push) Successful in 4m33s
build-and-release / build (gateway) (push) Successful in 2m57s
build-and-release / build (companies) (push) Successful in 8m56s
build-and-release / build (customers) (push) Successful in 8m53s
build-and-release / build (developers) (push) Successful in 9m8s
build-and-release / build (employees) (push) Successful in 9m8s
build-and-release / build (fitness-trainers) (push) Successful in 8m27s
build-and-release / build (jobs) (push) Successful in 3m48s
build-and-release / build (graphic-designers) (push) Successful in 8m36s
build-and-release / build (social-media-managers) (push) Successful in 7s
build-and-release / build (tutors) (push) Successful in 6s
build-and-release / build (job-seekers) (push) Successful in 9m5s
build-and-release / build (leads) (push) Successful in 9m12s
build-and-release / build (makeup-artists) (push) Successful in 9m10s
build-and-release / build (video-editors) (push) Successful in 9s
build-and-release / build (payments) (push) Successful in 8m42s
build-and-release / build (photographers) (push) Successful in 8m32s
build-and-release / build (ugc-content-creators) (push) Successful in 8m44s
build-and-release / build (users) (push) Successful in 9m58s
capacity=3/node (9 total) oversubscribed the 8 physical cores per
node - individual builds slowed roughly 3x under contention (observed
directly: builds that took ~2m37s standalone were still running after
8+ minutes), for no clear net throughput win since this workload is
CPU-bound. Also found and fixed the actual reason capacity wasn't
taking effect at all initially: the runner daemon command never
passed --config, so it was silently running on default settings
regardless of config.yaml. Settled on 2/node (6 total, matching
docker-ready runner-2/3/4 - the control-plane node nxtgauge-1 is
deliberately excluded from the runner DaemonSet and should stay that
way, not used for build load).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 02:43:46 +05:30
Ashwin Kumar Sivakumar
ba1b0ebcc0 fix(ci): raise max-parallel to 9, make gitops push failures actually fail the job
Some checks failed
build-and-release / build (cron) (push) Successful in 3m8s
build-and-release / build (gateway) (push) Successful in 5m7s
build-and-release / build (jobs) (push) Successful in 6m39s
build-and-release / build (payments) (push) Failing after 2m34s
build-and-release / build (graphic-designers) (push) Failing after 7m40s
build-and-release / build (job-seekers) (push) Failing after 7m38s
build-and-release / build (employees) (push) Failing after 8m8s
build-and-release / build (developers) (push) Failing after 8m10s
build-and-release / build (fitness-trainers) (push) Failing after 8m6s
build-and-release / build (leads) (push) Failing after 7m54s
build-and-release / build (photographers) (push) Failing after 1m17s
build-and-release / build (makeup-artists) (push) Failing after 7m52s
build-and-release / build (customers) (push) Failing after 13m56s
build-and-release / build (companies) (push) Failing after 17m4s
build-and-release / build (catering-services) (push) Failing after 17m5s
build-and-release / build (tutors) (push) Successful in 9m19s
build-and-release / build (social-media-managers) (push) Successful in 9m26s
build-and-release / build (ugc-content-creators) (push) Successful in 9m36s
build-and-release / build (video-editors) (push) Successful in 9m37s
build-and-release / build (users) (push) Successful in 12m26s
Bumped runner.capacity from 1 to 3 on all 3 runner pods (9 total
concurrent slots - nodes were sitting at 7-11% CPU during builds, so
plenty of headroom), matched here with max-parallel: 9.

Also fixed a real bug: the gitops-push retry loop had no check after
exhausting all attempts, so a job whose every push attempt failed
would still exit 0 and report "success" - which is exactly what
happened on the previous run (verified: all 20 services built and
pushed their images correctly, but the actual GITOPS_PAT secret was
invalid/expired, and the retry loop silently swallowed the resulting
failure across all 20 jobs). Fixed the secret itself (confirmed the
existing admin-scoped Forgejo token has valid push access to
ashwin/nxtgauge-gitops and rotated GITOPS_PAT to it), and added an
explicit exit 1 if the retry loop exhausts without a successful push.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 02:30:36 +05:30
Ashwin Kumar Sivakumar
9efb733974 fix(ci): use GITOPS_PAT instead of never-configured GITOPS_PUSH_TOKEN
All checks were successful
build-and-release / build (catering-services) (push) Successful in 49s
build-and-release / build (cron) (push) Successful in 49s
build-and-release / build (developers) (push) Successful in 39s
build-and-release / build (employees) (push) Successful in 38s
build-and-release / build (fitness-trainers) (push) Successful in 38s
build-and-release / build (gateway) (push) Successful in 38s
build-and-release / build (graphic-designers) (push) Successful in 38s
build-and-release / build (job-seekers) (push) Successful in 39s
build-and-release / build (jobs) (push) Successful in 39s
build-and-release / build (leads) (push) Successful in 39s
build-and-release / build (makeup-artists) (push) Successful in 39s
build-and-release / build (companies) (push) Successful in 6m56s
build-and-release / build (payments) (push) Successful in 39s
build-and-release / build (customers) (push) Successful in 6m33s
build-and-release / build (social-media-managers) (push) Successful in 39s
build-and-release / build (ugc-content-creators) (push) Successful in 39s
build-and-release / build (users) (push) Successful in 39s
build-and-release / build (video-editors) (push) Successful in 39s
build-and-release / build (photographers) (push) Successful in 6m28s
build-and-release / build (tutors) (push) Successful in 6m32s
Confirmed via the matrix run: every service's actual docker build and
push succeeded, but the GitOps-update step failed on all of them with
"GITOPS_PUSH_TOKEN is empty". Checked the repo's configured secrets -
GITOPS_PUSH_USERNAME/GITOPS_PUSH_TOKEN were never set; only a leftover
GITOPS_GITHUB_USERNAME/GITOPS_GITHUB_TOKEN pair (from before the
gitops repo moved to Forgejo) and GITOPS_PAT exist. Confirmed
ashwin/nxtgauge-gitops lives on ci.nxtgauge.com matching this
workflow's defaults, so GITOPS_PAT is the one meant for this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 02:10:33 +05:30
Ashwin Kumar Sivakumar
e8651cf6c6 perf(ci): parallelize service builds across all 3 runners via matrix strategy
Some checks failed
build-and-release / build (companies) (push) Failing after 8s
build-and-release / build (customers) (push) Failing after 7s
build-and-release / build (developers) (push) Failing after 7s
build-and-release / build (employees) (push) Failing after 7s
build-and-release / build (fitness-trainers) (push) Failing after 8s
build-and-release / build (gateway) (push) Failing after 7s
build-and-release / build (graphic-designers) (push) Failing after 7s
build-and-release / build (job-seekers) (push) Failing after 8s
build-and-release / build (jobs) (push) Failing after 7s
build-and-release / build (leads) (push) Failing after 6s
build-and-release / build (makeup-artists) (push) Failing after 7s
build-and-release / build (payments) (push) Failing after 8s
build-and-release / build (photographers) (push) Failing after 7s
build-and-release / build (social-media-managers) (push) Failing after 7s
build-and-release / build (tutors) (push) Failing after 7s
build-and-release / build (ugc-content-creators) (push) Failing after 8s
build-and-release / build (users) (push) Failing after 7s
build-and-release / build (video-editors) (push) Failing after 7s
build-and-release / build (cron) (push) Failing after 3m19s
build-and-release / build (catering-services) (push) Failing after 5m54s
The build was structured as a single job looping through all ~20
services sequentially, so only 1 of the 3 deployed runner pods (one
per worker node) was ever used - the other 2 sat idle for the entire
build. Switched to a static per-service matrix (max-parallel: 3,
matching the 3 runners at capacity 1 each) so independent services
build concurrently. Each matrix job does its own quick "does this
service need building" check up front (same change-detection logic,
now per-job) rather than relying on a shared job output, to avoid
needing cross-job artifact/output passing.

GitOps updates also move into each matrix job (previously a single
step at the end) since there's no longer one job aggregating all
results - added a fetch/reset/retry loop since multiple jobs can now
push to the same gitops branch concurrently.

Tried adding cargo registry/target cache mounts to Dockerfile.simple
for a bigger per-build win too, but measured it directly (local A/B:
cold build 2m37s vs a second, supposedly-cached build 7m18s) and it
made things slower here, likely cargo's own cache-verification pass
outweighing the benefit for this dependency set - reverted that part,
Dockerfile.simple is unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 01:54:47 +05:30
Ashwin Kumar Sivakumar
968960fb3d fix(ci): tolerate buildx's pretty-printed metadata-file JSON when extracting digest
Some checks failed
build-and-release / build (push) Failing after 1h49m45s
docker buildx --metadata-file writes pretty-printed JSON (space after
the colon: "containerimage.digest": "sha256:..."), but the digest
grep required compact JSON with no space, so it always matched
nothing. That produced an empty $digest, which the script correctly
treated as fatal and exited on - right after the first service
(gateway) had already built and pushed successfully, silently
aborting the rest of the service loop. Verified the fix against a
real locally-generated metadata file from the same buildx command.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 00:03:32 +05:30
Ashwin Kumar Sivakumar
d422139e48 fix(ci): remove redundant rustup install now that base image already has it
Some checks failed
build-and-release / build (push) Failing after 2m44s
The official rust:alpine base (unlike whatever image the old defunct
registry.nxtgauge.com mirror actually held) already ships a full
rustup-installed toolchain, so the extra `curl rustup.rs | sh` step
now fails with "cannot install while Rust is installed". Drop it and
the /root/.cargo/bin PATH override (the base image already sets PATH
to its own /usr/local/cargo/bin) - just add the musl target, which the
existing rustup binary can do directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 23:41:31 +05:30
Ashwin Kumar Sivakumar
ae9c38a3af fix(ci): point Dockerfile.simple at ci.nxtgauge.com instead of the defunct registry.nxtgauge.com mirror
Some checks failed
build-and-release / build (push) Failing after 2m36s
registry.nxtgauge.com was set up back in April for the old Woodpecker
CI (commit 09df032) as a manual one-time mirror of rust:alpine to
dodge Docker Hub rate limits. It never had a real ingress route wired
up on the current cluster (confirmed: no Ingress/IngressRoute matches
that host anywhere), so every build has been failing at the base-image
pull. ci.nxtgauge.com is the registry actually in active use since the
Forgejo migration, and the build job already authenticates against it
for pushing service images, so no new credentials are needed. Manually
mirrored rust:alpine there as a one-time step.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 23:36:23 +05:30
Ashwin Kumar Sivakumar
c8fa02a9a4 fix(ci): derive DOCKER_HOST from the job container's own default gateway
Some checks failed
build-and-release / build (push) Failing after 16s
--add-host=host.docker.internal:host-gateway is not being honored by
this act_runner setup (tried via the runner's global container.options
and a per-job container: block; neither worked, confirmed by two
separate failed runs with identical DNS-lookup errors). Read the
container's real default-route gateway from /proc/net/route instead
(portable, no iproute2 dependency) and export it as DOCKER_HOST via
GITHUB_ENV. This is the actual IP of the dind engine that spawned the
job container, regardless of hostname-aliasing support.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 22:50:54 +05:30
Ashwin Kumar Sivakumar
dcf573e0f6 fix(ci): use explicit container: block for reliable job-level docker options
Some checks failed
build-and-release / build (push) Failing after 16s
Forgejo's docs note --add-host via the runner's global
container.options config is not reliably honored for jobs using pure
label-based runs-on mapping. Setting the same image + options
explicitly per-job via jobs.build.container is the more directly
supported path for per-job container customization.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 22:45:35 +05:30
Ashwin Kumar Sivakumar
b9e0ba247c fix(ci): route job-container DOCKER_HOST via host.docker.internal
Some checks failed
build-and-release / build (push) Failing after 16s
127.0.0.1:2375 only worked from the runner container's own network
namespace (sibling to the dind sidecar in the same pod). The actual
job container that runs each step is spawned *by* that dind engine,
one level deeper, so its own loopback doesn't reach the sidecar.
host.docker.internal (mapped to the job container's real gateway via
--add-host=host.docker.internal:host-gateway in the runner's
container.options) reaches back to the dind engine that created it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 19:59:27 +05:30
Ashwin Kumar Sivakumar
e6e503ca69 ci: trigger build after enabling docker-in-docker privileged mode
Some checks failed
build-and-release / build (push) Failing after 15s
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 19:07:50 +05:30
Ashwin Kumar Sivakumar
0ea4024657 fix(ci): fix YAML syntax error in build.yaml that silently disabled Actions
Some checks failed
build-and-release / build (push) Failing after 14s
The unindented heredoc terminator (<<EOF2 ... EOF2 flush-left) broke the
YAML block-scalar indentation contract for the `run: |` step, causing
Forgejo to log "ignore invalid workflow build.yaml: yaml: line 75:
could not find expected ':'" and silently skip the workflow entirely
on every push since this line was introduced. No builds have run on
main or high-performance since 2026-07-05 as a result. Replaced the
multi-line heredoc with a single-line bash here-string, which needs
no extra indentation and keeps the shell logic identical.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 18:34:45 +05:30
Ashwin Kumar Sivakumar
519a52813f fix(jobs): nest jobs router under /api/jobs to match gateway routing
The gateway forwards /api/jobs unmodified to the jobs service, but the
service registered its routes at bare /jobs with no prefix — every
other service (companies, users) nests under /api/<service> to match.
This made the public job listing endpoint unreachable (404) through
the gateway on test111.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 18:15:34 +05:30
Ashwin Kumar Sivakumar
afb4dc9ae6 fix(ci): use docker-ready runner label in Forgejo workflow
- Change runs-on from self-hosted to docker-ready
- Add DOCKER_HOST and DOCKER_BUILDKIT env vars
- Align with other repo workflows
2026-07-06 04:24:06 +05:30
Ashwin Kumar Sivakumar
67d372c160 ci: remove GitHub Actions workflow - using Forgejo CI exclusively
- Remove build-and-deploy-forgejo.yml from GitHub Actions
- Forgejo CI at ci.nxtgauge.com now handles all builds and deployments
- All images pushed to Forgejo registry (ci.nxtgauge.com/ashwin/*)
- GitOps updates handled by Forgejo workflows
2026-07-06 04:19:40 +05:30
Ashwin Kumar Sivakumar
b8939e6384 fix(k8s): switch db-migrate image from GHCR to Forgejo registry 2026-07-06 03:52:54 +05:30
Ashwin Kumar Sivakumar
6b1b38e04a fix(docker-compose): switch from GHCR to Forgejo registry 2026-07-06 03:52:35 +05:30
Ashwin Kumar Sivakumar
76e8646c7c fix(ci): switch from GHCR to Forgejo registry
- Update workflow to push to ci.nxtgauge.com/ashwin/*
- Use FORGEJO_USERNAME and FORGEJO_TOKEN secrets
- Fix gitops repo cloning to use x-access-token
- Add ai-assistant to deployment scripts
2026-07-06 03:49:11 +05:30
Ashwin Kumar Sivakumar
cba7f607cd fix: resolve all warnings and errors
- Add #![allow(dead_code)] pragma to all main.rs files
- Remove unused imports from users handlers (ai_cache, AiCreditPackageRepository, AiCreditTransactionRepository)
- Make LiteLLMChatMessage and LiteLLMChoice public with public fields
- Fix remaining unused variables with cargo fix
- Add missing pub visibility modifiers to litellm structs

All packages now compile with ZERO warnings and errors!
2026-07-06 03:00:37 +05:30
Ashwin Kumar Sivakumar
b99651f330 fix: resolve warnings (partial)
- Fix unused variable entry_type -> _entry_type
- Remove unused imports BufMut and cache_jobs from companies handlers
- Fix doc comment on lazy_static
- Add #[allow(dead_code)] to reset_daily_actions and reset_monthly_credits
- Fix unused imports in job_seekers handlers
2026-07-06 02:55:42 +05:30
Ashwin Kumar Sivakumar
e83271c300 fix: resolve payments package compilation errors
- Remove duplicate 'name' field from PricingPackageRow struct
- Add tracecoins_credited variable from package.tracecoins_amount
- Change rust_decimal to use i32 instead of Decimal for SQL compatibility
- Simplify discount calculation to work with paise (integer) values
- Fix payu config field names (merchant_key, merchant_salt)

payments package now compiles successfully.
2026-07-06 02:32:14 +05:30
Ashwin Kumar Sivakumar
0ac0527232 fix: resolve match arm type mismatches and add Deserialize trait
- Fix match arm type errors in ai.rs: wrap bare String returns in (String, bool)
  tuples to match expected return type (response_text, _ollama_used)
- Add Deserialize trait to LiteLLMChatMessage for deserialization
- Add missing fields to GenerateFieldResponse constructors
- Remove body.user_id reference from form extraction (field doesn't exist)
- Add get_llm_base_url() and get_llm_model() helper functions

users package now compiles successfully (only warnings remain).
2026-07-06 02:27:09 +05:30
Ashwin Kumar Sivakumar
339325091c fix: resolve cherry-pick breakage and add missing modules
- Restore deleted module declarations (tutor, ugc_content_creator, user,
  user_role_profile, verification, video_editor) in db/models/mod.rs
- Add mod ai; to users/src/main.rs (fixes crate::ai import)
- Add pub mod ai_auto; to handlers/mod.rs
- Add rust_decimal dependency to payments/Cargo.toml
- Fix missing PgPool import in payments/src/ai_credits.rs
- Make LiteLLMUsage fields public in users/src/litellm.rs
- Add get_llm_base_url() and get_llm_model() helper functions
- Remove leading underscore from variables that are used

Partial fix for high-performance branch build issues.
2026-07-06 02:23:29 +05:30
Ashwin Kumar Sivakumar
4f2683d085 chore: remove legacy AI quota system
Delete legacy code that used old company_ai_usage/job_seeker_ai_usage tables:
- Remove has_active_ai_pack() - old AI_PACK pricing package check
- Remove check_and_increment_usage() - legacy daily quota tracking
- Remove BASE_AI_LIMIT, get_ai_limit_for_package constants/functions
- Remove legacy queries from ai_auto_apply() and ai_usage_status()
- Update auto_apply.rs to use user_ai_subscriptions.daily_actions_used
  instead of job_seeker_ai_usage table
- Inline apply_scheduled_downgrades() and expire_trials() in cron tasks
  to remove dependency on users crate internal modules

The new system uses user_ai_subscriptions with:
- daily_actions_used / daily_credits_used counters
- monthly_credits_total / monthly_credits_used
- purchased_credits_total / purchased_credits_used

All AI billing now flows through the wallet/ledger system with
LiteLLM integration (Tasks 1-10).
2026-07-06 02:14:23 +05:30
Ashwin Kumar Sivakumar
c795242040 chore: remove broken company_ai_credits stub
- Delete apps/companies/src/handlers/ai.rs (broken placeholder code)
- Remove ai module export from handlers/mod.rs
- Remove /api/companies/ai route from main.rs

The broken stub had:
- Uuid::parse_str("placeholder") that always errored
- Uuid::new_v4() generating random IDs instead of using auth
- Queries to non-existent company_ai_credits/ai_usage_log tables

AI credits are now properly handled by the users service with
the new ai_credits module (wallet, ledger, LiteLLM integration).
2026-07-06 02:08:07 +05:30
Ashwin Kumar Sivakumar
0dd5045676 feat: Complete Ask Ash AI Credits implementation on high-performance branch (Tasks 1-10)
- Task 1: Admin endpoints for wallet management
- Task 2: AI Credits admin UI (pricing.tsx, credit.tsx)
- Task 3: Ollama security (NetworkPolicy, prompt validation, audit)
- Task 4: LiteLLM integration (litellm.rs, migrated AI feature handlers)
- Task 5: Refund architecture (ai_refunds table, endpoints)
- Task 6: Coupons, promotions, referrals (order creation with coupon)
- Task 7: Subscription lifecycle (plan upgrades/downgrades, cron jobs)
- Task 8: Credit expiration enforcement (daily cron task)
- Task 9: Token cost engine (ai_model_cost_config, margin view)
- Task 10: Observability (metrics tables, aggregation function)

Cherry-picked from main branch commit 3c0f45f
2026-07-06 01:49:16 +05:30
Ashwin Kumar Sivakumar
f5831da1f5 ci(forgejo): update backend build pipeline 2026-07-03 19:51:37 +05:30
Ashwin Kumar Sivakumar
fcb40c3590 ci: sync GitHub pushes to Forgejo 2026-07-03 18:59:02 +05:30