Skip to content

docs(skill): note create/resume wire-builder duplication pitfall#138

Merged
krukow merged 1 commit into
mainfrom
krukow/skill-pitfall-6
Jun 15, 2026
Merged

docs(skill): note create/resume wire-builder duplication pitfall#138
krukow merged 1 commit into
mainfrom
krukow/skill-pitfall-6

Conversation

@krukow

@krukow krukow commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Adds Common Pitfall #6 to the update-upstream skill.

This pitfall surfaced while porting the :defer tool option (#137). session.create and session.resume build their wire params in two separate functions (build-create-session-params / build-resume-session-params) that share several sub-shapes — tool defs, system message, provider, MCP servers, custom agents, commands. A new field added to a shared shape in only one builder ships on create and silently vanishes on resume.

The existing pitfall #1 covers declaration sites (specs, :opt-un, public sets, docstrings); this is the distinct construction trap. The guidance: funnel each shared sub-shape through one named *->wire helper rather than duplicating a cond-> inline.

Skill-maintenance only — no SDK code changes.

Generated via Copilot on behalf of @krukow

Add Common Pitfall #6 to the update-upstream skill: session.create and
session.resume build wire params in separate functions that share several
sub-shapes (tool defs, system message, provider, MCP servers, custom
agents, commands). A new field on a shared shape must land in both
builders or be funneled through a named *->wire helper, otherwise it
ships on create and silently vanishes on resume.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 09:40

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.

Pull request overview

Adds a new “Common Pitfall” entry to the update-upstream skill documentation to prevent create/resume drift when constructing wire params for shared sub-shapes (e.g., tools, system message, provider, MCP servers).

Changes:

  • Document pitfall #6: session.create and session.resume build wire params in separate builders; shared sub-shapes should be funneled through named *->wire helpers to avoid silent omissions.
Show a summary per file
File Description
.github/skills/update-upstream/SKILL.md Adds Common Pitfall #6 describing the create/resume wire-param builder drift hazard and recommended refactoring pattern.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@krukow krukow merged commit 4ef925b into main Jun 15, 2026
2 checks passed
@krukow krukow deleted the krukow/skill-pitfall-6 branch June 15, 2026 09:42
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