Skip to content

Drop the ArrayDeque spec workaround, OpenJML 21.0.29 has the fix - #188

Merged
bernardladenthin merged 1 commit into
mainfrom
chore/openjml-21.0.29-arraydeque
Oct 21, 2026
Merged

bernardladenthin merged 1 commit into
mainfrom
chore/openjml-21.0.29-arraydeque

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • streambuffer#187 kept the rm of ArrayDeque.jml as "still broken in 21.0.29". It is not: 21.0.29 ships the RAC fix from RAC: 9 bundled specs don't compile under --rac, inner-class invariants, and related findings (from streambuffer) OpenJML/OpenJML#1012 (Specs 43ab561, containsNull is //-RAC@). setup-openjml now deletes no bundled spec at all (fixups v3, new cache key). The guarded jdk/release repair stays; it does nothing on 21.0.29.
  • Narrowed down why the four class invariants still break RAC on 21.0.29. Inner-class methods call outer instance methods without a qualifier (SBOutputStream.write → writeSingleByte(b)), and RAC then checks the callee's invariant on the inner object instead of StreamBuffer.this. The result is NoSuchMethodError on Inner.JML$INV$$<n>(); Outer.this.m() runs clean. TODO.md has the 7-line reproducer; CLAUDE.md, the .jml header and CHANGELOG are updated.

Test plan

  • Affected tests pass locally against the unmodified OpenJML 21.0.29 Ubuntu distribution (SHA-256 as pinned), WSL Ubuntu 24.04, main at 673a5a9, run as the workflow runs it: RAC compile clean and instrumented, mvn -P jml-rac test 285/285 with ArrayDeque.jml in place
  • action.yml parses; check-run-scripts.py clean
  • CI is green on this branch (formal-verification runs on this PR, with a fresh cache key)
  • Docs / CHANGELOG updated where applicable

Related issues / PRs

Refs OpenJML/OpenJML#1012, #187.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes (if there are, I have notified the maintainer privately per SECURITY.md)

🤖 Generated with Claude Code

https://claude.ai/code/session_01YE4Dk1iKXes2PZ7jzjL5cC

OpenJML 21.0.29 also ships the RAC fix for java/util/ArrayDeque.jml
(OpenJML/OpenJML#1012, Specs 43ab561: the containsNull invariant is
//-RAC@), not only the AtomicLong one. Verified on the unmodified 21.0.29
Ubuntu distribution with this repository's main (673a5a9): RAC compile
clean, full suite 285/285 against the RAC classes with ArrayDeque.jml in
place. setup-openjml therefore deletes no bundled spec any more
(fixups v3, new cache key); the guarded jdk/release repair stays.

Also narrowed down why the four class invariants still break RAC on
21.0.29: an inner-class method calling an outer instance method without
a qualifier (SBOutputStream.write -> writeSingleByte(b)) makes RAC check
the callee's invariant on the inner object instead of StreamBuffer.this
(NoSuchMethodError on Inner.JML$INV$$<n>()); Outer.this.m() runs clean.
TODO.md has the reproducer; CLAUDE.md and the .jml header say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YE4Dk1iKXes2PZ7jzjL5cC
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.99%. Comparing base (f0b27a9) to head (920fc7d).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #188   +/-   ##
=========================================
  Coverage     96.99%   96.99%           
  Complexity      116      116           
=========================================
  Files             1        1           
  Lines           266      266           
  Branches         29       29           
=========================================
  Hits            258      258           
  Misses            2        2           
  Partials          6        6           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 99.248% — chore/openjml-21.0.29-arraydeque into main. No base build found for main.

@bernardladenthin
bernardladenthin merged commit 0a008a7 into main Oct 21, 2026
31 of 34 checks passed
@bernardladenthin
bernardladenthin deleted the chore/openjml-21.0.29-arraydeque branch October 21, 2026 22:37
bernardladenthin pushed a commit that referenced this pull request Oct 21, 2026
PR #188 (OpenJML 21.0.29 fixups v3: no bundled spec deleted at install any
more) merged first; the CHANGELOG and CLAUDE.md entries of both sides are
kept, main's corrected facts replacing the branch's "ArrayDeque.jml still
deleted" bullet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBFFnrhtvXiUeyxjmUc4R2
bernardladenthin pushed a commit that referenced this pull request Oct 21, 2026
…e spec-deletion re-try from TODO.md

close() takes bufferLock since the write/close fix, and a trim start or end
signal is released under that lock: a release() that waits for a read, write
or close of this buffer would hold close() on another thread behind it. The
Javadoc of close() and of the two add*Signal methods say so.

TODO.md's "on every OpenJML upgrade" bullet still asked to re-try dropping
"the two spec-file deletions"; since PR #188 (fixups v3) the setup action
deletes none. Both found by the review of PR #189.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VBFFnrhtvXiUeyxjmUc4R2

This branch had an error being deployed

1 failed and 1 active deployments
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.

2 participants