From 00815109141c9bd196275b4e79779d213e9d08bd Mon Sep 17 00:00:00 2001 From: emil Date: Wed, 13 May 2026 20:41:27 +0300 Subject: [PATCH] Wave 6: refactor generators batch 4 to crypto random - refactor(generators): migrate Teams, Time, Uuid, Weighted to crypto random - refactor(generators): migrate WheelSpinner, YesNo to crypto random All 28 generators now use cryptographically secure random via src/lib/client/random.ts --- .sisyphus/boulder.json | 30 ++++++++++++++-- .sisyphus/plans/critical-refactor.md | 12 +++---- .../generators/TeamsGenerator.astro | 34 +++++++------------ src/components/generators/TimeGenerator.astro | 10 ++++-- src/components/generators/UuidGenerator.astro | 20 ++++------- .../generators/WeightedGenerator.astro | 14 +++++--- src/components/generators/WheelSpinner.astro | 32 ++++++++--------- .../generators/YesNoGenerator.astro | 9 +++-- 8 files changed, 92 insertions(+), 69 deletions(-) diff --git a/.sisyphus/boulder.json b/.sisyphus/boulder.json index ade1c7f..7525caa 100644 --- a/.sisyphus/boulder.json +++ b/.sisyphus/boulder.json @@ -8,7 +8,7 @@ "plan_name": "critical-refactor", "status": "active", "started_at": "2026-05-13T16:25:19.266Z", - "updated_at": "2026-05-13T17:34:08.166Z", + "updated_at": "2026-05-13T17:41:13.262Z", "session_ids": [ "ses_1de6ede59ffexUwt5C0sddEWwR" ], @@ -120,6 +120,19 @@ "status": "completed", "ended_at": "2026-05-13T17:34:08.166Z", "elapsed_ms": 93514 + }, + "todo:27": { + "task_key": "todo:27", + "task_label": "27", + "task_title": "Refactor TeamsGenerator.astro", + "session_id": "ses_1dd94b493ffemX2z2dEFdh8W7R", + "agent": "Sisyphus-Junior", + "category": "unspecified-high", + "started_at": "2026-05-13T17:37:23.881Z", + "status": "completed", + "updated_at": "2026-05-13T17:41:13.262Z", + "ended_at": "2026-05-13T17:41:13.262Z", + "elapsed_ms": 229381 } } } @@ -127,7 +140,7 @@ "active_plan": "/home/emil/Desktop/Coding/AI/Randify.pro/.sisyphus/plans/critical-refactor.md", "started_at": "2026-05-13T16:25:19.266Z", "status": "active", - "updated_at": "2026-05-13T17:34:08.166Z", + "updated_at": "2026-05-13T17:41:13.262Z", "session_ids": [ "ses_1de6ede59ffexUwt5C0sddEWwR" ], @@ -239,6 +252,19 @@ "status": "completed", "ended_at": "2026-05-13T17:34:08.166Z", "elapsed_ms": 93514 + }, + "todo:27": { + "task_key": "todo:27", + "task_label": "27", + "task_title": "Refactor TeamsGenerator.astro", + "session_id": "ses_1dd94b493ffemX2z2dEFdh8W7R", + "agent": "Sisyphus-Junior", + "category": "unspecified-high", + "started_at": "2026-05-13T17:37:23.881Z", + "status": "completed", + "updated_at": "2026-05-13T17:41:13.262Z", + "ended_at": "2026-05-13T17:41:13.262Z", + "elapsed_ms": 229381 } }, "agent": "atlas" diff --git a/.sisyphus/plans/critical-refactor.md b/.sisyphus/plans/critical-refactor.md index 2f0b832..1993e03 100644 --- a/.sisyphus/plans/critical-refactor.md +++ b/.sisyphus/plans/critical-refactor.md @@ -635,7 +635,7 @@ Max Concurrent: 8 (Wave 3) - Message: `refactor(generators): migrate batch 3 to crypto random (Meal, Names, Number, Palette, Password, Rps, Shuffler)` - Files: `src/components/generators/{Meal,Names,Number,Palette,Password,Rps,Shuffler}Generator.astro` -- [ ] 27. Refactor TeamsGenerator.astro +- [x] 27. Refactor TeamsGenerator.astro **What to do**: Same pattern as Task 6. **Recommended Agent Profile**: `unspecified-high` **Parallelization**: YES (with Tasks 13-19, 20-26, 28-32) @@ -643,7 +643,7 @@ Max Concurrent: 8 (Wave 3) **Acceptance Criteria**: No Math.random, uses random.ts and i18n.ts **Commit**: NO -- [ ] 28. Refactor TimeGenerator.astro +- [x] 28. Refactor TimeGenerator.astro **What to do**: Same pattern as Task 6. **Recommended Agent Profile**: `unspecified-high` **Parallelization**: YES (with Tasks 13-19, 20-26, 27, 29-32) @@ -651,7 +651,7 @@ Max Concurrent: 8 (Wave 3) **Acceptance Criteria**: No Math.random, uses random.ts and i18n.ts **Commit**: NO -- [ ] 29. Refactor UuidGenerator.astro +- [x] 29. Refactor UuidGenerator.astro **What to do**: Same pattern as Task 6. **Recommended Agent Profile**: `unspecified-high` **Parallelization**: YES (with Tasks 13-19, 20-26, 27-28, 30-32) @@ -659,7 +659,7 @@ Max Concurrent: 8 (Wave 3) **Acceptance Criteria**: No Math.random, uses random.ts and i18n.ts **Commit**: NO -- [ ] 30. Refactor WeightedGenerator.astro +- [x] 30. Refactor WeightedGenerator.astro **What to do**: Same pattern as Task 6. **Recommended Agent Profile**: `unspecified-high` **Parallelization**: YES (with Tasks 13-19, 20-26, 27-29, 31-32) @@ -667,7 +667,7 @@ Max Concurrent: 8 (Wave 3) **Acceptance Criteria**: No Math.random, uses random.ts and i18n.ts **Commit**: NO -- [ ] 31. Refactor WheelSpinner.astro +- [x] 31. Refactor WheelSpinner.astro **What to do**: Same pattern as Task 6. Note: file is `WheelSpinner.astro`, not `WheelGenerator.astro`. **Recommended Agent Profile**: `unspecified-high` **Parallelization**: YES (with Tasks 13-19, 20-26, 27-30, 32) @@ -675,7 +675,7 @@ Max Concurrent: 8 (Wave 3) **Acceptance Criteria**: No Math.random, uses random.ts and i18n.ts **Commit**: NO -- [ ] 32. Refactor YesNoGenerator.astro +- [x] 32. Refactor YesNoGenerator.astro **What to do**: Same pattern as Task 6. **Recommended Agent Profile**: `unspecified-high` **Parallelization**: YES (with Tasks 13-19, 20-26, 27-31) diff --git a/src/components/generators/TeamsGenerator.astro b/src/components/generators/TeamsGenerator.astro index 0f98249..7199798 100644 --- a/src/components/generators/TeamsGenerator.astro +++ b/src/components/generators/TeamsGenerator.astro @@ -139,21 +139,22 @@ const errMorePlayers = isRu