Commit Graph

69 Commits

Author SHA1 Message Date
gpt-engineer-app[bot]
73e847015d Add rate limit aware retries
Enhance retry logic to detect 429 rate limits, parse Retry-After headers, and apply smart backoff across all entity submissions. Adds rate-limit-aware backoff, preserves user feedback via UI events, and ensures retries respect server-provided guidance.
2025-11-10 19:05:31 +00:00
gpt-engineer-app[bot]
8ed5edbe24 Implement automatic retry in entitySubmissionHelpers.ts
Add exponential backoff retry logic with user feedback
- Integrate with existing withRetry patterns
- Introduce unique retry IDs for submissions
- Emit consistent UI events for retry progress, success, and failure
- Enhance rate-limit handling including Retry-After scenarios
- Standardize baseDelay and shouldRetry across park, ride, company, ride_model, and other submissions
2025-11-10 19:02:11 +00:00
gpt-engineer-app[bot]
64e2b893b9 Implement pipeline monitoring alerts
Extend existing alert system to include real-time monitoring for rate limit violations and ban evasion attempts. This involves adding new reporting functions to `pipelineAlerts.ts`, integrating these functions into submission and company helper files, updating the admin dashboard component to display new alert types, and creating a database migration for the new alert type.
2025-11-08 00:39:37 +00:00
gpt-engineer-app[bot]
d4f3861e1d Fix missing recordSubmissionAttempt calls
Added `recordSubmissionAttempt(userId)` to `submitParkCreation`, `submitParkUpdate`, `submitRideCreation`, and `submitRideUpdate` in `src/lib/entitySubmissionHelpers.ts`. This ensures that rate limit counters are incremented after a successful rate limit check, closing a vulnerability that allowed for unlimited submissions of parks and rides.
2025-11-07 21:32:03 +00:00
gpt-engineer-app[bot]
26e2253c70 Fix composite submission protections
Implement Phase 4 by adding `recordSubmissionAttempt` and `withRetry` logic to the ban check for composite submissions. This ensures better error handling and prevents bypass of ban checks due to transient network issues.
2025-11-07 20:24:00 +00:00
gpt-engineer-app[bot]
48c1e9cdda Fix ride model submissions
Implement rate limiting, ban checks, retry logic, and breadcrumb tracking for ride model creation and update functions. Wrap existing ban checks and database operations in retry logic.
2025-11-07 19:59:32 +00:00
gpt-engineer-app[bot]
2c9358e884 Add protections to company submission functions
Implement rate limiting, ban checks, retry logic, and breadcrumb tracking for all 8 company submission functions: manufacturer, designer, operator, and property_owner (both create and update). This ensures consistency with other protected entity types and enhances the robustness of the submission pipeline.
2025-11-07 19:57:47 +00:00
gpt-engineer-app[bot]
6731e074a7 Fix photo and timeline submission bulletproofing
Implement rate limiting, validation, retry logic, and ban checking for photo and timeline submissions. This includes updates to `UppyPhotoSubmissionUpload.tsx` and `entitySubmissionHelpers.ts`.
2025-11-07 19:27:30 +00:00
gpt-engineer-app[bot]
91a5b0e7dd Implement Phase 3: Enhanced Error Handling
This commit implements Phase 3 of the Sacred Pipeline, focusing on enhanced error handling. It includes:

