Recursos
18Instal·la
npx skillscat add unixwin/rubash Instal·la des del registre de SkillsCat.
Rubash GNU Bash Compatibility Skill
Scope
Use this skill for GNU Bash 5.2.21 compatibility work in this repository. Fix semantic owners, not individual expected-output lines or upstream bridge artifacts.
Required evidence
- Read the compatibility plan, suite diff analysis, issue ledger, and GNU source map before editing.
- Compare script files with WSL GNU Bash 5.2.21. The authoritative verdict is:
MSYS_NO_PATHCONV=1 wsl bash tests/gnu-compat/run-83.sh check <NAME>. - Keep raw outputs under
target/issue-suites/results/; record interpretation indocs/. - Record the GNU source/test body, Rust semantic owner, minimal probe, exit status, stdout, stderr, and timeout before claiming a fix.
- Never use Git Bash, the winuxsh
bashshim, raw.rightparity, or relay output as the sole baseline.
Shared-tree handoff rules
- Read the current tree before editing. Do not stash, reset, or overwrite another agent's work.
src/lexer/continuation.rsis captain-exclusive; send proposed changes instead of editing it.- Every edit must leave
cargo buildclean. Do not leave debug prints, partial migrations, or generated junk. - Agents report files, ownership, before/after counts, and verification; the captain groups commits.
- Do not regenerate expected outputs unless a fresh WSL GNU capture proves the old artifact is stale. Label environment/shim artifacts explicitly.
- Check for stuck
rubash.exe,bash.exe, suite runners, andcargoprocesses after bounded tests.
Known footguns
- Pin
*.shand*.rsto LF; if CRLF appears, use Git normalization rather than patching scripts. - WSL interop does not reliably forward arbitrary Linux environment variables to Windows children; use
WSLENV=PATHwhere required and prefercurrent_exe()forTHIS_SH. - Do not use
wsl bash -cfor multi-level quoting or doubled backslashes; pass a script file. - Never put backticks or
$()in commit messages; write a message file and usegit commit -F. - Verify
git add, commits, and pushes withgit diff --cached,git log, and remote status; shims may swallow output. - A failed push is not a successful handoff. Report the exact transport error and leave the local commit state visible.
Globstar handoff
The current high-value globstar evidence is target/multi-gnu.out, target/multi-rub.out, and target/multi-diff.txt; preserve the verified adjacent-collapse, trailing-slash, and single-** fast paths while investigating multiplicity. Do not claim completion without an authoritative check globstar PASS.
Casemod handoff
For bare associative expansions such as AA1^^ and ([FOO]=BAR), compare against the matching GNU subst.c path and a minimal WSL script before changing expansion routing. Treat environment-sized declare -p differences as harness artifacts unless a constrained environment reproduces them.
Identity persona disclosure (rubash#154)
The engine answers uname/arch itself (hidden fast-path builtins — full
coreutils option parsing; type still reports them like external commands).
Identity is a persona, selected by RUBASH_IDENTITY:
- default (no variable / any value other than
native): MSYS2-compatible
—uname -s=MSYS_NT-<winver>(prefix followsMSYSTEM:MINGW64_NT-/UCRT64_NT-/…),uname -m/arch= build arch,uname -r= Windows version (10.0-19044),uname -o=Msys,OSTYPE=msys,MACHTYPE=<arch>-pc-msys. This is a compatibility mask
for the MSYS/Cygwin script ecosystem, not a claim of being an MSYS2 port. RUBASH_IDENTITY=native: honest-native —uname -s=Windows_NT,uname -o=Windows,OSTYPE=windows,MACHTYPE=<arch>-pc-windows.
Query the active persona and effective values with rubash --identity;rubash --help carries the same disclosure. Agents diffing output against
WSL GNU Bash must remember the WSL baseline reports linux-gnu/Linux —
identity-driven lines (uname, OSTYPE, MACHTYPE) are persona-owned, not
engine bugs.