Skip to content

Unblock the last two commands from the 3DX session replay - #108

Merged
jonchun merged 1 commit into
mainfrom
fix/session-replay-gaps
Aug 1, 2026
Merged

Unblock the last two commands from the 3DX session replay#108
jonchun merged 1 commit into
mainfrom
fix/session-replay-gaps

Conversation

@jonchun

@jonchun jonchun commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Why

Replaying parser/testdata/corpus/session-3dx.yaml end to end — parse and validate,
not parse alone — left 4 of 17 commands from the recorded 3DEXPERIENCE session blocked.
Two were real defects, and both had been invisible because the only harness was
parser-level.

What changed

get-psdrive declared flags: []. Get-PSDrive -PSProvider FileSystem parsed fine
and was then rejected by the validator. The corpus filed this command under "Already
works"
— true of the parser, false of the validator. Added -PSProvider, -Name, and
-Scope.

IPv4 literals failed the lexer. Number is [0-9]+ with no dots, so 127.0.0.1
matched 127 and left an unlexable .0.0.1, because Ident must start with a letter.
Adds an IPLiteral token ahead of Number plus a matching PSLiteral alternative.

Two deliberate limits on that token:

  • All four octets required, so it cannot swallow a decimal like 2.5 — decimals stay
    unsupported exactly as before.
  • Added to PSLiteral only, not PSAtom. An IP inside an arithmetic expression is
    meaningless; an IP as a flag value is the real case.

Corpus annotations corrected. They had gone stale and were actively misleading — the
"manifest miss" group was fixed by case-insensitive cmdlet lookup and now passes both
layers, but the heading still said otherwise. That staleness caused a reader to twice
report those commands as outstanding work when they already passed.

Result

Session replay: 16/17 clean, up from 13. The one remaining entry is Get-WmiObject,
correctly denied with a redirect to Get-CimInstance — the guard rail working, not a gap.

Testing

TestIPv4LiteralsParse, TestIPLiteralDoesNotShadowExistingTokens (guards the lexer
ordering against size literals, Windows paths, and /1GB arithmetic),
TestGetPSDriveProviderFlag, TestIPLiteralReachesValidator.

Full suite passes including -race and the parser fuzz seeds; go vet clean.

Untested gap

Not exercised against a real Windows or DSLS host — none available. Everything here is
verified against the recorded transcript and unit tests only.

🤖 Generated with Claude Code

Replaying parser/testdata/corpus/session-3dx.yaml end to end (parse +
validate) left 4 of 17 commands blocked. Two were real defects.

get-psdrive declared `flags: []`, so `-PSProvider FileSystem` was
rejected even though it parsed. The corpus filed this command under
"Already works" — true of the parser, false of the validator, and nothing
checked the difference until the validator corpus existed.

IPv4 literals failed the lexer: Number is [0-9]+ with no dots, so
`127.0.0.1` matched `127` and left an unlexable `.0.0.1`, because Ident
must start with a letter. Adds an IPLiteral token ahead of Number and a
matching PSLiteral alternative. Requiring all four octets keeps it from
swallowing decimals like `2.5`, which stay unsupported as before. Added
to PSLiteral only, not PSAtom — an IP inside arithmetic is meaningless.

Replay now runs 16/17. The remaining entry is Get-WmiObject, correctly
denied with a redirect to Get-CimInstance.

Also corrects the corpus annotations, which had gone stale and were
actively misleading: the "manifest miss" group was fixed by
case-insensitive cmdlet lookup and now passes both layers, and the
"Already works" heading now says which layer it means.
@jonchun
jonchun merged commit 466b905 into main Aug 1, 2026
2 checks passed
@jonchun
jonchun deleted the fix/session-replay-gaps branch August 1, 2026 13:51
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