Skip to content

docs: deliver permanent Perl thread release gates - #967

Merged
fglock merged 6 commits into
masterfrom
docs/thread-release-gates
Aug 16, 2026
Merged

docs: deliver permanent Perl thread release gates#967
fglock merged 6 commits into
masterfrom
docs/thread-release-gates

Conversation

@fglock

@fglock fglock commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • add permanent make test-threads and make test-threads-release gates
  • run the PR thread gate on Ubuntu CI and retain its JSON failure reports
  • publish a complete Perl threads reference and classify the four bundled thread modules as fully supported
  • update the concurrency plan to the live maintenance contract, with direct regex/Joni work remaining separate
  • replace unsafe broad Java/temp cleanup advice with exact-process guidance

Compatibility contract

The PR gate runs the complete unchanged upstream threads, threads::shared, Thread::Queue, and Thread::Semaphore distributions on the JVM and interpreter backends with virtual carriers, plus focused platform lifecycle, signal, stack, condition, timeout, and deadlock coverage.

The release gate extends this to the complete four-mode backend/carrier matrix. Direct regex-language behavior and Joni integration remain owned by the separate Phase 36 project.

Validation

  • make — PASS (five unit shards)
  • make test-threads — PASS
    • JVM/virtual: 64 files, 1,891 assertions
    • interpreter/virtual: 64 files, 1,891 assertions
    • focused platform: 19 files, 485 assertions
  • make test-threads-release — PASS
    • JVM/platform: 64 files, 1,891 assertions
    • interpreter/platform: 64 files, 1,891 assertions
    • virtual configurations repeated and passed
  • make check-links — PASS (550 links, 0 errors)
  • timeout 3600 ./jcpan --jobs 8 -t DBIx::Class — PASS (325 files, 42,681 assertions)

fglock and others added 6 commits August 15, 2026 23:37
Add a pull-request thread gate covering the complete unchanged threads,
threads::shared, Thread::Queue, and Thread::Semaphore distributions on both
execution backends with virtual carriers, plus focused platform lifecycle,
signal, stack, wait, timeout, and deadlock coverage. Add a full four-mode
release target and retain its JSON reports in CI failure artifacts.

Publish the Perl threads reference and classify the four bundled modules as
fully supported. Document snapshot-versus-share behavior, carrier and resource
policies, DBI ownership, bounded runtime pooling, examples, and permanent
validation commands. Reduce the concurrency design to its current maintenance
contract and next actions; implementation history remains in commits and pull
requests. Remove unsafe broad Java/temp cleanup advice from the testing guide.

Validation:
- make: PASS, five unit shards (6m14s)
- make test-threads: PASS
  - JVM/virtual: 64 files, 1891 assertions
  - interpreter/virtual: 64 files, 1891 assertions
  - focused platform: 19 files, 485 assertions
- make test-threads-release: PASS
  - all four backend/carrier configurations: 64 files, 1891 assertions each
- make check-links: PASS, 550 links, 0 errors
- timeout 3600 ./jcpan --jobs 8 -t DBIx::Class: PASS,
  325 files and 42681 assertions

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
The permanent thread gate reads the unchanged upstream distributions from a
gitignored perl5 source tree. A fresh GitHub checkout did not contain that tree,
so the first PR run failed before executing a test and matrix fail-fast canceled
the otherwise-running Windows build.

Sparse-check the four distributions out from the exact Perl v5.44.0 tag on
Ubuntu before the gate runs. Add an explicit Make prerequisite with actionable
local setup guidance, and document the one-time source checkout.

Validation:
- make check-thread-test-sources: PASS
- make check-links: PASS, 550 links, 0 errors
- workflow YAML parse: PASS

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Perl v5.44.0 has 62 thread distribution tests, while the delivered 64-file,
1891-assertion contract was validated against Perl source commit
de80c8ecd40c6d5b677847699e5482b44bc748c6. The tag also made one join
expectation differ from the validated corpus.

Pin the GitHub sparse checkout and local setup documentation to the exact
validated commit. Include Perl's core t/ harness, which threads and
threads-shared load through PERL_CORE; omitting it caused ten files to exit
before emitting TAP. This restores the same inputs used by the successful local
four-mode release gate.

Validation:
- local perl5 source commit matches de80c8ecd40c6d5b677847699e5482b44bc748c6
- make check-thread-test-sources: PASS
- workflow YAML parse: PASS
- make check-links: PASS, 550 links, 0 errors
- prior exact-corpus make test-threads-release: PASS, 64 files and 1891
  assertions in each backend/carrier configuration

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
The pinned-corpus CI run executed all 64 files but exposed two gate defects.
threads/t/join.t test 20 failed reproducibly under eight concurrent JVMs on the
two-core Ubuntu runner, while passing in isolation. More importantly,
perl_test_runner.pl always exited zero after printing a failed TAP summary, so
GitHub still marked the job green.

Add an opt-in --strict-exit mode that returns nonzero for any failed, errored,
timed-out, or incomplete file, and enable it on every thread Make target. Route
the timing-sensitive join test through the runner's existing exclusive slot so
the compatibility assertion is measured without unrelated JVM contention.
Document both properties of the permanent gate.

Validation:
- runner syntax and workflow YAML: PASS
- strict runner pass fixture: exit 0
- strict runner fail fixture: exit 1
- make test-threads: PASS
  - JVM/virtual: 64 files, 1891/1891 assertions
  - interpreter/virtual: 64 files, 1891/1891 assertions
  - focused platform: 19 files, 485/485 assertions
- make test-threads-release: PASS
  - every complete backend/carrier configuration: 64 files, 1891/1891
- make: PASS, five unit shards
- make check-links: PASS, 550 links, 0 errors

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Route threads->yield through the Java backend instead of a zero-duration
select so a newly created ithread can claim a pending join under constrained
Linux CI scheduling. Preserve bounded failed TAP output in strict runner
reports so future CI failures remain diagnosable after worker cleanup.

Validation:
- make
- make test-threads
- make test-threads-release
- system Perl threads_compatibility_activation.t (10/10)

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Represent $0 with a runtime-local scalar that retains its magic across
ithread snapshots. On explicit assignment, update the writable Linux argv
region discovered through /proc/self/stat using Java 24 FFM, preserving
Perl's per-thread scalar isolation while exposing the process-wide title.

This recovers the Linux-only threads/t/join.t process-title assertion that
the strict compatibility gate revealed.

Validation:
- make
- make test-threads
- LinuxProcessTitleTest

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock merged commit 6189122 into master Aug 16, 2026
2 checks passed
@fglock
fglock deleted the docs/thread-release-gates branch August 16, 2026 01:55
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