fix(devcontainer): harden worktree startup with devrouter#5169
Draft
rschlaefli wants to merge 11 commits into
Draft
fix(devcontainer): harden worktree startup with devrouter#5169rschlaefli wants to merge 11 commits into
rschlaefli wants to merge 11 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What This Fixes
Linked worktrees could reuse a stale or ambiguous dev process, start against the wrong Git metadata, or stay registered while their routes were unhealthy. The previous fix made that lifecycle safe inside Klicker, but it also left generic process supervision and its regression suite duplicated in this repository.
This branch makes worktree startup reliable through one canonical command:
devrouter workspace ensure .Generic process ownership now comes from the released
@devrouter/cli0.0.30. Klicker keeps only its app-specific environment setup and Turbo task list.How It Works
.devrouter.ymlpins Devrouter 0.0.30 and defines the routed apps and PostgreSQL endpoint for each persisted workspace identity.WORKSPACEfromDEVROUTER_WORKSPACE, requires the linked worktree's Git common directory, mounts it at the same absolute path, and uses workspace-specific aliases and origins.@devrouter/cli@0.0.30package and extracts onlydevrouter-process. It does not install the full CLI or its dependency tree in the app image.post-start.shprepares Klicker's origins and delegates lifecycle ownership todevrouter-process ensure. The app command is the rootpnpm run dev:containerscript, where the Klicker-specific app and worker filters remain visible.devtask, and local initialization assigns each database to its application role.Branch Coverage
v368bd6a467Review Focus
Verification
Current head:
check:allpassed: TypeScript, lint, formatting, syncpack, agent-instruction validation, and Prisma sync.pnpm run buildpassed 21/21 production build tasks.pnpm installcompleted without changing the lockfile.git diff --checkpassed. The wiki validator is not available in this repository, so affected Markdown was formatted and checked directly./usr/local/bin/devrouter-processin that image.workspace ensurerecreated the devcontainer and started one filtered Turbo group. HTTP results were API 404, Auth 200, PWA 200, Manage 200, Control 200, OLAT health 200, Response API 200, LTI 401, and Chat 404; PostgreSQL was TCP-ready. The 404 and 401 responses are expected readiness results for those roots.486bce82e9cband owned process state770 770 893406388-101. The container resolved the exact final Git head and/workspaces/klicker-uzhworktree.agent-browsercompleted the delegated lecturer login through the worktree-specific Auth route, returned to the same worktree-specific Manage route, and rendered the seeded library athttps://manage.klicker.codex-worktree-lifecycle-hardeni.localhost/.Warnings and unrelated observations:
fonts.googleapis.com; the network-enabled rerun and the pre-push build both passed 21/21.TypeErrorremains unrelated and non-blocking for startup, routing, Git identity, and process reuse.68bd6a467, including all eight Playwright shards, GraphQL, TypeScript, build, format, lint, syncpack, CodeQL, GitGuardian, and Greptile.claude-reviewaction failed twice in its review runner after one turn withsubtype: success,is_error: true, zero cost, and no review comments. This is a review-service failure rather than a code finding.Security / Privacy
Blocking Before Merge
claude-reviewservice check; all substantive CI checks passThe PR remains a draft.
Follow-Up After Merge