Remove em-dashes from served discovery copy (2.9.3) - #115
Merged
Conversation
Every string these builders render onto a merchant's llms.txt, skill.md, OpenAPI and 402 body carried em-dashes, which the house rule bars on external surfaces. Because the identity and payment blocks are shared, one fix here clears the residue on every store at once: a store rendering against this build now emits zero. The empty compatible-clients table cell rendered a bare em-dash as a placeholder; it now reads "none", which is clearer anyway. Kept identical to the Python SDK, which renders the same table. Also corrects "agent-commerce" to "agentic-commerce" in three doc comments: that is the house category term. Comments and JSDoc are untouched. They are internal prose, they carry the load-bearing rationale, and rewriting them would be churn across nearly every file for no reader benefit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Every string these builders render onto a merchant's
llms.txt,skill.md, OpenAPI document and 402 body carried em-dashes, which the house style bars on external surfaces. Because the identity and payment blocks are shared, one fix here clears the residue on every storefront at once: rendering a real store against this build now emits zero, where it was four to seven fragments per store before.Twenty-one served strings across the discovery and challenge builders. Two worth calling out:
none, which is clearer than a dash anyway, and matches the Python SDK that renders the same table.Comments and JSDoc are deliberately untouched. This repo has roughly 850 em-dashes, almost all in comments that carry load-bearing rationale; rewriting them would touch nearly every file, destroy blame, and change nothing a consumer reads.
Type of change
Public API
No signature, shape, or export changes. The rendered TEXT of discovery surfaces changes, which is the point. A consumer asserting on the exact old wording of a shared identity or payment line would need to update; nothing else is affected. Version bumped 2.9.2 to 2.9.3, patch, since client impact is text only.
Test plan
bun run lint,bun run typecheck,bun run test: 1817 passing, 4 skipped.The meaningful check is downstream, not in this repo: I built the package and swapped the build into a real merchant's
node_modules, rendered all six of its discovery surfaces, and confirmed the rendered output contains zero em or en dashes. Before the change the same render carried them. Restored the vendored copy afterwards and re-ran that store's suite to confirm it was left clean.One string was nearly missed and is worth recording: my first sweep filtered for lines containing a quote character, which silently skipped lines inside multi-line template literals. The identity header line lived there. The rendered-output check is what caught it, which is the argument for verifying the artifact rather than the source.
Checklist