You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extracts a detailed informal specification for CommandLineParser.TryUnescape — the pure function that strips surrounding quotes and applies backslash-escape rules to command-line argument tokens.
This is Task 2 (Informal Spec Extraction) in the Lean Squad formal-verification pipeline.
What's included
formal-verification/specs/commandlineparser_tryunescape_informal.md — full informal spec with:
Precise description of three parsing modes (unquoted pass-through, single-quoted literal, double-quoted with backslash escapes)
24 properties across 5 property groups
6 documented edge cases, including two confirmed bugs
When input = "'" (length 1), input.Length - 2 = -1. Passing count = -1 to IndexOf(char, int, int) throws ArgumentOutOfRangeException. No existing test covers this case.
Bug 2 — Length-1 double-quote " throws on slice
When input = "\"" (length 1), evaluating input[1..^1] = input[1..0] (start=1, end=0) produces an invalid range and throws. No existing test covers this case.
Suggested fix for both: add a length guard before branching into quoted modes:
if(input.Length<2)returntrue;// treat as unquoted pass-through
Next step
Task 3: Write the Lean 4 formal spec (formal-verification/lean/FVSquad/CommandLineParserTryUnescape.lean) once the Lean toolchain becomes available in the CI environment. The Lean toolchain is currently blocked by the network firewall in the runner.
🔬 Lean Squad — this PR was created by the automated Lean Squad formal-verification agent.
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch lean-squad/task2-tryunescape-2026-04-25-19d4666508cf1804.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Summary
Extracts a detailed informal specification for
CommandLineParser.TryUnescape— the pure function that strips surrounding quotes and applies backslash-escape rules to command-line argument tokens.This is Task 2 (Informal Spec Extraction) in the Lean Squad formal-verification pipeline.
What's included
formal-verification/specs/commandlineparser_tryunescape_informal.md— full informal spec with:formal-verification/TARGETS.md— target Porting latest changes. #2 (TryUnescape) advanced from phase 1 → 2Confirmed bugs identified during spec extraction
Bug 1 — Length-1 single-quote
'throwsArgumentOutOfRangeExceptionWhen
input = "'"(length 1),input.Length - 2 = -1. Passingcount = -1toIndexOf(char, int, int)throwsArgumentOutOfRangeException. No existing test covers this case.Bug 2 — Length-1 double-quote
"throws on sliceWhen
input = "\""(length 1), evaluatinginput[1..^1]=input[1..0](start=1, end=0) produces an invalid range and throws. No existing test covers this case.Suggested fix for both: add a length guard before branching into quoted modes:
Next step
Task 3: Write the Lean 4 formal spec (
formal-verification/lean/FVSquad/CommandLineParserTryUnescape.lean) once the Lean toolchain becomes available in the CI environment. The Lean toolchain is currently blocked by the network firewall in the runner.🔬 Lean Squad — this PR was created by the automated Lean Squad formal-verification agent.
Note
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch
lean-squad/task2-tryunescape-2026-04-25-19d4666508cf1804.Click here to create the pull request
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (240 of 240 lines)