Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions IMPLEMENTATION_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,15 @@ priorities.
authored `Set-Alias Env:...` invocation.
The generator-owned executable corpus now supports per-entry initial-
state mode and includes the promoted Parallel and remote/session cases.
It now contains exact generated expectations for 84 of the 90 PowerShell
design cases. Four intentionally deferred condition/deferred-action cases
remain parked. Two stable cases remain implementation work rather than
being mislabeled as corpus-complete: bounded-loop dynamic invocation
still fails atomically, and local `Invoke-Command -AsJob` still needs to
reject its invalid parameter-set combination. Direct generated cases for
`Measure-Command`, `Trace-Command`, and `ForEach-Object
-RemainingScripts` fill the remaining stable receiver-catalog evidence
without renumbering the existing corpus.
Stable v0.3 stops at the delivered Start-Job, Parallel, and remote/session
boundaries. Optional-module Start-ThreadJob and exact deferred
breakpoint/event/completion actions are post-v0.3 catalog work; unknown
Expand Down
10 changes: 8 additions & 2 deletions openspec/changes/v0-3-structured-shell-analysis/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
- [ ] 1.10 Promote every design case for a stable-v0.3 construct into the
executable corpus as its production parser slice lands. Retain future-scope
design cases as non-gating evidence rather than release work.
- PowerShell now has exact generated expectations for 84 of 90 design cases.
Four future-scope cases remain non-gating. The stable bounded-loop dynamic
invocation and invalid local `Invoke-Command -AsJob` cases remain pending
production corrections and are not marked as promoted.
- [x] 1.11 Correct the PowerShell script-block boundary and lock the additive
execution-region node, origin/phase/timing/cardinality facts, authored-versus-semantic
ordering, command projection, and independent shell-state analysis contract
Expand Down Expand Up @@ -270,8 +274,10 @@
- [ ] 7.6 Add adversarial cases for object-valued iterables, mutation, dynamic invocation, splatting, and cap overflow.
- [ ] 7.7 Add PowerShell corpus entries, live `pwsh` oracle coverage, and Netclaw integration cases.
- `PwshCorpusTool` now supports case-specific `PwshInitialStateMode`; keep
promoting the remaining stable execution-region and adversarial cases into
its generated manifest, then add the Netclaw PowerShell policy matrix.
promoting the two remaining stable cases into its generated manifest after
their production corrections, then complete the Netclaw PowerShell policy
matrix. Exact generated cases now cover `Measure-Command`, `Trace-Command`,
and `ForEach-Object -RemainingScripts` directly.
- [x] 7.8 Implement the additive `PwshDialect` API, PowerShell 7 compatibility
default, unknown-value safe-fail, Windows PowerShell 5.1 pipeline-chain
rejection, dialect-specific alias and execution-region metadata, and static
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
{
"name": "V03 design simple command substitution",
"input": "Remove-Item $(Get-Item target.txt)",
"powerShellInitialStateMode": "IsolatedNonInteractiveNoProfile",
"expected": {
"isUnparseable": false,
"clauses": [
{
"operator": "None",
"verb": [
"Get-Item"
],
"args": [
{
"raw": "target.txt",
"kind": "Literal",
"isPath": true,
"resolved": "C:/work/target.txt"
}
],
"redirects": [],
"elements": [
{
"raw": "Get-Item",
"value": "Get-Item",
"role": "Verb",
"sourceStart": 14,
"sourceLength": 8,
"precedingVerbElementCount": 0,
"kind": "Literal",
"isFlag": false,
"isPath": false
},
{
"raw": "target.txt",
"value": "target.txt",
"role": "Argument",
"sourceStart": 23,
"sourceLength": 10,
"precedingVerbElementCount": 1,
"kind": "Literal",
"isFlag": false,
"isPath": true,
"resolved": "C:/work/target.txt"
}
]
},
{
"operator": "None",
"verb": [
"Remove-Item"
],
"args": [
{
"raw": "$(Get-Item target.txt)",
"kind": "DynamicSkip",
"isPath": false
}
],
"redirects": [],
"elements": [
{
"raw": "Remove-Item",
"value": "Remove-Item",
"role": "Verb",
"sourceStart": 0,
"sourceLength": 11,
"precedingVerbElementCount": 0,
"kind": "Literal",
"isFlag": false,
"isPath": false
},
{
"raw": "$(Get-Item target.txt)",
"value": "$(Get-Item target.txt)",
"role": "Argument",
"sourceStart": 12,
"sourceLength": 22,
"precedingVerbElementCount": 1,
"kind": "DynamicSkip",
"isFlag": false,
"isPath": false
}
]
}
],
"syntax": [
{
"kind": "Block",
"parentIndex": null,
"region": "Unknown",
"childIndex": null,
"sourceStart": 0,
"sourceLength": 34,
"clauseIndex": null,
"groupKind": null,
"listOperator": null
},
{
"kind": "SimpleCommand",
"parentIndex": 0,
"region": "Root",
"childIndex": 0,
"sourceStart": 0,
"sourceLength": 34,
"clauseIndex": 1,
"groupKind": null,
"listOperator": null
},
{
"kind": "CommandSubstitution",
"parentIndex": 1,
"region": "Substitution",
"childIndex": 0,
"sourceStart": 12,
"sourceLength": 22,
"clauseIndex": null,
"groupKind": null,
"listOperator": null
},
{
"kind": "Block",
"parentIndex": 2,
"region": "Substitution",
"childIndex": 0,
"sourceStart": 14,
"sourceLength": 19,
"clauseIndex": null,
"groupKind": null,
"listOperator": null
},
{
"kind": "SimpleCommand",
"parentIndex": 3,
"region": "Statement",
"childIndex": 0,
"sourceStart": 14,
"sourceLength": 19,
"clauseIndex": 0,
"groupKind": null,
"listOperator": null
}
],
"commands": [
{
"clauseIndex": 0,
"immediateRole": "Substitution",
"isComplete": true,
"ancestry": [
{
"ancestorKind": "Block",
"region": "Root",
"childIndex": 0,
"sourceStart": 0,
"sourceLength": 34
},
{
"ancestorKind": "CommandSubstitution",
"region": "Substitution",
"childIndex": 0,
"sourceStart": 12,
"sourceLength": 22
},
{
"ancestorKind": "Block",
"region": "Statement",
"childIndex": 0,
"sourceStart": 14,
"sourceLength": 19
}
],
"effectiveArguments": [],
"workingDirectory": {
"kind": "Exact",
"values": [
"C:/work"
],
"pattern": null,
"coveringDirectory": null
}
},
{
"clauseIndex": 1,
"immediateRole": "Ordinary",
"isComplete": true,
"ancestry": [
{
"ancestorKind": "Block",
"region": "Root",
"childIndex": 0,
"sourceStart": 0,
"sourceLength": 34
}
],
"effectiveArguments": [
{
"clauseElementIndex": 1,
"value": {
"kind": "Unknown",
"values": [],
"pattern": null,
"coveringDirectory": null
}
}
],
"workingDirectory": {
"kind": "Exact",
"values": [
"C:/work"
],
"pattern": null,
"coveringDirectory": null
}
}
]
},
"notes": "Promotes stable design case pwsh-simple-command-substitution."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"name": "V03 design literal substitution spellings",
"input": "Write-Output \u0027$(Get-Date)\u0027 \u0022literal \u0060$(Get-Location)\u0022",
"powerShellInitialStateMode": "IsolatedNonInteractiveNoProfile",
"expected": {
"isUnparseable": false,
"clauses": [
{
"operator": "None",
"verb": [
"Write-Output"
],
"args": [
{
"raw": "\u0027$(Get-Date)\u0027",
"kind": "Literal",
"isPath": false
},
{
"raw": "\u0022literal \u0060$(Get-Location)\u0022",
"kind": "Literal",
"isPath": false
}
],
"redirects": [],
"elements": [
{
"raw": "Write-Output",
"value": "Write-Output",
"role": "Verb",
"sourceStart": 0,
"sourceLength": 12,
"precedingVerbElementCount": 0,
"kind": "Literal",
"isFlag": false,
"isPath": false
},
{
"raw": "\u0027$(Get-Date)\u0027",
"value": "$(Get-Date)",
"role": "Argument",
"sourceStart": 13,
"sourceLength": 13,
"precedingVerbElementCount": 1,
"kind": "Literal",
"isFlag": false,
"isPath": false
},
{
"raw": "\u0022literal \u0060$(Get-Location)\u0022",
"value": "literal $(Get-Location)",
"role": "Argument",
"sourceStart": 27,
"sourceLength": 26,
"precedingVerbElementCount": 1,
"kind": "Literal",
"isFlag": false,
"isPath": false
}
]
}
],
"syntax": [
{
"kind": "Block",
"parentIndex": null,
"region": "Unknown",
"childIndex": null,
"sourceStart": 0,
"sourceLength": 53,
"clauseIndex": null,
"groupKind": null,
"listOperator": null
},
{
"kind": "SimpleCommand",
"parentIndex": 0,
"region": "Root",
"childIndex": 0,
"sourceStart": 0,
"sourceLength": 53,
"clauseIndex": 0,
"groupKind": null,
"listOperator": null
}
],
"commands": [
{
"clauseIndex": 0,
"immediateRole": "Ordinary",
"isComplete": true,
"ancestry": [
{
"ancestorKind": "Block",
"region": "Root",
"childIndex": 0,
"sourceStart": 0,
"sourceLength": 53
}
],
"effectiveArguments": [],
"workingDirectory": {
"kind": "Exact",
"values": [
"C:/work"
],
"pattern": null,
"coveringDirectory": null
}
}
]
},
"notes": "Promotes stable design case pwsh-literal-substitution-spellings."
}
Loading