Skip to content

fix(join): hash the kit from stdin, and say what became of the install when a run again fails - #4973

Merged
devswha merged 3 commits into
mainfrom
fix/3983-join-hash-undo-lines
Nov 28, 2026
Merged

devswha merged 3 commits into
mainfrom
fix/3983-join-hash-undo-lines

Conversation

@devswha

@devswha devswha commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Refs #3983 (items 2/18, 12, 14, 23/24; the rest is fixed by #3995 or low/contrived, see the issue comment).

  • 2 / 18: j_sha256 in join.sh and the pasted line from kit.ts hash the kit's files from stdin instead of passing paths to sha256sum, so a temporary folder whose name holds a backslash no longer fails the check (it refused with exit 16).
  • 12: on a run again, the four failures after the earlier install was stopped (the copy of the kit's programs among them) now say that the install stays, stopped, and how to undo; the unused j_rollback is gone.
  • 23 / 24: the undo's "look first" line gives one ls -l /proc/<pid>/exe per pid (it printed ls -l /proc/1 2/exe) and names the (deleted) form.
  • 14: the README's sentence on cut-off answers now matches what j_whole checks.

Tests: scripts/join/join.local.test.ts (new, 3 cases, outside containers: a scratch HOME, a compiled stand-in herdr, failing systemctl/loginctl stubs) and a new case in scripts/join/kit.test.ts. On main they fail with exit 16 / the old copy refusal / ls -l /proc/221419 221425/exe; with the fix, 20 pass / 0 fail (15 s on old-desktop). sh -n under sh, dash, bash and busybox; scripts/conventions.test.ts; typecheck.

Changelog fragment included.

…y left, and give one look line per pid

Refs #3983 (items 2/18, 12, 14, 23 and 24).

- Items 2 and 18: sha256sum escapes a file name that holds a backslash or a
  line break and puts a backslash before the sum, so a TMPDIR whose path holds
  a backslash made the pasted line refuse join.sh (exit 16, "could not be
  fetched") and join.sh refuse SHA256SUMS (exit 16). Both now hash from stdin.
- Item 12: on a run again, a failure after the earlier server was stopped (the
  undo command, the folder, the copy of the kit's programs, the server's files)
  now says what became of the install, as the settings refusal already did:
  "the install stays, stopped (undo: ...)". A fresh join still removes it all.
- Items 23 and 24: the undo's look-first line gives one ls -l /proc/<pid>/exe
  per pid (a pid list in one path named no folder), and names the program's
  "(deleted)" form, which j_servers also takes for the trial's server.
- Item 14: the README says what the account read checks (the braces and the
  first field, not a parse) and what catches a body cut at a nested brace.

scripts/join/join.local.test.ts runs join.sh outside containers against a
scratch HOME, a stand-in herdr and failing systemctl/loginctl; its three cases
and the new kit.test.ts case fail on main.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 01726b1 and aa3bb32.

Files selected for processing: 6

  • changelog.d/join-backslash-tmpdir-undo-lines.md
  • scripts/join/README.md
  • scripts/join/join.local.test.ts
  • scripts/join/join.sh
  • scripts/join/kit.test.ts
  • scripts/join/kit.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devswha
devswha merged commit ff44073 into main Nov 28, 2026
25 of 27 checks passed
@devswha

devswha commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head aa3bb325e. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit said it did not review (a limit or a skip) since this head.

main moved but untouched: merged without update. Its new commits up to 34d94a2c5 change no file of this pull request, none imported by one, nothing that decides which checks run, and no core path.

Reviews: omo gate reviewer BLOCK on one MEDIUM test defect (join_ spawned join.sh attached to the runner's terminal, so the no-terminal case asked its question and timed out when run from a terminal); fixed in aa3bb32 (detached: true), one fix round; production change checked out (stdin hashing cannot accept a wrong file, dash/busybox portable, pasted line safely quoted, bun build --compile acceptable as windows-native.test.ts already does). Codex via axwith (gpt-6.2-sol--fast, xhigh) raised one HIGH (XDG_CONFIG_HOME inherited by join.sh under check fast); not reproduced: join_ passes a full env object, the file passes with XDG_CONFIG_HOME set to another folder, and inside check fast on old-desktop (scripts/join/join.local.test.ts exit 0; unit 30026 pass, 0 fail). The first Integration tests failure was list-join.contract.test.ts refusing an invite at the 15-minute exp boundary (exp_too_late), unrelated to the join kit; rerun.

@devswha
devswha deleted the fix/3983-join-hash-undo-lines branch November 28, 2026 12:59
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