Skip to content

cleanup(changesets): drop 2 stale forward-merge leftovers + apply AUTH_REQUIRED prose tightening to main#3994

Merged
bokelley merged 3 commits intomainfrom
bokelley/cleanup-stale-changesets-and-auth-prose
May 3, 2026
Merged

cleanup(changesets): drop 2 stale forward-merge leftovers + apply AUTH_REQUIRED prose tightening to main#3994
bokelley merged 3 commits intomainfrom
bokelley/cleanup-stale-changesets-and-auth-prose

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 3, 2026

Summary

Two patch-level changesets on `main` describe work already shipped to 3.0.x and already in-tree on `main` — genuine forward-merge leftovers that would emit duplicate CHANGELOG entries on the next 3.1.0 cut. A third "looks-stale" changeset turns out to describe operational guidance `main` actually still needs.

Audit

Changeset on `main` Code already on `main`? Already shipped on 3.0.x? Action
`envelope-field-present-check-type` ✅ in `storyboard-schema.yaml` ✅ 3.0.2 (`9dcf7aa`) Delete (stale)
`fix-asset-union-dedup` ✅ `core/assets/asset-union.json` exists ✅ 3.0.2 (`9dcf7aa`) Delete (stale)
`auth-required-prose-tightening-3.0.x` ❌ `main` still has the short pre-tightening prose ✅ 3.0.4 (`78b1dc4`) Apply prose change to `main`, keep changeset

Why apply the AUTH_REQUIRED prose to `main` rather than delete

`main`'s `AUTH_REQUIRED` description currently reads "Authentication is required to access this resource" with no retry-storm warning. The same operational risk 3.0.x already remediated applies on `main`: agents that conflate "credentials missing" (correctable) with "credentials presented but rejected" (terminal — needs human rotation) retry-loop on revoked tokens against seller SSO endpoints, in a pattern indistinguishable from brute-force probes. The seller's fraud detection may rate-limit, suspend, or alert on the calling agent.

The 3.1 line will still split this into `AUTH_MISSING` / `AUTH_INVALID` via #3739. Until that lands, the prose tightening is the only operational guidance against the retry-storm pattern, and `main` should not regress relative to 3.0.x.

Changes

  • `static/schemas/source/enums/error-code.json` — `enumDescriptions.AUTH_REQUIRED` and `enumMetadata.AUTH_REQUIRED.suggestion` rewritten to spell out the two sub-cases and the SHOULD-NOT-auto-retry rule. Mirrors the 3.0.4 backport prose verbatim.
  • `docs/building/implementation/error-handling.mdx` — adds the `AUTH_REQUIRED sub-cases` callout under the Authentication and Access table; the recovery example switch now branches on whether credentials were attached.
  • `.changeset/envelope-field-present-check-type.md` — deleted.
  • `.changeset/fix-asset-union-dedup.md` — deleted.

Wire-format impact

Wire format unchanged on `main`. No new enum values. No recovery classification change at the structured level. Senders that already emit `AUTH_REQUIRED` keep working; receivers gain the documented sub-case discipline.

Test plan

  • Schemas rebuild cleanly (`node scripts/build-schemas.cjs`)
  • Storyboard error-code lint passes (`node scripts/lint-error-codes.cjs`)
  • JSON parses (Python `json.load`)
  • CI green

🤖 Generated with Claude Code

…pply AUTH_REQUIRED prose tightening to main

Two patch-level changesets on `main` describe work that has already shipped to 3.0.x and is also already on `main`. They are genuine forward-merge leftovers — the changeset files survived the merge but the work they describe was already in-tree. Without this cleanup, the next 3.1.0 cut would emit duplicate CHANGELOG entries claiming new patch-level work for code that shipped weeks ago.

Deleted:

- `.changeset/envelope-field-present-check-type.md` — the `envelope_field_present` check type already lives in `static/compliance/source/universal/storyboard-schema.yaml` on `main` (and shipped on 3.0.x as 3.0.2 via 9dcf7aa).
- `.changeset/fix-asset-union-dedup.md` — `static/schemas/source/core/assets/asset-union.json` already exists on `main` (and shipped on 3.0.x as 3.0.2 via 9dcf7aa).

The third "looks-stale" changeset, `auth-required-prose-tightening-3.0.x.md`, is a different shape: the changeset file is on `main` but the prose tightening it describes is NOT — `main`'s `AUTH_REQUIRED` description still reads "Authentication is required to access this resource" with no retry-storm warning. So `main`'s `AUTH_REQUIRED` carries the same operational risk 3.0.x already remediated: agents that conflate "credentials missing" with "credentials presented but rejected" retry-loop on revoked tokens against seller SSO endpoints, in a pattern indistinguishable from brute-force probes.

Applied the same prose tightening that 3.0.x shipped in 3.0.4:

- `static/schemas/source/enums/error-code.json` — `enumDescriptions.AUTH_REQUIRED` and `enumMetadata.AUTH_REQUIRED.suggestion` rewritten to spell out the two sub-cases and the SHOULD-NOT-auto-retry rule.
- `docs/building/implementation/error-handling.mdx` — adds the `AUTH_REQUIRED sub-cases` callout under the Authentication and Access table; the example switch now branches on whether credentials were attached.

Wire format unchanged on `main`. No new enum values. No recovery classification change at the structured level. The 3.1 line will still split this into `AUTH_MISSING` / `AUTH_INVALID` via #3739; until that lands, the prose tightening is the only operational guidance against the retry-storm pattern, and `main` should not regress relative to 3.0.x.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bokelley and others added 2 commits May 3, 2026 13:22
Three review passes converged on the same surface:

- Restructure the AUTH_REQUIRED enumDescription to match the established GOVERNANCE_DENIED pattern (one-sentence summary + recovery hinge, then `\n\nSub-cases (full guidance). …`). Adds an explicit cross-reference to error-handling.mdx#auth_required-sub-cases so readers can navigate from the schema hover to the docs anchor.
- Drop the temporal "agents handling 3.0.x sellers" phrasing — temporal/version-aware copy is for CHANGELOGs, not enumDescriptions surfaced in 3.x SDK hovers. Replaced with neutral "until that ships".
- Shorten enumMetadata.AUTH_REQUIRED.suggestion to a half-sentence imperative, matching the style of other suggestion values.
- Promote the AUTH_REQUIRED sub-cases H4 to a Mintlify Warning callout immediately under the Authentication and Access table. The orphan H4 read as competing with the next H3 Billing and Account Setup; the callout integrates the depth without adding an out-of-band heading.
- Fix the JS example so it stops introducing requestHadCredentials as a free variable. Both the inline snippet and the lower switch-case block now derive it locally with a comment pointing at error.request_had_credentials — a reader pasting the snippet no longer hits ReferenceError.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…red-retry-storm-prose

The existing changeset's framing called itself a "3.0.x prose-only backport of #3739", which is correct for 3.0.x but reads oddly on main — main isn't backporting from itself, it's adopting the same prose tightening that 3.0.x already shipped in 3.0.4 because main's enum split (#3739) hasn't landed yet.

Renames the changeset file (which makes it count as new for the changeset CI check) and rewrites the description to fit main's release framing without losing the operational rationale. Also rolls in a one-line note about the two stale changeset deletes already in this PR so the 3.1.0 CHANGELOG entry mentions them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit 063e317 into main May 3, 2026
18 checks passed
@bokelley bokelley deleted the bokelley/cleanup-stale-changesets-and-auth-prose branch May 3, 2026 17:36
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