Preserve equals signs in inline CLI option values - #6903
Conversation
🦋 Changeset detectedLatest commit: b29704e The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — a single reproduction test added for the CLI lexer inline-equals truncation bug.
LexerInlineEquals.audit.test.ts: one synchronous test asserting that--query=left=rightproduces aLongOptiontoken withvalue: "left=right". The test correctly fails against the current lexer (which truncates tovalue: "left"viasplit("=", 2)atlexer.ts:50).
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the implementation fix for the lexer inline-equals truncation bug, plus a changeset.
lexer.ts: replacedsplit("=", 2)withindexOf("=")+slicefor long options, matching the existing short-option pattern at lines 60-63Lexer.test.ts: inline-equals regression test verifying--query=left=rightproducesvalue: "left=right"calm-tools-remember.md: changeset documenting theeffect: patchfix
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|

Summary
A long option value containing an equals sign is silently truncated after the segment before that sign.
Important
This PR starts with focused failing reproduction tests. Add the implementation fix to this same branch; CI is expected to fail until that fix is included.
Inline option values are truncated at a second equals
Module:
cli/internal/lexerAudit ID:
unstable-ai-cli-lexer-inline-equals-truncatedSeverity / confidence: high / high
What happens
A long option value containing an equals sign is silently truncated after the segment before that sign.
Why it happens
split("=", 2) returns only the first two segments and discards the remainder.
Expected behavior
In --name=value syntax, equals signs after the first separator are ordinary value content and must be preserved.
Relevant implementation
These links and excerpts are pinned to audit base
c9b56ab507f224426ee8388dc450da447ec4715f.packages/effect/src/unstable/cli/internal/lexer.ts:49-51View problematic code at
packages/effect/src/unstable/cli/internal/lexer.ts:49-51View exact lines on GitHub
Reproduction
pnpm test --run packages/effect/test/unstable/cli/LexerInlineEquals.audit.test.tsObserved failure: FAIL: left=right was tokenized as left.
Implementation handoff
The initial reproduction tests on this branch are the regression specification for the implementation fix that should follow in this PR.
pnpm test --run packages/effect/test/unstable/cli/LexerInlineEquals.audit.test.tsAudit provenance
c9b56ab507f224426ee8388dc450da447ec4715fc9b56ab507f224426ee8388dc450da447ec4715funstable-ai-cli-lexer-inline-equals-truncatedCloses EFF-346