Skip to content

Preserve toolkit docs on merge failures#1080

Draft
jottakka wants to merge 3 commits into
mainfrom
fix/preserve-toolkit-docs-on-merge-failure
Draft

Preserve toolkit docs on merge failures#1080
jottakka wants to merge 3 commits into
mainfrom
fix/preserve-toolkit-docs-on-merge-failure

Conversation

@jottakka

@jottakka jottakka commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • retain the last-known-good toolkit when a merge fails
  • surface failed toolkits and exit non-zero rather than silently publishing incomplete output
  • make strict generation abort on incomplete toolkit data

Test plan

  • pnpm exec tsc --noEmit --project toolkit-docs-generator/tsconfig.json
  • pnpm exec vitest run --root toolkit-docs-generator

Note

Medium Risk
Changes docs generation failure semantics and CI exit behavior; incorrect fallback could mask stale docs, but strict mode still aborts on incomplete merges.

Overview
When a toolkit merge fails, the generator now keeps last-known-good JSON in batch output and index.json instead of dropping that toolkit or writing an empty placeholder. MergeResult gains an optional error field; failed merges return the previous toolkit when one exists, and incremental onToolkitComplete still runs for that fallback.

The CLI prints a Failed toolkits section, tracks failures via mergeFailures (not warning-string heuristics), and sets exit code 1 on merge failures or write errors so CI does not treat a partial run as success. With --require-complete, mergeToolkitEntry throws instead of returning a soft error result.

Error results with no prior output no longer copy custom sections from a missing previous toolkit (empty arrays only).

Reviewed by Cursor Bugbot for commit 8011b5d. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 17, 2026 4:15am

Request Review

Comment thread toolkit-docs-generator/src/cli/index.ts Outdated
Comment thread toolkit-docs-generator/src/cli/index.ts
@jottakka

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor

cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown

Current version of PR was reviewed by /review-bugbot on Jul 17, 00:59 GMT-3. It flagged 0 findings.

Bugbot on commit 59bdd77 is skipped.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jottakka

Copy link
Copy Markdown
Contributor Author

bugbot run

Comment thread toolkit-docs-generator/src/merger/data-merger.ts
Co-authored-by: Cursor <cursoragent@cursor.com>
@jottakka

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8011b5d. Configure here.

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.

1 participant