Skip to content

agent-context: PowerShell implementation not updated for the #5222 plan-candidate fix (bash/python changed, PS 5.1 parity diverges) #5282

Open

Description

@satwareAG-ironMike

Summary

PR #5222 (commit 70a71b4, released in v1.3.1) fixed plan-candidate discovery in the agent-context extension's bash and python implementations, but extensions/agent-context/scripts/powershell/update-agent-context.ps1 was not updated in the same change. The repository's own guidance requires PowerShell scripts to preserve behavioral parity with the Bash and Python implementations, so the three implementations now diverge.

What changed in bash/python (70a71b4)

  • Candidates whose resolved target is not a regular file are skipped (S_ISREG check via p.stat()).
  • File symlinks are followed (stat follows links), so a plan.md symlink pointing at a regular file is now accepted.
  • Per-candidate errors are no longer suppressed (try around p.stat(), skipping only FileNotFoundError / NotADirectoryError), with the stated intent to follow file links "without suppressing errors for contained candidates".

Current PowerShell behavior

extensions/agent-context/scripts/powershell/update-agent-context.ps1 (candidate scan near line 433):

$candidate = Get-ChildItem -Path $specsDir -Filter 'plan.md' -File -Recurse -ErrorAction SilentlyContinue |

Concrete deltas vs the fixed bash/python

  1. Error suppression: -ErrorAction SilentlyContinue discards per-candidate enumeration errors, which the fix(agent-context): skip non-file plan candidates #5222 fix deliberately stopped doing for contained candidates.
  2. Link semantics: the fixed bash/python resolve links and accept regular-file targets; Windows PowerShell 5.1 -Recurse does not follow reparse-point directories by default, so candidates behind symlinked/junction specs/ subtrees can be missed, and symlinked plan.md files are returned as link objects whose post-filter treatment differs from the POSIX path.
  3. Non-file filter: the headline bug of fix(agent-context): skip non-file plan candidates #5222 (a directory named plan.md) likely does not reproduce under -File. The gap is error handling and link semantics, not the non-file filter itself.

Expected behavior

Either:

Environment

  • Upstream v1.3.1 (70a71b4)
  • Surfaced during a fork parity review of satwareAG/spec-kit while syncing v1.3.1; verified against the v1.3.1 tree (git diff v1.3.1 on the branch shows only bash/python/extension.yml/catalog touched by the fix).

Filed by satwareAG-ironMike on behalf of mw.

Activity

  1. added
    triage-must-haveVerdict: high-value, important work for Spec Kit — do first
    on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-must-haveVerdict: high-value, important work for Spec Kit — do first

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions