Skip to content

Add correlated worktree launch diagnostics - #228

Open
0101 wants to merge 5 commits into
mainfrom
worktree-launch-logging
Open

0101 wants to merge 5 commits into
mainfrom
worktree-launch-logging

Conversation

@0101

@0101 0101 commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Trace worktree creation, post-fork setup, prompted startup, and exact-terminal cleanup with correlated [Launch] JSON records. Preserve the complete original creation prompt and selected skill in local logs, and distinguish registration, delivery, and acceptance failures without logging HTTP response bodies.

Report log append failures to stderr and return a nonfatal warning when the initial creation record cannot be saved.

Verified: 204 targeted tests passed; npm run build passed.

0101 and others added 3 commits October 8, 2026 13:46
Preserve original creation prompts, trace startup and exact cleanup, and report nonfatal log persistence failures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38352577-bf50-437c-af68-64aea5e8563b
Normalize cleanup outcomes once and merge duplicate rejection setup while preserving diagnostic and exact-terminal assertions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38352577-bf50-437c-af68-64aea5e8563b
Copilot AI balanced review requested due to automatic review settings October 12, 2026 10:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The timeout-versus-delivery race can omit or misclassify late acceptance diagnostics.

1 open finding
What changed in this PR

Adds correlated diagnostics across worktree creation, prompted terminal startup, delivery, and cleanup.

Changes:

  • Introduces structured [Launch] event logging and failure reporting.
  • Preserves original creation prompts and skill selections.
  • Expands tests and specifications for launch diagnostics.
File Description
src/​Tests/​WorktreeApiLaunchTests.fs Tests creation tracing and logging failures.
src/​Tests/​Tests.fsproj Includes the new test fixture.
src/​Tests/​StartupPromptTests.fs Tests delivery, timeout, and cleanup diagnostics.
src/​Tests/​SessionBridgeTests.fs Updates delivery failure tests.
src/​Tests/​ServerFixtureTests.fs Tests unavailable logging sinks.
src/​Tests/​LaunchLogFixture.fs Adds launch-log test helpers.
src/​Tests/​CreateWorktreeTests.fs Verifies prompt preservation.
src/​Server/​WorktreeApi.fs Correlates creation and launch events.
src/​Server/​TerminalLaunch.fs Carries diagnostics through prompted launches.
src/​Server/​SessionBridge.fs Records bridge delivery and acceptance events.
src/​Server/​Server.fsproj Includes the diagnostics module.
src/​Server/​PromptedLaunchDiagnostics.fs Implements structured launch tracing.
src/​Server/​Program.fs Adapts scheduler launch wiring.
src/​Server/​Log.fs Reports append failures through stderr.
src/​Client/​CreateWorktreeModal.fs Preserves original prompt formatting.
docs/​spec/​worktree-monitor.md Documents creation diagnostics.
docs/​spec/​embedded-terminal.md Documents prompted-launch tracing.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Server/SessionBridge.fs Outdated
0101 and others added 2 commits October 12, 2026 16:39
Use one atomic completion result for delivery and deadline outcomes, with deterministic coverage for both winner orderings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38352577-bf50-437c-af68-64aea5e8563b
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38352577-bf50-437c-af68-64aea5e8563b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants