Skip to content

docs: add CPAN compatibility random tester and report#492

Merged
fglock merged 4 commits intomasterfrom
docs/cpan-compatibility-report
Apr 12, 2026
Merged

docs: add CPAN compatibility random tester and report#492
fglock merged 4 commits intomasterfrom
docs/cpan-compatibility-report

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented Apr 12, 2026

Summary

  • Add dev/tools/cpan_random_tester.pl — a script that randomly selects CPAN modules and tests them with jcpan -t, building a compatibility report over time
  • Add dev/prompts/cpan-compatibility-testing.md — reusable workflow instructions
  • Add dev/reports/ with initial test data and Markdown report

Key features of the tester

  • Dependency harvesting: parses ALL module results from jcpan output (target + deps), so one target yields multiple data points
  • Incremental: results accumulate across runs, never discarded. Failed modules are re-eligible for retry on subsequent runs
  • Smart upgrades: when a previously-failed module now passes (e.g., its deps got installed), record is upgraded FAIL → PASS
  • Git commit tracking: PASS results record the git commit hash, enabling git bisect when regressions are detected
  • Crash-safe: .dat files are saved after each target module

Usage

perl dev/tools/cpan_random_tester.pl                   # 10 random modules
perl dev/tools/cpan_random_tester.pl --count 50        # 50 targets
perl dev/tools/cpan_random_tester.pl --report-only     # regenerate .md

Test plan

  • Script parses and compiles cleanly (perl -c)
  • Tested with 3 random modules: 1 PASS, 2 FAIL correctly recorded
  • FAIL→PASS upgrade verified on re-run
  • Git commit hash recorded in pass.dat
  • Report generated with correct pass/fail tables

Generated with Devin

fglock and others added 4 commits April 12, 2026 14:27
Add dev/tools/cpan_random_tester.pl which:
- Randomly selects modules from the full CPAN index (~14K distributions)
- Tests each with jcpan -t, parsing results for all modules in output
  (target + dependencies)
- Records PASS results with git commit hash for regression bisecting
- Upgrades FAIL->PASS when re-tested modules now pass
- Generates a Markdown report at dev/reports/cpan-compatibility.md
- Saves results incrementally to .dat files (crash-safe, never discarded)

Also add:
- dev/prompts/cpan-compatibility-testing.md (reusable workflow instructions)
- dev/reports/ with initial test data (3 modules tested)

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Add WNOHANG to POSIX imports
- Prefer external timeout/gtimeout (from coreutils) over manual
  fork+signal handling — borrowed from perl_test_runner.pl
- Cache timeout command lookup via _find_timeout_cmd()
- Fix FD leak: close pipe on all paths including timeout
- Increase reap retries from 5 to 10 before SIGKILL
- Keep fork+setpgrp+kill(-pid) as fallback for systems without
  coreutils

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Add $| = 1 for autoflush so progress is visible when piped to file
- Regenerate .md report after each target module (not just at end)
- 171 modules tested: 37 pass (21.6%), 134 fail
- Notable passes: Algorithm::Diff, CGI::Application, DateTime::Format::Strptime,
  HTML::Form, Lingua::EN::Inflect, Parse::RecDescent, Test::Output, Test::Most

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@fglock fglock merged commit f7b3fa5 into master Apr 12, 2026
2 checks passed
@fglock fglock deleted the docs/cpan-compatibility-report branch April 12, 2026 14:29
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