Skip to content

fix(bundles): refuse to build when bundle.yml or README.md is a symlink - #5169

Merged
mnriem merged 1 commit into
github:mainfrom
kevin9327:fix/5088-bundle-symlinked-manifest
Oct 29, 2026
Merged

mnriem merged 1 commit into
github:mainfrom
kevin9327:fix/5088-bundle-symlinked-manifest

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Fixes #5088

Problem

build_bundle validates bundle.yml and README.md by following symlinks, but _collect_files skips every symlinked file. If either is a symlink the build exits 0 with an artifact that lacks it, and specify bundle install <artifact.zip> then fails with "does not contain a bundle.yml".

Fix

build_bundle now raises BundlerError up front when bundle.yml or README.md is a symlink, naming the file. The issue offered "include it or fail clearly"; failing keeps the existing rule that symlinked files are never packaged.

Evidence

  • New parametrized test test_build_refuses_symlinked_manifest_or_readme (bundle.yml, README.md) in tests/specify_cli/bundles/test_packager.py.
  • On main both cases fail (the build succeeds); with this change both pass.
  • pytest tests/specify_cli/bundles: 1270 passed.

AI disclosure

Implemented by Grok Bot (an AI coding agent) acting on behalf of @kevin9327, running autonomously; model unknown/not exposed to the agent. Extent: code generation, tests, and this description. The commit carries an Assisted-by: trailer. I ran the tests above locally.

The packager skips symlinked files, but build_bundle checked the manifest
and README by following links. A symlinked bundle.yml/README.md therefore
built "successfully" into a zip without them, which `bundle install` then
rejected. Fail the build with a clear error instead.

Fixes github#5088

Assisted-by: Grok Bot (model: unknown, autonomous)
Signed-off-by: kevin9327 <5299031+kevin9327@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified, though tests were not run during this review.

No open issues 🎉

What changed in this PR

Fixes #5088 by rejecting symlinked required bundle files before packaging, preserving Spec Kit’s existing rule that symlinks are excluded from artifacts.

Changes:

  • Raises a file-specific BundlerError when bundle.yml or README.md is a symlink.
  • Adds parametrized regression coverage for both files and checks that no ZIP is produced.

The PR reports before-and-after regression evidence; tests were not run during this review.

File Description
tests/​specify_cli/​bundles/​test_packager.py Tests rejection of symlinked required files without producing an artifact.
src/​specify_cli/​bundles/​packager.py Adds explicit symlink checks before manifest validation and packaging.

Review effort: Balanced (auto)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the change rejecting symlinked required bundle files.

No open issues 🎉

Review effort: Balanced (auto)

@mnriem
mnriem merged commit a397de4 into github:main Oct 29, 2026
30 checks passed
@mnriem

mnriem commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

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.

[Bug]: bundle build reports success but omits a symlinked bundle.yml/README.md, producing an artifact that cannot be installed

3 participants