Skip to content

Ship only runtime files in the gem; add pack-contents spec - #62

Merged
minerva-sky merged 1 commit into
codenamev:mainfrom
minerva-sky:fix/gem-pack-contents
Oct 12, 2026
Merged

minerva-sky merged 1 commit into
codenamev:mainfrom
minerva-sky:fix/gem-pack-contents

Conversation

@minerva-sky

Copy link
Copy Markdown
Collaborator

Fixes #55.

What changed

  • agentic.gemspec: the files clause is now an allowlist (lib/, exe/, sig/, LICENSE.txt, README.md, CHANGELOG.md) instead of a denylist over git ls-files, and bindir is set to exe (it defaulted to bin, so RubyGems synthesised a bin/agentic entry that does not exist).
  • spec/gem_contents_spec.rb: loads the gemspec and fails if any packaged file falls outside that allowlist, or if a transcript, .local.json, or planning doc ever gets in. Runs under the default rake task, so CI is the pack-contents gate.

Before / after

  • gem build on main failed on the 141-byte .architecture/ filename and would otherwise package 497 files, including .claude-sessions/ transcripts and .claude/settings.local.json (the published 0.2.0 already carries those).
  • With this branch gem build succeeds and packages 119 files: lib/ plus exe/agentic, sig/agentic/builder.rbs, and the three top-level docs.

Verification

bundle exec rspec spec/gem_contents_spec.rb   # 3 examples, 0 failures
bundle exec standardrb agentic.gemspec spec/gem_contents_spec.rb
gem build agentic.gemspec                     # 119 files

The published 0.2.0 on rubygems still carries the stray files; yanking or cutting 0.2.1 is your call.

🤖 Generated with Claude Code

Replace the denylist over `git ls-files` with an allowlist (lib/, exe/,
sig/, LICENSE, README, CHANGELOG) and set bindir to exe. `gem build` on
main failed on a 141-byte .architecture filename and would otherwise have
packaged 497 files including session transcripts and
.claude/settings.local.json; it now builds 119 files.

spec/gem_contents_spec.rb loads the gemspec and fails CI if the file list
ever leaves the allowlist again.

Closes codenamev#55

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@minerva-sky
minerva-sky merged commit 1d28f84 into codenamev:main Oct 12, 2026
2 checks passed
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.

gem build fails on main (141-byte filename), and the package it would ship is 497 files of which 114 are lib/

2 participants