Skip to content

docs: document PlaygroundEvaluator lifecycle after killWorker (#645)#706

Merged
tnaum-ms merged 4 commits into
microsoft:mainfrom
hanhan761:docs-645-evaluator-lifecycle
Jun 22, 2026
Merged

docs: document PlaygroundEvaluator lifecycle after killWorker (#645)#706
tnaum-ms merged 4 commits into
microsoft:mainfrom
hanhan761:docs-645-evaluator-lifecycle

Conversation

@hanhan761

Copy link
Copy Markdown
Contributor

Summary

Clarifies the lifecycle split between evaluator instances and worker threads. After killWorker(), the evaluator instance stays in the per-cluster map — the next Run respawns a fresh worker transparently. This design is intentional but wasn't documented, making it easy to misread.

Changes

File Change
src/documentdb/playground/PlaygroundEvaluator.ts Add lifecycle diagram to class JSDoc; explain killWorker() vs shutdown() vs dispose() semantics
src/commands/playground/executePlaygroundCode.ts Document the evaluators Map lifecycle

Verification

  • npm run build — TypeScript compilation passes
  • JSDoc-only change, no behavioral impact

Issue

Fixes #645

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 29, 2026 13:51
@hanhan761 hanhan761 requested a review from a team as a code owner May 29, 2026 13:51
@hanhan761 hanhan761 force-pushed the docs-645-evaluator-lifecycle branch from 59c7601 to ea417ae Compare May 29, 2026 13:53
@tnaum-ms tnaum-ms added the in-triage-queue We've seen your input and will triage it label Jun 4, 2026
@tnaum-ms

Copy link
Copy Markdown
Collaborator

Thank you again for this contribution. We are genuinely amazed by both the quality and the volume of improvements you have submitted. We also apologize for the delayed review while the 0.9.0 release was in flight. This documentation update is clear and very helpful for maintainability.

@tnaum-ms tnaum-ms removed the in-triage-queue We've seen your input and will triage it label Jun 19, 2026
@tnaum-ms tnaum-ms added this to the 0.9.1 milestone Jun 19, 2026
hanhan761 and others added 2 commits June 19, 2026 09:59
Add a lifecycle section to the PlaygroundEvaluator class header explaining
that the evaluator instance and worker thread have independent lifecycles.
After killWorker(), the evaluator stays registered in the pool and the next
evaluate() call transparently respawns the worker.

Also add a comment at the cancellation site in executePlaygroundCode.ts
clarifying that killWorker() terminates the worker but keeps the evaluator.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tnaum-ms tnaum-ms force-pushed the docs-645-evaluator-lifecycle branch from ea417ae to 6f46ffd Compare June 19, 2026 10:05
tnaum-ms
tnaum-ms previously approved these changes Jun 19, 2026

@tnaum-ms tnaum-ms left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks again for the excellent contribution. Approved after rebase, doc accuracy tweak, and full validation pass.

@tnaum-ms tnaum-ms disabled auto-merge June 22, 2026 20:57
@tnaum-ms tnaum-ms merged commit e5de4b0 into microsoft:main Jun 22, 2026
5 checks passed
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.

Revisit: PlaygroundEvaluator lifecycle after killWorker (instance kept, worker gone)

3 participants