Skip to content

docs(mutator-framework): Add JSDoc for graph lifecycle and callbacks [skip chg] - #12216

Closed
Timothee Guerin (timotheeguerin) wants to merge 3 commits into
microsoft:mainfrom
timotheeguerin:docs/jsdoc-mutator-graph
Closed

Timothee Guerin (timotheeguerin) wants to merge 3 commits into
microsoft:mainfrom
timotheeguerin:docs/jsdoc-mutator-graph

Conversation

@timotheeguerin

@timotheeguerin Timothee Guerin (timotheeguerin) commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Graph transformations depend on when types are cloned and who reconnects references after replacement. Document node identity and state, callback timing, edge direction, and replacement ownership so consumers can build custom connections without assuming mutation callbacks replay or edges retarget themselves. Distinguish fresh factory nodes from engine-cached nodes. No runtime or API changes.

Tracked in #12228.

@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/mutator-framework@12216

commit: d715c06

@github-actions

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • ✅ @typespec/mutator-framework
Show changes

@typespec/mutator-framework - internal ✏️

Document mutation node identity, lifecycle propagation, and edge callback ownership.

@timotheeguerin Timothee Guerin (timotheeguerin) changed the title docs(mutator-framework): explain graph lifecycle and callbacks docs(mutator-framework): Add JSDoc for graph nodes and edges [skip chg] Oct 15, 2026
@timotheeguerin Timothee Guerin (timotheeguerin) changed the title docs(mutator-framework): Add JSDoc for graph nodes and edges [skip chg] docs(mutator-framework): Add JSDoc for graph lifecycle and callbacks [skip chg] Oct 15, 2026
@azure-sdk-automation

azure-sdk-automation Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The documentation-only changes have no unresolved findings and leave runtime behavior and API signatures unchanged.

0 open findings

What changed in this PR

Documents the mutator framework’s graph lifecycle and callback contracts as part of the public API JSDoc improvements tracked in #12228. No runtime behavior or API signatures change.

Changes:

  • Clarifies node identity, lifecycle state, and callback timing.
  • Explains edge direction, replacement ownership, and uncached factory construction.
  • Adds an internal changelog entry.
File Description
packages/​mutator-framework/​src/​mutation-node/​mutation-node.ts Documents node identity, state, and lifecycle methods.
packages/​mutator-framework/​src/​mutation-node/​mutation-edge.ts Documents edge callbacks and reconnection responsibilities.
packages/​mutator-framework/​src/​mutation-node/​factory.ts Clarifies fresh-node construction and type mapping.
.chronus/​changes/​docs-jsdoc-mutator-graph-2026-9-15-11-59-53.md Records the documentation update.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@timotheeguerin

Copy link
Copy Markdown
Member Author

Consolidated into #12211 to keep one PR per package and at most five compiler PRs. The reviewed changes and corrections are preserved there.

Tracked in #12228.

Timothee Guerin (timotheeguerin) added a commit that referenced this pull request Oct 16, 2026
Mutation authors need to distinguish registered graph state, replacement
results, traversal callbacks, and concrete mutation helpers without
inferring their lifecycle from implementation.

Document the public mutation framework together, from engine and graph
contracts through model/operation, scalar/enum/union, value, and tuple
mutations. Clarify ownership and replacement semantics without changing
mutation behavior.

Consolidates [12216](#12216),
[12219](#12219),
[12222](#12222).

Tracked in #12228.
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