This repository was archived by the owner on Aug 17, 2026. It is now read-only.
fix(dx): test:e2e filter + stale portless takeover + uuid-v7 doc sync - #56
Merged
Conversation
The previous script `vitest run e2e-spec stories --passWithNoTests`
baked positional filename patterns into the command. When a user
passed `bun run test:e2e tests/stories/foo.story.test.ts`, vitest
unioned the bake-in patterns with the user-supplied path, running the
whole suite instead of just the requested file. QUICKSTART.md's "TDD
cycle template" promised the filter worked.
Drop the patterns; vitest's configured include glob in
vitest.config.ts already picks up `tests/**/*.{spec,test,e2e-spec,story.test}.ts`.
A user-supplied path now narrows the run as documented. Doc updates
clarify the new behaviour in QUICKSTART.md and writing-story-tests.
Story test pins the script content so a future regression to the
old form fails fast.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When a previous `bun --watch` is hard-killed (SIGKILL, OOM, terminal closed), its entry in `~/.portless/routes.json` outlives the process and the next `bun run dev` aborts with `RouteConflictError` even though the holder is gone. Add a defence-in-depth pass before `portless run`: read the routes file, probe the existing PID with `process.kill(pid, 0)`, and let the new pure-planner `decideRegistrationAction` choose between `take-over`, `block-with-error`, and `no-existing`. Only `take-over` sets `--force`, and only when the existing PID is dead AND not the current process (same-PID self-conflict would otherwise SIGTERM us). The planner is fully covered (5 stories + 2 unit tests of the emit-`--force` path); the I/O glue (route file lookup, PID liveness) is exercised via PORTLESS_STATE_DIR override; the runner-level contract is pinned by a structural story over scripts/dev.ts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
prisma/CLAUDE.md claimed "ID columns use the project's UUID v7
generator" with `@default(dbgenerated("uuid_generate_v7()"))`, but
every model in `prisma/schema.prisma` (including all Better-Auth
managed tables and the Example reference model) uses
`@default(uuid())` — only `prisma/features/geo.prisma` uses v7.
Rewrite the section to reflect reality: existing models stay on v4
for backwards compatibility; new feature-gated schemas SHOULD use v7
for B-tree friendliness; new always-loaded models prefer v7 once the
extension is verified. Add a TBD migration note for flipping an
existing model so future readers know the path is unfinished, not
forbidden.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pascal-klesse
force-pushed
the
fix/fix-llm-dx-cluster
branch
from
May 2, 2026 21:07
63014fb to
44c0e5c
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes three small DX findings from the LLM-test in one PR.
Summary
1.
test:e2eaccepts a path filter (medium · DX)vitest run e2e-spec stories --passWithNoTestsbaked positionalfilename patterns into the script, so
bun run test:e2e tests/stories/foo.story.test.tsunioned the bake-in patterns with the user path and ran the whole
suite (~70s) instead of the requested file (~20s). QUICKSTART.md's
"TDD cycle template" promised the filter worked.
Drop the patterns; vitest's configured include glob already picks up
tests/**/*.{spec,test,e2e-spec,story.test}.ts. A user-supplied pathnow narrows the run as documented. Story test pins the script
content.
2. Stale portless registration takeover (medium · DX)
Hard-killing
bun --watch(SIGKILL, OOM, terminal closed) leaves astale entry in
~/.portless/routes.json. The nextbun run devthenaborts with
RouteConflictErroreven though the holder is gone.Add a defence-in-depth pass before
portless run: read the routesfile, probe the existing PID with
process.kill(pid, 0), and let thenew pure planner
decideRegistrationActiondecide betweentake-over,block-with-error, andno-existing. Onlytake-overemits
--force, and only when the existing PID is dead AND not thecurrent process — same-PID self-conflict would otherwise SIGTERM us.
Pure planner in
src/core/dev/portless.ts, thin I/O runner insrc/core/dev/portless-routes-runner.ts. 5 planner stories + 13 unittests of the I/O glue + 1 structural story over
scripts/dev.ts.3. UUID-default doc sync (low · doc-gap)
prisma/CLAUDE.mdclaimed every model usesuuid_generate_v7()butthe entire core schema and Better-Auth tables use
@default(uuid())(v4); only
prisma/features/geo.prismauses v7. Rewrite the sectionto reflect reality, recommend v7 for new feature-gated schemas, leave
existing models on v4 for backwards compatibility, and note a TBD
migration path.
Test plan
bun run lintbun run formatbun run test:typesbun run test:unitbun run test:e2e(2598 tests pass)bun run test:coverage(Lines 92.97%, threshold 70%)bun run buildbun run test:e2e tests/stories/test-e2e-script.story.test.tsruns only the requested file🤖 Generated with Claude Code