fix(diagnostics): move event preflight codes off AB4840–AB4841 (#618 follow-up) - #625
Closed
ScriptedAlchemy wants to merge 3 commits into
Closed
fix(diagnostics): move event preflight codes off AB4840–AB4841 (#618 follow-up)#625ScriptedAlchemy wants to merge 3 commits into
ScriptedAlchemy wants to merge 3 commits into
Conversation
AB4840-AB4842 are owned by the CLI surface projections of #596 (PR #616); this branch's event-preflight export diagnostic moves to AB4850 and the required-provider declaration diagnostic to AB4851 so the ranges stay disjoint. Both codes are unused on main and on the #616 branch. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
The wrapper assertion pinned the exact generated line including the
temporary variable holding the parsed stdin value; it now matches any
identifier while still requiring validateNativeEventEnvelope to receive
the baked { canonicalEvent, nativeEvent, target } constants.
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
🦋 Changeset detectedLatest commit: d339855 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
commit: |
Owner
Author
|
Superseded: #616 renumbered its projection diagnostics to AB4843–AB4845 (see its 10:55 update), so #618's AB4840/AB4841 no longer collide and no reallocation is needed. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #618 (event preflight gates) was squash-merged to
maincarrying diagnostic codesAB4840(event-preflight export defects) andAB4841(required-provider declaration defects). Those codes collide with the still-open PR #616, whose CLI surface projections own theAB4840–AB4842range.This follow-up reallocates the event codes so the ranges stay disjoint:
AB4840→AB4850AB4841→AB4851Renamed everywhere:
src/routes/contract.ts,src/routes/graph.ts,tests/route-graph.test.ts,docs/diagnostics.md,website/docs/{en,zh}/guide/authoring/hooks.mdx, and the pending.changeset/595-event-preflight-gates.md(still unreleased onmain, so the release notes will only ever name the new codes). A new patch changeset (.changeset/625-event-preflight-code-realloc.md) documents the renumber for anyone who saw the merged codes onmain.Verified before renaming:
AB4850/AB4851are unused onmainand on the #616 branch; #616's branch (feat/596-cli-surface-projection) usesAB4840–AB4842, which this PR frees up.Also hardens the brittle wrapper assertion in
tests/claude-hook-event-name.test.ts: the exact-string match onvalidateNativeEventEnvelope(nativeInput, …)pinned the name of the temporary variable holding the parsed stdin value; it is now a narrow regex that allows any identifier as the first argument while still requiring the baked{ canonicalEvent, nativeEvent, target }constants.Do not merge — awaiting coordination with #616.
Refs #618 #616.
Verification
pnpm build && pnpm typecheck && pnpm lint && pnpm test:unit— green on Node 22.19.0.pnpm docs:site:build— green (0 broken links / 27377 anchors, en/zh parity intact).git grep 'AB4840\|AB4841'on this branch (excludingrepos/) — no leftovers outside the new changeset's intentional history note.Deslop
Deslop: Claude Fable 5, 0 edits — the diff is pure code renames plus one regex assertion with an intent-explaining comment.
Self-review
Reviewer: gpt-5.6-sol-high (generalPurpose subagent). Findings: none — no merge risks. Confirmed old codes remain only as intentional history in the new changeset,
AB4850/AB4851were unused onorigin/main, the regex matches the generated wrapper calls (nativeInputandparsedvariants), no generated/derived references were missed, andchangeset statuspasses.