Skip to content

Raise the script-cleanup changes to 9.5/10 #113

Open

Description

@tony

Summary

A fresh review of the support-script cleanup commits on master (0f1aa38~1..04b936c, the Lua ports, the Lua integration harness and Runtime:start_server from #103) scored 13 dimensions. Twelve applied and none reached 9.5/10. Freshness fell to 7.5, and Examples, Async correctness, Data sourcing and Readability to 8.0, all below the 8.5 gate. One policy check failed: shell programs remain in docs.yml and ci.yml. Close this issue when a new review of these changes scores every applicable dimension at 9.5 or higher and every policy check passes.

Motivation

Scores, with the evidence for each. MCP is N/A: the commits changed no MCP tooling.

Dimension Score Evidence
Freshness 7.5 The docs workflow fails on every master push since 2585dc9 with "Invalid complete Lua examples: unexpected launcher path": daac280 dropped setup.launcher from examples/api/manifest.json, and libtmux/docs lua-examples.ts still requires it. libtmux/docs port-heads.yml still runs python docs-generator/scripts/bootstrap_native.py luals and export-docs, both deleted here. #106 is open with one unchecked task and an unmet acceptance line.
Examples 8.0 Every example starts and stops its own server and none shells out, but the docs build that publishes them is red for the reason above. They default to /usr/bin/tmux (#109).
Async correctness 8.0 support/proc.lua kills only the direct child on timeout. Under nvim -l with vim.uv for luv, proc.run({"/bin/sh", "-c", "sleep 8 & sleep 8"}, {timeout = 1}) returned after 8.0 seconds with timed_out = true, because the backgrounded sleep held stdout open. The mid budget of check.lua bounds nothing in that case.
Data sourcing 8.0 a879ff6 ("8235 event, scope, ref, option and NEEDS inputs"), 8dc4642 ("byte-identical except exporter.name"), d3e9567 and cba7633 ("4 of 60 Python runs and 1 of 60 Lua runs") report comparisons against deleted Python with no command or SHA.
Readability 8.0 scripts/check_editor/script.lua M.build is 204 lines, scripts/check/gates.lua M.steps 181, and scripts/ci_plan/tests/test_ci_plan.lua 1380.
DX 8.5 Every script has a README, but any script test needs a LuaJIT built from source with CMake first, and the CI step "Run offline gates" does not say which gate it runs.
Language idioms 8.5 support/shell.lua builds a shell string for io.popen and reads the exit status from a printf sentinel. Its header says it is for scripts that have no luv yet; SCRIPTS.md records no exception.
Docs 8.5 The root README quick start calls Runtime:start_server, which the published rock lacks (#108).
Scannability 8.5 scripts/ci_plan/README.md has an 11-line prose block.
Async, control, streaming 8.5 support.proc returns output only when the child ends.
AI use 8.5 AGENTS.md links SCRIPTS.md but does not say the scripts are Lua on LuaJIT or where the gates live.
tmux fidelity 9.0 start_server checks sun_path and the integration gate ran 3.3a to next-3.9; the examples hard-code /usr/bin/tmux (#109).

Policy check that failed:

  • Right language: no *.py or *.sh is tracked and no test starts sh -c, but docs.yml keeps the bash identity job, and ci.yml holds shell programs in run: | steps: interpreter selection with nested if, the tool-identity brace group, and the release check with a source_args array. SCRIPTS.md lets a workflow keep run: lines that call one command.

Proposal

  • Merge ci(docs) Pin the docs workflows to libtmux/docs a76b1a3b8 #111, make lua-examples.ts in libtmux/docs accept a manifest without setup.launcher, point port-heads.yml at luajit scripts/docs/docs.lua export after the Lua bootstrap, and confirm docs is green at the master head.
  • Start the child in its own process group in support.proc and kill the group on timeout, or close the read pipes when the timer fires, with a test that backgrounds a sleep.
  • Move the docs.yml identity job onto the shared port-docs.yml as Clean up support scripts under SCRIPTS.md #106 plans, and turn each shell step of ci.yml into one scripts/ Lua command called by a single-line run:.
  • Record the support/shell.lua exception in SCRIPTS.md with what the bootstrap measured, or replace the io.popen string with LuaJIT FFI posix_spawn.
  • Put the old-script SHA and the comparison loop behind each "identical output" claim in the closing comment of Clean up support scripts under SCRIPTS.md #106.
  • Split M.build, M.steps and test_ci_plan.lua by concern.
  • Name the gate in the "Run offline gates" step, and add one line to AGENTS.md naming LuaJIT, scripts/<name>/ and check.lua.
  • Mark the README quick start with the release that ships start_server, and close Clean up support scripts under SCRIPTS.md #106 once its last task lands.

References

Activity

  1. tony commented on Nov 16, 2026

    @tony
    ContributorAuthor

    Pushed to master. At 546dc53, CI (run 43807853368, 12 of 12 jobs) and docs (run 43807853772) pass. The first push, 52be855, failed in plan: identity.lua required support.proc at load, which needs luv, and the plan and required jobs install only the dev rocks. 546dc53 loads it only when a command runs and adds a test that fails on the earlier file.

    Commits per item:

    • docs workflow and port-heads.yml: wave items on the docs branch. docs passes at cfd0622, 52be855 and 546dc53 since ci(docs) Pin the docs workflows to libtmux/docs a76b1a3b8 #111 merged; libtmux/docs port-heads.yml still calls the deleted Python entry points.
    • support.proc timeout: 16e132d starts a child with a timeout as a process-group leader, kills the group, and stops reading the pipes when the timer fires. Both new tests fail on the old file: sleep 3 & sleep 3 with a 0.3 s timeout took 3.00 s, and sleep 30 & ... took 30.00 s.
    • [~] Shell in workflows: ci.yml and the lua-tools action now have only single-command run: steps (9fa870e), using bootstrap.lua select-lua (77d2a5e) and ci_plan.lua identity (4ab3ff2, 546dc53). test_ci_workflow.lua reports any run: | block with more than one command, and it flagged seven steps on the old file. Still open: the docs.yml identity job (it moves onto the shared port-docs.yml, a docs-repo change) and the shell steps of publish.yml and docs-preview-cleanup.yml, which this review did not name.
    • shell.lua exception: b81f35f records it in SCRIPTS.md with the measurement (mise exec -- lua -e 'print(pcall(require, "luv"))' and the same for ffi print false on Lua 5.5.1). Scripts that still call shell.lua after the bootstrap: support/runtime.lua, docs/export.lua, release/release.lua, package/package.lua, generate/fields.lua and generate/render.lua; they move to support.proc as a follow-up.
    • [~] Comparison claims: the old-script SHAs, harnesses and rerun counts for the ci_plan and docs export ports are in a comment on #106, linked from the READMEs (52be855). Not re-measured: the release and package comparison of d3e9567 and the "4 of 60 Python runs and 1 of 60 Lua runs" of cba7633.
    • Long functions: a6793e8 splits M.steps, 0209799 splits M.build, 21d6783 splits test_ci_plan.lua (same 93 tests, same names). The steps of all 11 gates and the editor document are identical before and after.
    • Gate named, AGENTS.md line: the gate step is "Run the gate" in 9fa870e; 097568a adds the Lua line.
    • [~] README quick start: d6ed98d says start_server ships after 0.1.1-1. Clean up support scripts under SCRIPTS.md #106 stays open for the docs-workflow task.
  2. tony commented on Nov 16, 2026

    @tony
    ContributorAuthor

    Pushed to master; CI (run 43835382591) and docs (run 43835382651) pass at b8c2143. The first push (845f0b6) failed Outer current and Outer floor on three luacheck warnings in the new code, fixed in b8c2143.

    The leftover shell steps named in the earlier comment are done:

    • publish.yml: 6cba76d adds main.lua upload and github-release (pure command builders, support.proc to run them, tests with an injected runner that fail on the old release.lua), and 845f0b6 switches the two bash steps to them. The artifacts are named from the version in place of a dist/* glob, an empty LUAROCKS_API_KEY stops before luarocks runs, and the job installs the live rocks for luv.
    • docs-preview-cleanup.yml: cf43070 adds docs.lua delete-preview (refuses a non-numeric number or an unset bucket before it starts aws), and 845f0b6 runs it after a checkout and the Lua tools. The workflow runs on pull_request_target, so it builds the base branch's script.
    • 845f0b6 also adds a test_ci_workflow case that reports any step of those two files with more than one command; it names both publish.yml steps on the old file.

    publish.yml runs only for a pushed tag and the cleanup only when a pull request closes, so neither workflow ran in this CI. The script commands were run by hand with a stand-in aws, and the tests cover the rest.

    Still open: the docs.yml identity job and its bootstrap steps (they move onto the shared port-docs.yml, a libtmux/docs change), and the other items listed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions