Repository navigation
Description
Summary
At 5f88402, the Clojure modules (libtmux-clojure and libtmux-clojure-core-async) get their tmux version behaviour from the Java engine, which keeps a capability table and publishes the root capabilities.json for the java port. The Clojure API appears in no manifest, the Clojure docs restate the version numbers by hand, the Clojure integration task bypasses the Java test quarantine, and no CI lane runs the facade against a daemon below the floor. This task asks the Clojure port to follow the conventions the older ports share for the capability manifest and test rules. The findings are read from the source, build files and workflows at that commit; no port code was run for this issue.
Motivation
The Rust, Go, Swift and TypeScript ports each keep one capability table that their gates read and that generates a root capabilities.json. Rust, Swift and TypeScript take the test tmux from LIBTMUX_TEST_TMUX and export a LIBTMUX_TEST_SANDBOX marker, and Ruby, Julia and PowerShell run CI lanes that must refuse each release below the floor. The shared capability-claims contract specifies that manifest, keyed by the documentation site's slug for the port, so the documentation can compare ports feature by feature.
The Clojure port has a documentation site section of its own, but a Clojure reader cannot see which facade functions need which tmux release, because the only manifest names Java classes. The three places that state the control floor in Clojure text can drift from the Java table. A run of the Clojure suite in a shell that exports LIBTMUX_SOCKET or LIBTMUX_SOCKET_PATH inherits both, and the suite uses the shared temporary root directly instead of a per-task subdirectory.
Evidence
-
The only manifest names Java. The root
capabilities.jsonis the Java port's: itscontrol-modeentry listsServer.controlandControlClient.attachand namesUnsupportedFeatureException, and itsportisjava. The Clojure facade surfaces the same refusal as anex-infowith:tmux/error :tmux/unsupported-feature(control.clj), which no manifest names. -
The Clojure module holds no version table, only text. The control floor is stated in the
libtmux.controldocstring ("Control needs tmux 3.7 or newer"), in the README ("control streaming requires tmux 3.7 or newer") and in the test helpercontrol_gate.clj. The refusal itself comes from Java: the helper callsControlAcquisition.supports, which readsCapabilities.CONTROL_MODE. Nothing compares the three statements with the Java table. -
The Clojure suite takes the tmux binary from a Gradle property and skips the quarantine.
clojureIntegrationTestremovesTMUXandTMUX_PANE, setsTMUX_TMPDIRto the fixed/tmp/libtmux-java-test, and passes-PlibtmuxTmuxBinaryas thelibtmux.tmuxsystem property, whichfixture.cljreads;LIBTMUX_TEST_TMUXis not read. The Java build has a quarantine convention that clearsTMUX,TMUX_PANEandLIBTMUX_SOCKET*, gives each task a private owner-only directory and fails the build on a leaked server, but it applies to everyTesttask and only to aJavaExectask that callsquarantineTmux, and onlymodule-testsdo. The Clojure task therefore keepsLIBTMUX_SOCKETandLIBTMUX_SOCKET_PATHin its environment, uses the shared root directly, exports noLIBTMUX_TEST_SANDBOXmarker and does not refuse to run without one. The workflow's final step counts survivingtmuxprocesses on the whole runner instead. -
No lane refuses an older daemon through the facade. The Java matrix runs refusal lanes (
tmux-matrix.yml), but the classes it runs are the Java and Scala ones inintegration-tests/build.gradle.kts. The Clojuretmuxjob inclojure-compatibility.ymlbuilds only the matrix releases, so nothing shows thatlibtmux.corerefuses3.2aor3.3without effect.
Proposal
Follow the older ports' conventions, as three changes that can land separately.
- Publish a
capabilities.jsonfor the Clojure port (schemalibtmux-capabilities/1,portset to the documentation slug for Clojure) whoseapisanderroruse the names the generated Clojure API reference spells. Generate it from the Java capability records plus a Clojure-side map from each facade var to the capability it needs, with a drift check that fails when the file differs from that data and a negative test that fails when a mapping is removed. The contract puts the manifest at the repository root, where the Java manifest already sits, so where a second manifest lives in this repository needs a decision. Have a check compare the control floor in the docstring, README and test helper with the table. - Match the test rules for the Clojure suite: honour
LIBTMUX_TEST_TMUXas the default for-PlibtmuxTmuxBinary; runclojureIntegrationTestunder the same quarantine as theTesttasks, soTMUX,TMUX_PANE,LIBTMUX_SOCKETandLIBTMUX_SOCKET_PATHare cleared andTMUX_TMPDIRis a private, owner-only directory whose socket paths stay under 100 bytes; exportLIBTMUX_TEST_SANDBOXand refuse to run without it. - Add a floor-refusal lane to the Clojure workflow that builds 3.2a and 3.3, plus 3.0a and 3.1c behind a 3.3a client, and asserts the facade refuses each without effect. The 3.8 lane is already asked for in issue 151 and is not repeated here.
References
- Issue 151 finding 13 asks for a tmux 3.8 lane in the Clojure matrix. It does not cover the manifest, the test variables, the quarantine or the refusal lanes.
- Issue 121 (closed) asked for a sandbox for the Java test suites under the six-point contract the other ports follow.
- Capability table with
since, handling, APIs and commands, and the test that keepscapabilities.jsonequal to it: libtmux-rs, libtmux-go, libtmux-swift and libtmux-ts. - Test rules: libtmux-rs
CONTRIBUTING.mdforLIBTMUX_TEST_TMUXand its sandbox runner. - Floor-refusal lanes: libtmux-ruby
compatibility.yml, libtmux-juliajulia.ymland libtmux-powershellci.yml.
Activity