Skip to content

Fix Meterpreter acceptance setup and build budgets - #21965

Merged
adfoster-r7 merged 3 commits into
rapid7:masterfrom
pauljccode:fix/acceptance-environment
Oct 6, 2026
Merged

adfoster-r7 merged 3 commits into
rapid7:masterfrom
pauljccode:fix/acceptance-environment

Conversation

@pauljccode

@pauljccode pauljccode commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

Isolate native-gem caches and allow source builds enough time to complete Meterpreter acceptance:

  • Key Bundler caches by runtime and version. PHP 5.3's macOS cache contains Fiddle linked against MacPorts libffi, which Java jobs cannot load.
  • Run automatic Git maintenance in the foreground before Bundler clones its cache. The observed commit-graph hardlink failure is consistent with concurrent maintenance, but the original writer was not traced.
  • Give Mettle source-build jobs 75 minutes, retaining 50 minutes otherwise. An Intel macOS build took 18m42s before setup and testing; the job deadline then interrupted acceptance. Individual test limits and assertions are unchanged.

Breaking Changes

None. Existing shared caches are invalidated; automatic Git maintenance remains enabled.

Verification Steps

  1. Run Meterpreter Acceptance. Confirm distinct runtime/version cache keys and passing Intel macOS Java/Python jobs.
  2. Run the controlled cache workflow: consuming PHP's cache must fail on missing MacPorts libffi; the isolated warm cache must pass its native-call probe.
  3. Call the reusable workflow with build_mettle: true and Fix process channel cleanup after exit mettle#298. Confirm source-build acceptance completes within 75 minutes.

Test Evidence

Standalone Verify failed in Android substitution, then the retry's coverage hook. That separate defect is addressed by #21968; this branch does not contain it.

Environment

Field Details
Operating System GitHub-hosted macos-15-intel, ubuntu-latest and windows-2022
Software Ruby 3.4; existing Meterpreter runtime matrix

AI Usage Disclosure

Codex assisted with investigation, implementation, validation and this description.

Pre-Submission Checklist

  • No sensitive information included.
  • Tested in the environments listed above; validation limits are stated.
  • Read CONTRIBUTING.md, AGENTS.md and the acceptance guidelines.
  • Module documentation and library RSpec additions do not apply to this workflow change.

Separate Bundler caches by runtime to prevent native gems built with
PHP libraries from being restored into Java or Python jobs.

Wait for automatic Git maintenance before Bundler clones its local
cache, avoiding concurrent commit-graph changes during hardlink checks.
@dwelch-r7

Copy link
Copy Markdown
Contributor

Sorry I'm struggling to understand the changes here @pauljccode what is the issue you're trying to resolve and how do these changes achieve that?

@pauljccode

Copy link
Copy Markdown
Contributor Author

Thanks for taking a look. My description didn’t clearly connect the failures to the changes. These address three separate problems I encountered while running the acceptance workflow:

  1. Java jobs on Intel macOS restore incompatible native gems. PHP 5.3 setup installs MacPorts libraries, and Fiddle built in that environment enters the shared Bundler cache. Java restores that cache without those libraries and fails with Library not loaded: /opt/local/lib/libffi.8.dylib. Including the Meterpreter runtime and version in the cache key separates those environments. This controlled run reproduces the failure with the shared cache and verifies that an isolated warm cache works.

  2. Bundler fails while cloning its local Git cache. The error was hardlink different from source on a temporary commit-graph file. Setting maintenance.autoDetach=false makes automatic maintenance finish in the foreground before the subsequent clone. This is consistent with the failure reported in Dependabot, but I didn’t capture the writer during the original failure. I verified foreground maintenance and successful clone trials; this part remains a proposed mitigation rather than a confirmed reproduction of the original cause.

  3. Mettle source builds leave insufficient time for acceptance. In this Intel macOS job, building Mettle took about 19 minutes, and the 50-minute job deadline interrupted acceptance. The change gives source-build Mettle jobs 75 minutes. Other jobs retain 50 minutes, and individual test limits and assertions are unchanged.

I grouped these because they affect the same workflow, but they are independently reviewable. I’m happy to split them if that would make review easier.

@adfoster-r7
adfoster-r7 merged commit a6e8091 into rapid7:master Oct 6, 2026
64 of 66 checks passed
@adfoster-r7 adfoster-r7 added the rn-no-release-notes no release notes label Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rn-no-release-notes no release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants