docs(skills): do not emit a self-redirect for error codes without underscores - #490
Conversation
…erscores Found by dry-running the repaired sync-error-docs skill before scheduling it. Step 6 adds two redirect entries per error code to bridge the underscored code to the hyphenated page slug. For a code with no underscore the two forms are the same string, so the trailing-slash entry comes out with source equal to destination - an infinite self-redirect on a live docs route. conflict is the only such code today. This also explains an apparent coverage gap: conflict has no redirect entries in vercel.json while the other 17 codes each have two. That is correct, not an oversight, and the skill now says so, so the absence is not 'fixed' later. Step 9 now reports any codes skipped for this reason so the decision is visible to a reviewer rather than silently absent. Co-Authored-By: Warp Agent <agent@warp.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR updates the sync-error-docs skill and redirect-pattern reference so agents skip underscore-to-hyphen redirects for error codes whose canonical code and slug are identical, avoiding self-redirects such as conflict/ → conflict/.
Concerns
- No blocking correctness, security, or spec-alignment concerns found. One minor follow-up worth considering outside this review: the unchanged surrounding prose in the redirect reference still frames separator redirects as "two entries per code," so aligning that heading/intro with the new exception would make the guidance harder to misread.
Verdict
Found: 0 critical, 0 important, 1 suggestions
Approve with nits
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
… exception Review suggestion on #490. The previous commit added the skip rule to the Rules bullet list, but the surrounding prose still stated the unconditional version, so a reader who skimmed the heading, the intro, and the JSON example would add two entries for a single-word code without ever reaching the exception. Three places carried the stale framing: - the section 2 heading said "two entries per code" - its intro said these are "the only redirects a new error code needs" - section 1 said the separator redirects always resolve the forwarded path The heading is now "zero or two entries per code", the intro leads with the underscore check before showing any JSON, section 1 notes that a single-word code needs nothing further, and the Background gap list says the separator gap does not exist for such a code. Also retitled step 6 in the skill to "only when the forms differ" for the same reason. No behavior change. This makes the rule hard to misread rather than merely present. Co-Authored-By: Warp Agent <agent@warp.dev>
Summary
Follow-up to #487, found by dry-running the repaired
sync-error-docsskill before scheduling it.Step 6 tells the agent to add two redirect entries per error code, bridging the underscored code to the hyphenated page slug. That is correct for every multi-word code — but wrong for a code with no underscore, where the two forms are the same string.
conflictis the only such code today. Abbreviating the shared prefix/reference/api-and-sdk/troubleshooting/errors/as…:Entry 2 is a self-redirect: an infinite loop on a live docs route.
This also explains something the dry run initially flagged as a coverage gap.
conflicthas no redirect entries invercel.jsonwhile the other 17 codes each have two. That absence is correct, not an oversight — there is nothing to bridge.Changes
sync-error-docs/SKILL.mdstep 6 — skip redirects entirely when{underscore_code}and{hyphen-code}are identical, with the reasoning inline so it doesn't get "fixed" back.sync-error-docs/SKILL.mdstep 9 — report any codes skipped for this reason, so a reviewer can see the decision was deliberate.references/redirect-patterns.md— same rule, stated before the "add both variants" rule it qualifies.Dry run result
Run against merged
main(ee77efd7) withwarp-serverat6ca991369. Verified thatsrc/sidebar.ts,vercel.json, and the errors directory were byte-identical tomainbefore running.Every assumption the repaired skill makes held against reality: the
../warp-serversibling path, the errors directory location, the bare-slug sidebar format, and the redirect shape. Those were the parts most likely to be wrong, since the pre-#487 version of this skill referenced files that did not exist.Unverified claims
None — the error codes, page list, sidebar entries, and redirect entries were each read directly from the repos rather than inferred.
Co-Authored-By: Warp Agent agent@warp.dev