Repository navigation
fix(api): Windows isMain check + file 4 bugs from Chrome walkthrough - #81
Merged
Merged
Conversation
…alkthrough
The first real /option 1/ Chrome walkthrough of the app exposed 5 issues that
CI never caught — they were all in code paths that only fire when the dev
stack is actually running end-to-end:
1. **STORY-064 (this commit, P0)**: `apps/api/src/index.ts` isMain check was
string-comparing `import.meta.url` against a hand-built `file://${path}`
URL. On Windows this never matches (three slashes vs two), so the server
silently failed to start. Fixed by using `pathToFileURL().href`.
2. **STORY-065 (filed, P1)**: Piston sandbox requires writable cgroup v2;
Docker Desktop on Windows doesn't expose it. Container restart-loops with
`mkdir: cannot create directory 'isolate/': Read-only file system`. Every
Run/Submit hangs for Windows self-hosters.
3. **STORY-066 (filed, P0)**: `/dashboard` ↔ `/recommended` infinite 307 loop
for any `target_role` value not recognized by the role library — which is
every free-text answer from the deterministic onboarding fallback. New
self-hosters (no ANTHROPIC_API_KEY) hit this on first sign-in.
4. **STORY-067 (filed, P1)**: `getRecommendation` only matches against slug,
not label. Onboarding's fallback writes label-form. Compounds STORY-066.
5. **STORY-068 (filed, P0)**: No `db:seed:tracks` / `db:seed:problems` CLI
exists. Fresh self-host gets demo data only, no real tracks or problems.
`/api/recommendation` returns empty arrays; tutor cannot assign anything.
Only #1 is fixed in this commit. The other four are filed for follow-up;
STORY-066 + STORY-068 + STORY-065 are P0/P1 release blockers for the
self-host story.
khoks
force-pushed
the
chore/windows-fix-and-bug-stories
branch
from
May 12, 2026 06:54
4453933 to
c14610c
Compare
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First real Chrome walkthrough of the dev stack exposed 5 issues that unit tests + typecheck + format-check missed because the entrypoints only fire under a running server. One is fixed inline; four are filed.
isMainstring-comparesimport.meta.urlagainst a hand-builtfile://${path}URL with the wrong number of slashes. Fixed viapathToFileURL./dashboard↔/recommendedinfinite redirect for any free-texttarget_role. Hits every self-hoster using the deterministic onboarding fallback (no API key).getRecommendationmatches slug only — label-form input fails. Compounds STORY-066.Walkthrough log
/landing/playground/auth/signin/onboarding./onboarding(deterministic fallback)/dashboard/recommendedTest plan
pnpm format:checkclean.apps/apidev server now starts on Windows (manually verified —GET /healthreturns 200).🤖 Generated with Claude Code