Skip to content

Commit 0a7cd1f

Browse files
Merge pull request #142 from EmiyaKiritsugu3/fix/vercel-build-errors
fix: resolve Vercel build errors - middleware config + ESLint warnings
2 parents d85d92f + 08aabad commit 0a7cd1f

24 files changed

Lines changed: 2671 additions & 2669 deletions

.sisyphus/plans/fix-e2e-ci-env-var.md renamed to .sisyphus/plans/archive/fix-e2e-ci-env-var.md

Lines changed: 70 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929

3030
**Error from CI logs**:
3131

32-
```
32+
````yaml
3333
Error: globalSetup: missing required env vars: SUPABASE_SERVICE_ROLE_KEY
3434
at ../global-setup.ts:19
35-
```
35+
```bash
3636
3737
### Root Cause
3838
@@ -88,7 +88,7 @@ e2e:
8888
PLAYWRIGHT_BASE_URL: http://localhost:3333
8989
run: npm run e2e
9090
- name: Upload Playwright report
91-
```
91+
```bash
9292

9393
### Metis Review
9494

@@ -164,7 +164,7 @@ Evidence saved to `.sisyphus/evidence/fix-e2e-ci-env/task-1-*.txt`:
164164

165165
### Parallel Execution Waves
166166

167-
```
167+
```bash
168168
Wave 1 (single task, sequential):
169169
├── Task 1: Edit .github/workflows/ci.yml — add 1 env var to Run E2E tests step
170170
└── Task 2: Commit + push + verify CI
@@ -174,7 +174,7 @@ Wave FINAL (4 parallel reviews — same as PR #134 final wave):
174174
├── F2: Diff Audit
175175
├── F3: CI Verification
176176
└── F4: Scope Fidelity Check
177-
```
177+
```bash
178178

179179
### Dependency Matrix
180180

@@ -244,67 +244,66 @@ Wave FINAL (4 parallel reviews — same as PR #134 final wave):
244244

245245
**QA Scenarios (MANDATORY)**:
246246

247-
```
248-
Scenario: ci.yml env block contains the new var
249-
Tool: Bash
250-
Preconditions: edit applied
251-
Steps:
252-
1. grep -B 1 -A 6 "Run E2E tests" .github/workflows/ci.yml
253-
→ Expected: shows step name + env block with new SUPABASE_SERVICE_ROLE_KEY line
254-
2. python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))"
255-
→ Expected: exit 0, no YAML errors
256-
Evidence: .sisyphus/evidence/fix-e2e-ci-env/task-1-ci-yml-edit.txt
257-
```
247+
````
258248

259-
**Commit**: NO (groups with task 2)
249+
Scenario: ci.yml env block contains the new var
250+
Tool: Bash
251+
Preconditions: edit applied
252+
Steps: 1. grep -B 1 -A 6 "Run E2E tests" .github/workflows/ci.yml
253+
→ Expected: shows step name + env block with new SUPABASE_SERVICE_ROLE_KEY line 2. python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci.yml'))"
254+
→ Expected: exit 0, no YAML errors
255+
Evidence: .sisyphus/evidence/fix-e2e-ci-env/task-1-ci-yml-edit.txt
260256

261-
- [x] 2. Commit + push + verify CI
257+
```
262258
263-
**What to do**:
264-
1. Stage ONLY `.github/workflows/ci.yml`
265-
2. Commit with conventional-commits subject
266-
3. Push to origin (no force)
267-
4. Wait for CI to re-run (~3 min)
268-
5. Verify E2E Tests check passes
259+
**Commit**: NO (groups with task 2)
269260
270-
**Must NOT do**:
271-
- Do NOT use `git add .` or `git add -A`
272-
- Do NOT use `--force` or `--amend`
273-
- Do NOT use `--no-verify`
274-
- Do NOT stage any other file
275-
276-
**Recommended Agent Profile**:
277-
- **Category**: `quick`
278-
- Reason: standard git commit + push + CI poll
279-
- **Skills**: `[]`
261+
- [x] 2. Commit + push + verify CI
280262
281-
**Parallelization**:
282-
- **Can Run In Parallel**: NO
283-
- **Parallel Group**: Wave 1
284-
- **Blocks**: Final Verification Wave
285-
- **Blocked By**: Task 1
263+
**What to do**:
264+
1. Stage ONLY `.github/workflows/ci.yml`
265+
2. Commit with conventional-commits subject
266+
3. Push to origin (no force)
267+
4. Wait for CI to re-run (~3 min)
268+
5. Verify E2E Tests check passes
269+
270+
**Must NOT do**:
271+
- Do NOT use `git add .` or `git add -A`
272+
- Do NOT use `--force` or `--amend`
273+
- Do NOT use `--no-verify`
274+
- Do NOT stage any other file
275+
276+
**Recommended Agent Profile**:
277+
- **Category**: `quick`
278+
- Reason: standard git commit + push + CI poll
279+
- **Skills**: `[]`
280+
281+
**Parallelization**:
282+
- **Can Run In Parallel**: NO
283+
- **Parallel Group**: Wave 1
284+
- **Blocks**: Final Verification Wave
285+
- **Blocked By**: Task 1
286+
287+
**References**:
288+
- `.github/workflows/ci.yml` — workflow file (just edited in Task 1)
289+
- Current branch: `fix/payment-status-e2e-auto-seed` (from previous PR #134 work)
290+
291+
**Acceptance Criteria**:
292+
- [ ] Single new commit on branch with subject `fix(ci): forward SUPABASE_SERVICE_ROLE_KEY to e2e job`
293+
- [ ] Branch pushed without force
294+
- [ ] `gh pr checks 134` shows `E2E Tests: pass` within ~5 min
295+
- [ ] `gh pr view 134 --json mergeStateStatus -q .mergeStateStatus` returns `CLEAN`
286296
287-
**References**:
288-
- `.github/workflows/ci.yml` — workflow file (just edited in Task 1)
289-
- Current branch: `fix/payment-status-e2e-auto-seed` (from previous PR #134 work)
297+
**QA Scenarios (MANDATORY)**:
290298
291-
**Acceptance Criteria**:
292-
- [ ] Single new commit on branch with subject `fix(ci): forward SUPABASE_SERVICE_ROLE_KEY to e2e job`
293-
- [ ] Branch pushed without force
294-
- [ ] `gh pr checks 134` shows `E2E Tests: pass` within ~5 min
295-
- [ ] `gh pr view 134 --json mergeStateStatus -q .mergeStateStatus` returns `CLEAN`
299+
```
296300

297-
**QA Scenarios (MANDATORY)**:
301+
Scenario: Commit + push succeeds
302+
Tool: Bash
303+
Preconditions: Task 1 complete
304+
Steps: 1. git add .github/workflows/ci.yml 2. git status -s → Expect: M .github/workflows/ci.yml (only) 3. git commit -m "fix(ci): forward SUPABASE_SERVICE_ROLE_KEY to e2e job" -m "PR #134 moved seeding from a separate CI step into Playwright's globalSetup, but the Run E2E tests step's env block did not include SUPABASE_SERVICE_ROLE_KEY (it was previously set by the now-redundant Seed E2E test users step, in a separate shell with no env persistence).
298305

299-
```
300-
Scenario: Commit + push succeeds
301-
Tool: Bash
302-
Preconditions: Task 1 complete
303-
Steps:
304-
1. git add .github/workflows/ci.yml
305-
2. git status -s → Expect: M .github/workflows/ci.yml (only)
306-
3. git commit -m "fix(ci): forward SUPABASE_SERVICE_ROLE_KEY to e2e job" -m "PR #134 moved seeding from a separate CI step into Playwright's globalSetup, but the Run E2E tests step's env block did not include SUPABASE_SERVICE_ROLE_KEY (it was previously set by the now-redundant Seed E2E test users step, in a separate shell with no env persistence).
307-
```
306+
```
308307
309308
Adds 1 line forwarding SUPABASE_SERVICE_ROLE_KEY from \$GITHUB_ENV to the Run E2E tests step's env block, so globalSetup's required-env check passes." 4. git push origin fix/payment-status-e2e-auto-seed
310309
→ Expect: success, no force needed 5. git log origin/main..HEAD --oneline
@@ -320,7 +319,7 @@ Steps: 1. sleep 60 # give CI time to start 2. gh pr checks 134
320319
→ Expect: CLEAN (or BLOCKED if any other check still pending)
321320
Evidence: .sisyphus/evidence/fix-e2e-ci-env/task-2-ci-result.txt
322321
323-
````
322+
```
324323

325324
**Commit**: YES (this IS the commit task)
326325

@@ -331,20 +330,20 @@ Evidence: .sisyphus/evidence/fix-e2e-ci-env/task-2-ci-result.txt
331330
> 4 review agents run in PARALLEL. ALL must APPROVE. Present consolidated results to user and get explicit "okay" before completing.
332331
333332
- [ ] F1. **Plan Compliance Audit**`oracle`
334-
Read the plan end-to-end. Verify each "Must Have" present in the diff. Verify each "Must NOT Have" absent. Check evidence files exist. Compare deliverables against plan.
335-
Output: `Must Have [N/N] | Must NOT Have [N/N] | Tasks [N/N] | VERDICT: APPROVE/REJECT`
333+
Read the plan end-to-end. Verify each "Must Have" present in the diff. Verify each "Must NOT Have" absent. Check evidence files exist. Compare deliverables against plan.
334+
Output: `Must Have [N/N] | Must NOT Have [N/N] | Tasks [N/N] | VERDICT: APPROVE/REJECT`
336335

337336
- [ ] F2. **Diff Audit**`unspecified-high`
338-
Verify only `.github/workflows/ci.yml` changed. Verify exactly 1 line added (or 1-7 lines if cleanup). Verify YAML valid. Verify the new env var line syntax matches existing lines in the same block.
339-
Output: `Files [1 changed: ci.yml] | Lines [+1 -0] | YAML valid [yes/no] | VERDICT`
337+
Verify only `.github/workflows/ci.yml` changed. Verify exactly 1 line added (or 1-7 lines if cleanup). Verify YAML valid. Verify the new env var line syntax matches existing lines in the same block.
338+
Output: `Files [1 changed: ci.yml] | Lines [+1 -0] | YAML valid [yes/no] | VERDICT`
340339

341340
- [ ] F3. **CI Verification**`unspecified-high`
342-
Query `gh pr checks 134` and `gh pr view 134 --json statusCheckRollup,mergeStateStatus`. Verify E2E Tests check is `SUCCESS` and `mergeStateStatus` is `CLEAN`.
343-
Output: `E2E Tests [pass/fail] | mergeStateStatus [CLEAN/BLOCKED/CONFLICTING] | All checks pass [yes/no] | VERDICT`
341+
Query `gh pr checks 134` and `gh pr view 134 --json statusCheckRollup,mergeStateStatus`. Verify E2E Tests check is `SUCCESS` and `mergeStateStatus` is `CLEAN`.
342+
Output: `E2E Tests [pass/fail] | mergeStateStatus [CLEAN/BLOCKED/CONFLICTING] | All checks pass [yes/no] | VERDICT`
344343

345344
- [ ] F4. **Scope Fidelity Check**`deep`
346-
For the new commit, read "What to do" vs actual diff. Verify 1:1. Detect any creep. Flag unaccounted changes.
347-
Output: `Tasks [N/N compliant] | Contamination [CLEAN/N issues] | Unaccounted [CLEAN/N files] | VERDICT`
345+
For the new commit, read "What to do" vs actual diff. Verify 1:1. Detect any creep. Flag unaccounted changes.
346+
Output: `Tasks [N/N compliant] | Contamination [CLEAN/N issues] | Unaccounted [CLEAN/N files] | VERDICT`
348347

349348
---
350349

@@ -360,10 +359,11 @@ Output: `Tasks [N/N compliant] | Contamination [CLEAN/N issues] | Unaccounted [C
360359
## Success Criteria
361360

362361
### Verification Commands
362+
363363
```bash
364364
gh pr view 134 --json mergeStateStatus,mergeable # Expect: CLEAN, MERGEABLE
365365
gh pr checks 134 # Expect: all 6+ pass
366-
````
366+
```
367367

368368
### Final Checklist
369369

@@ -381,13 +381,13 @@ gh pr checks 134 # Expect: all 6+ pass
381381

382382
The CI workflow has this step AFTER PR #134:
383383

384-
```yaml
384+
````yaml
385385
- name: Seed E2E test users
386386
env:
387387
...
388388
SUPABASE_SERVICE_ROLE_KEY: ${{ env.SUPABASE_LOCAL_SERVICE_ROLE_KEY }}
389389
run: npx tsx prisma/seed-e2e.ts
390-
```
390+
```bash
391391
392392
This step is now REDUNDANT because `globalSetup` runs the same seed. Removing it:
393393

@@ -397,3 +397,4 @@ This step is now REDUNDANT because `globalSetup` runs the same seed. Removing it
397397
The seed is idempotent (uses `upsert`), so running it twice (once in the separate step, once in globalSetup) is harmless. The plan does NOT require removing it. If the user wants this cleanup, it's a separate small follow-up plan.
398398

399399
The MINIMAL fix to make CI green is just adding the env var. The plan focuses on that.
400+
````

0 commit comments

Comments
 (0)