Skip to content

Inline shell policy stages - #1958

Merged
Aaronontheweb merged 1 commit into
devfrom
refactor/simplify-shell-policy-reduction-2
Aug 14, 2026
Merged

Inline shell policy stages#1958
Aaronontheweb merged 1 commit into
devfrom
refactor/simplify-shell-policy-reduction-2

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Summary

  • replace the delegate stage array with fixed coordinator calls in the existing security order
  • co-locate the four small stage groups with their sole production caller
  • remove tests for malformed delegate-runner states production can no longer construct
  • retain production-level cancellation regressions around actor contact and failure precedence

This is an incremental reduction slice. It removes 117 production lines and 3 control-flow lines, plus 257 obsolete test lines. The complete OpenSpec reduction gate remains open.

Validation

  • Release solution build: 0 warnings, 0 errors
  • full runnable suite: 7,478 passed; 15 environment/platform-specific skips
  • focused shell policy suite: 381 passed
  • strict OpenSpec validation
  • file headers and changed-file formatting
  • git diff check
  • Slopwatch: only the pre-existing PowerShellHostProbeTests SW004 warning outside this diff

@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) August 14, 2026 21:37
Comment on lines +375 to +386
foreach (var candidate in evaluation.Candidates.Where(static item =>
item.Role == ShellPolicyCandidateRole.Ordinary
&& ApprovalPatternMatching.IsPureSideEffect(item.Candidate)))
{
var result = evaluation.Cover(
candidate,
ShellCoverageKind.ReviewedSafePolicy,
ShellPolicyReason.ApprovalExemptSideEffect,
ShellScopeRelation.None);
if (result is not ShellPolicyStageResult.Continue)
return result;
}
Comment on lines +406 to +415
foreach (var candidate in uncovered)
{
var result = evaluation.Cover(
candidate,
ShellCoverageKind.OneTime,
ShellPolicyReason.OneTimeGrant,
ShellScopeRelation.None);
if (result is not ShellPolicyStageResult.Continue)
return result;
}
@Aaronontheweb
Aaronontheweb merged commit b3514a7 into dev Aug 14, 2026
23 checks passed
@Aaronontheweb
Aaronontheweb deleted the refactor/simplify-shell-policy-reduction-2 branch August 14, 2026 22:05
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