Repository navigation
Open an evergreen docs PR after each SDK publish - #225
Conversation
hiroTamada
left a comment
There was a problem hiding this comment.
reviewed. the overall structure mirrors the MCP updater nicely, but there are two bugs in the version baseline and one bigger design question.
Bugs
.github/workflows/update-docs.yml:30,42— onworkflow_dispatch,SDK_SHAis main HEAD rather than thev$versiontag. With no docs marker, line 149 then picks the current release as the baseline and the run skips as stale (simulated on a post-merge main:SDK_VERSION=0.138.0 old_version=0.138.0), so the suggested first manual run does nothing. With a marker, the diff includes unreleased commits. Consider resolvingshafromrefs/tags/v$version..github/workflows/update-docs.yml:145,367,374— the marker is read from the update branch's own history, so each run diffs only since the last unmerged bot commit, andgh pr edit --body-filereplaces the body with that increment's report. Reviewers lose the description of earlier changes still in the PR. Consider reading the marker fromorigin/mainso each run's report covers the whole PR. The prompt already has the agent read the full diff againstorigin/main.
Suggestions
.github/workflows/update-docs.yml:159,162— the SDK diff skipssrc/lib/(browser-routing, browser-fetch, audit-log-download, config-registry-wait) andsrc/client.ts, which are hand-written and user-facing. The agent only sees the CHANGELOG line for those. Consider adding them to the pathspec..github/prompts/update-docs.md:45-46— the spec marks/credentials*,/org/credential_providers*, and/mpp/browsersasx-hidden, but the SDK still exposesclient.credentials.*. Consider telling the agent not to documentx-hidden/x-stainless-skipoperations.
Questions
.github/prompts/update-docs.md:25-30— most SDK releases need no guide changes, and the docs team already ships feature docs within about a day (e.g. #729, #730, #724, #602). The prompt's field-level triggers ("new response fields, new enum values") overlap with the generated API reference, and the agent can't see existing or in-flight human docs. Consider defaulting to no change, editing only guides that are now wrong, passing in recent docs commits and open PRs, and listing missing coverage in the report instead of writing pages. A dry run over v0.130.0 to v0.138.0 against what was actually merged would show the noise level..github/workflows/update-docs.yml:89-97— the Go SDK tags trail Node (currently v0.137.0 vs v0.138.0), so the default-branch fallback will be routine. Is it OK that Go examples get dropped for that release?.github/workflows/update-docs.yml:145-151— a no-op run records no marker, so once a marker exists, a run of no-docs releases keeps widening the audit window. Is that acceptable given the 55-minute timeout?.github/workflows/update-docs.yml:160,164,186— the spec is taken fromkernel/kernelmain at the release commit time, so it can be ahead of what the SDK codegen picked up. Since the prompt treats the spec as the source of truth, the agent could document behavior the released SDK doesn't have yet.
Nits
.github/scripts/docs-update-disallowed-paths.sh:8—.*only matches top-level hidden paths (foo/.hidden/x.mdxpasses), but the prompt says hidden directories are excluded. Consider adding*/.*..github/workflows/update-docs.yml:368— the Validation list leaves outgit diff --check.
|
Thanks for the review. All of it is addressed in a394d50, except the Go question below. Bugs
Suggestions
Questions
Nits
Dry run: 0.130.0 → 0.139.0 against current docs
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a394d50. Configure here.
| old_version=$SINCE_VERSION | ||
| if [[ -z "$old_version" && "${regenerated:-}" == true ]]; then | ||
| old_version=$covered | ||
| fi |
There was a problem hiding this comment.
Audit window skips uncovered SDK versions
Medium Severity
The audit baseline now defaults to the previous SDK tag and only uses the docs coverage marker after a conflict regeneration. A failed or skipped generate therefore never gets re-audited: the next publish diffs only the newest tag. Regeneration has the same hole when main has no marker yet, which is the first evergreen PR — the branch is reset and earlier unmerged audits are dropped instead of replayed.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit a394d50. Configure here.


Summary
Adds an
Update Docsworkflow that runs afterPublish NPMand keeps one evergreen PR open onkernel/docs(branchsdk-docs-update) with doc updates for the new SDK release. It follows the same structure asupdate-mcp-coverage.yml: a Pi agent edits the docs checkout, the workflow keeps only allowlisted paths, validates, and a separate job pushes the branch and opens or updates the PR.Differences from the MCP updater:
Docs: Update for Node SDK X.Y.Zcommit subjects in the docs history. The bot commit and the PR title use the same text, so the marker survives a squash merge. If no marker exists, it uses the previous stable SDK tag. Runs for a version that's already covered are skipped.v$SDK_VERSIONtag, or the default branch if that tag isn't published yet, so the agent can check Python and Go examples against real methods. The docs style guide requires TypeScript and Python examples.CHANGELOG.md,api.md,src/resources) and the OpenAPI spec diff for the same window.docs.jsonand.mdxfiles are published. Hidden directories,changelog.mdx, and the CLI and MCP server reference pages are excluded because they're maintained separately.jq empty docs.json,mint broken-links(samemint@4.2.930pin as the docs repo CI), andgit diff --check.Testing
actionlintwith shellcheck passes. The only finding is the info-level SC2016 for backticks in the PR bodyprintf, whichupdate-mcp-coverage.ymlalso gets.kernel/docsandkernel-node-sdkclones (without the botgit configlines):v0.135.0tov0.136.00.130.0marker: diff covers 0.131.0 through 0.136.00.136.0marker: skipped as staleworkflow_dispatchto get a first PR. It uses the sameADMIN_APP_*secrets, which already open PRs onkernel/docs.