- **Transaction Status Polling Endpoint**: A new edge function `check-transaction-status` allows clients to poll the status of moderation transactions using idempotency keys.
- **Expanded Error Sanitizer Patterns**: The `src/lib/errorSanitizer.ts` file has been updated with more comprehensive patterns to remove sensitive information from error messages, making them safer for display and logging. User-friendly replacements for common errors are also included.
- **Rate Limiting for Submission Creation**: Client-side rate limiting has been implemented in `src/lib/submissionRateLimiter.ts` and applied to key submission functions within `src/lib/entitySubmissionHelpers.ts` (e.g., `submitParkCreation`, `submitRideCreation`, `submitParkUpdate`, `submitRideUpdate`) to prevent abuse and accidental duplicate submissions.
2025-11-07 18:22:27 +00:00
gpt-engineer-app[bot]
d903e96e13 Implement pipeline monitoring alerts
Approve and implement the Supabase migration for the pipeline monitoring alert system. This includes expanding alert types, adding new monitoring functions, and updating existing ones with escalating thresholds.
2025-11-07 05:05:32 +00:00
gpt-engineer-app[bot]
a74b8d6e74 Fix: Implement pipeline error handling
Implement comprehensive error handling and robustness measures across the entire pipeline as per the detailed plan. This includes database-level security, client-side validation, scheduled maintenance, and fallback mechanisms for edge function failures.
2025-11-07 04:50:17 +00:00
gpt-engineer-app[bot]
5b0ac813e2 Fix park submission locations
Implement Phase 1 of the JSONB violation fix by creating the `park_submission_locations` table. This includes migrating existing data from `park_submissions.temp_location_data` and updating relevant code to read and write to the new relational table. The `temp_location_data` column will be dropped after data migration.
2025-11-06 15:45:12 +00:00
gpt-engineer-app[bot]
bd4f75bfb2 Fix entity submission pipelines
Refactor park updates, ride updates, and timeline event submissions to use dedicated relational tables instead of JSON blobs in `submission_items.item_data`. This enforces the "NO JSON IN SQL" rule, improving queryability, data integrity, and consistency across the pipeline.
2025-11-06 15:13:36 +00:00
gpt-engineer-app[bot]
ed9d17bf10 Fix ride model technical specs
Implement plan to fix ride model technical specifications pipeline. This includes creating a new migration for the `ride_model_submission_technical_specifications` table, updating `entitySubmissionHelpers.ts` to handle insertion of technical specifications, and modifying the edge function `process-selective-approval/index.ts` to fetch these specifications. This ensures no data loss for ride model technical specifications.
2025-11-06 15:03:51 +00:00
gpt-engineer-app[bot]
de9a48951f Fix ride submission data loss
Implement the plan to fix critical data loss in ride submissions. This includes:
- Storing ride technical specifications, coaster statistics, and name history in submission tables.
- Adding missing category-specific fields to the `ride_submissions` table via a new migration.
- Updating submission helpers and the edge function to include these new fields.
- Fixing the park location Zod schema to include `street_address`.
2025-11-06 14:51:36 +00:00
gpt-engineer-app[bot]
9159b2ce89 Fix submission flow for street address
Update submission and moderation pipeline to correctly handle `street_address`. This includes:
- Adding `street_address` to the Zod schema in `ParkForm.tsx`.
- Ensuring `street_address` is included in `tempLocationData` for park and composite park creations in `entitySubmissionHelpers.ts`.
- Preserving `street_address` when editing submissions in `submissionItemsService.ts`.
- Saving `street_address` when new locations are created during submission approval in `submissionItemsService.ts`.
2025-11-06 14:15:45 +00:00
gpt-engineer-app[bot]
e631ecc2b1 Fix: Remove unused 'content' column from submissions 2025-11-06 05:09:44 +00:00
gpt-engineer-app[bot]
36878c05af Implement location data fix 2025-11-06 02:02:57 +00:00
gpt-engineer-app[bot]
20f3844a58 Fix composite submission location 2025-11-06 01:44:28 +00:00
gpt-engineer-app[bot]
0f8e98a85a Fix: Re-evaluate initial submission validation 2025-11-06 00:11:31 +00:00
gpt-engineer-app[bot]
dfd17e8244 Refactor park submission location handling 2025-11-05 20:46:02 +00:00
gpt-engineer-app[bot]
5a61a2b49e Fix: Replace require with ES module imports 2025-11-05 16:12:47 +00:00
gpt-engineer-app[bot]
116eaa2635 Fix composite submission error logging 2025-11-05 14:20:56 +00:00
gpt-engineer-app[bot]
783284a47a Implement success/failure states 2025-11-05 14:02:34 +00:00
gpt-engineer-app[bot]
dcc9e2af8f feat: Add retry logic to updates 2025-11-05 13:56:08 +00:00
gpt-engineer-app[bot]
ec5181b9e6 feat: Implement circuit breaker and retry logic 2025-11-05 13:27:22 +00:00
gpt-engineer-app[bot]
5e0640252c feat: Implement retry logic for composite submissions 2025-11-05 13:16:30 +00:00
gpt-engineer-app[bot]
876119c079 Fix composite submission error handling 2025-11-05 13:09:54 +00:00
gpt-engineer-app[bot]
5616a4ffe8 Fix orphaned submission data 2025-11-05 03:01:30 +00:00
gpt-engineer-app[bot]
a51f37bf8a Fix submission process issues 2025-11-05 02:25:27 +00:00
gpt-engineer-app[bot]
e21e4990ad Fix submission creation process 2025-11-05 02:21:38 +00:00
gpt-engineer-app[bot]
a9334c7a3a Implement Phase 3C error logging 2025-11-04 19:39:55 +00:00
gpt-engineer-app[bot]
80aa033e70 Fix submission_items foreign keys 2025-11-04 14:57:58 +00:00
gpt-engineer-app[bot]
6af981a6e4 Fix imports and test flow 2025-11-03 22:03:08 +00:00
gpt-engineer-app[bot]
db8029f573 Refactor submission items 2025-11-03 03:55:38 +00:00
gpt-engineer-app[bot]
07420a67bf Fix: Handle internal errors 2025-11-03 02:41:01 +00:00
gpt-engineer-app[bot]
9e8e8719b4 Fix: Resolve TypeScript errors 2025-11-03 02:28:57 +00:00
gpt-engineer-app[bot]
bccaebc6d6 Fix: Block photo uploads on entity edits 2025-11-02 20:39:22 +00:00
gpt-engineer-app[bot]
bb951e637f Refactor composite submission logic 2025-11-02 20:29:08 +00:00
gpt-engineer-app[bot]
4aa0c02769 Fix 'Operator is Owner' bug 2025-11-02 20:08:27 +00:00
gpt-engineer-app[bot]
3c6d6a3bdf feat: Implement composite submission system 2025-11-02 19:51:20 +00:00
gpt-engineer-app[bot]
fe76c8c572 feat: Implement comprehensive ban enforcement 2025-10-30 01:47:51 +00:00
gpt-engineer-app[bot]
97f415941c Optimize select queries 2025-10-21 16:42:31 +00:00
gpt-engineer-app[bot]
638d49c8d9 Update plan with remaining phases 2025-10-21 12:25:36 +00:00
gpt-engineer-app[bot]
6f1baef8c0 Approve tool use 2025-10-20 12:58:09 +00:00
gpt-engineer-app[bot]
640fdb11db feat: Execute complete production readiness plan 2025-10-20 12:23:13 +00:00
gpt-engineer-app[bot]
d9a912f443 Fix: Enable TypeScript strict mode 2025-10-20 00:26:49 +00:00
gpt-engineer-app[bot]
a00623d925 Fix creation functions in submission flow 2025-10-19 20:19:47 +00:00
gpt-engineer-app[bot]
5fa073cca2 Implement plan 2025-10-19 19:28:04 +00:00
gpt-engineer-app[bot]
026f402057 Refactor: Implement milestone moderation fixes 2025-10-17 17:21:21 +00:00