Skip to content

docs(skills): do not emit a self-redirect for error codes without underscores - #490

Merged
rachaelrenk merged 2 commits into
mainfrom
rrenk/sync-error-docs-selfredirect
Aug 7, 2026
Merged

docs(skills): do not emit a self-redirect for error codes without underscores#490
rachaelrenk merged 2 commits into
mainfrom
rrenk/sync-error-docs-selfredirect

Conversation

@rachaelrenk

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #487, found by dry-running the repaired sync-error-docs skill 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.

conflict is the only such code today. Abbreviating the shared prefix /reference/api-and-sdk/troubleshooting/errors/ as :

entry 1   …/conflict   →  …/conflict/     harmless slash normalization
entry 2   …/conflict/  →  …/conflict/     source == destination

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. conflict has no redirect entries in vercel.json while the other 17 codes each have two. That absence is correct, not an oversight — there is nothing to bridge.

Changes

  • sync-error-docs/SKILL.md step 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.md step 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) with warp-server at 6ca991369. Verified that src/sidebar.ts, vercel.json, and the errors directory were byte-identical to main before running.

Step 1  18 error codes extracted from platformerrors.go
Step 2  18 doc pages present
Step 3  0 codes missing a page
Step 5  18/18 registered in src/sidebar.ts (bare-slug format confirmed)
Step 6  conflict correctly needs no redirect; 17/17 others have both variants
Step 7  both /errors/:code and /errors/:code/ catch-alls present

VERDICT: everything in sync, no PR, and under the actionable-only rule no Slack post.

Every assumption the repaired skill makes held against reality: the ../warp-server sibling 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

…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>
@cla-bot cla-bot Bot added the cla-signed label Aug 7, 2026
@vercel

vercel Bot commented Aug 7, 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 Aug 7, 2026 3:23pm

Request Review

@oz-for-oss

oz-for-oss Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@rachaelrenk

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot 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.

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

@rachaelrenk rachaelrenk self-assigned this Aug 7, 2026
… 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>
@rachaelrenk
rachaelrenk merged commit f9663d0 into main Aug 7, 2026
8 checks passed
@rachaelrenk
rachaelrenk deleted the rrenk/sync-error-docs-selfredirect branch August 7, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants