Skip to content

fix(wiki): guide shortcut source recovery - #2350

Draft
ViperCai wants to merge 2 commits into
mainfrom
codex/wiki-node-create-shortcut-recovery
Draft

fix(wiki): guide shortcut source recovery#2350
ViperCai wants to merge 2 commits into
mainfrom
codex/wiki-node-create-shortcut-recovery

Conversation

@ViperCai

@ViperCai ViperCai commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • diagnose wiki +node-create failures only when a shortcut create returns API code 131002
  • confirm the supplied source is another Wiki shortcut, then return a terminal recovery hint with the real origin_node_token and obj_type
  • preserve the original typed API error and never rewrite or replay the create request
  • document the shortcut-to-shortcut recovery workflow

Root cause

Wiki does not support creating a shortcut whose source is another shortcut. The upstream API reports the generic invalid-parameter code 131002, so agents could retry the same deterministic failure without knowing how to resolve the underlying origin node.

Behavior

The extra get_node diagnostic runs only after a shortcut create fails with 131002. If the source cannot be inspected or is not another shortcut, the CLI returns the original error unchanged.

Validation

  • go test ./shortcuts/wiki -run 'TestRunWikiNodeCreate' -count=1
  • make fmt-check
  • real bot and user requests were exercised manually: shortcut-to-shortcut returned 131002, stopped retrying, and returned the real origin token/type
  • temporary validation resources were cleaned up

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact labels Aug 14, 2026
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ef3940b7-41cc-4ec8-aa2b-0f7b686eeed0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.36%. Comparing base (0a20372) to head (ba67ab3).

Files with missing lines Patch % Lines
shortcuts/wiki/wiki_node_create.go 89.28% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2350   +/-   ##
=======================================
  Coverage   76.35%   76.36%           
=======================================
  Files        1043     1043           
  Lines      114771   114791   +20     
=======================================
+ Hits        87638    87656   +18     
- Misses      20385    20387    +2     
  Partials     6748     6748           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant