Skip to content

Build shadowcode before cargo test so Native Linux release can verify - #3

Closed
Shadowfetchapps wants to merge 7 commits into
mainfrom
cursor/fix-native-release-verify-077b
Closed

Shadowfetchapps wants to merge 7 commits into
mainfrom
cursor/fix-native-release-verify-077b

Conversation

@Shadowfetchapps

@Shadowfetchapps Shadowfetchapps commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Cause

Native Linux release for tag v0.21.0 failed in Verify native source (run 35605675739). qualification_real required target/debug/shadowcode before cargo test built it.

Native desktop on this PR then failed after that ordering fix:

  1. Run 35608824340: attach_close_loop_does_not_grow_descriptors — descriptor leak: baseline=39 after=64 from process-wide /proc/self/fd while other control tests ran in the same binary.
  2. Run 35611464742: CLI harness still required ShadowCode 0.20.0; binary printed 0.21.0.
  3. Run 35612626146: cargo test and CLI passed. Step Exercise the native window failed at scripts/test-native-desktop.mjs:944 (Window can close after its owner exits timed out). ViewClient::reattach() held the attach mutex across a 20s wait_available.
  4. Run 35614403801 job 106381282983: cargo test, CLI, and the window suite passed. Step Build native development packages with dependency notices failed after the type2-runtime Docker build:
Using sanitized packaging PATH: .../target/release:.../target/debug:/opt/hostedtoolcache/node/22.23.2/x64/bin:/usr/bin:/bin:/usr/sbin:/sbin
...
Error: spawn rustc ENOENT
  path: 'rustc'
  spawnargs: [ '--version', '--verbose' ]
  cmd: 'rustc --version --verbose'

applicationNotices() in scripts/native-notices.mjs records the compiler for dependency notices. applyPackagingPath omitted rustup/CARGO_HOME, so rustc was gone while /usr/local/bin (Hermes) stayed correctly excluded.

Fix

  1. Build -p shadowcode-desktop before cargo test in release.yml and native.yml.
  2. Move the descriptor loop into control_descriptors.rs.
  3. Read --version from src-tauri/tauri.conf.json in the CLI/runtime harnesses.
  4. Stop holding the attach lock while waiting for a missing owner; close() sets a closing flag so reconnect aborts immediately.
  5. Keep CARGO_HOME/bin, ~/.cargo/bin, and any already-safe PATH directory that contains rustc/cargo on the sanitized packaging PATH. Still reject /usr/local/bin, /snap/bin, and Hermes.

No version, tag, or release-artifact changes.

Local verification

  • Isolated qualification_real without a prior desktop build: same missing-binary assertion as v0.21.0.
  • Isolated descriptor test: 17 → 17. Remaining plus new control suite: 13 passed.
  • node scripts/test-native-cli.mjs passed (21 scenario groups).
  • Close-during-reattach test plus existing reattach/owner-exit tests pass.
  • node --test scripts/test-native-packaging-env.mjs: 3 passed, linuxdeploy scan skipped (no cached AppImage).
  • After a dirty caller PATH (/usr/local/bin:/snap/bin:/usr/bin:/bin), sanitized PATH still runs rustc --version --verbose and cargo --version, and does not include /usr/local/bin or .hermes.

The full WebDriver window suite and build-native.mjs package step are not re-run in this environment. Native desktop CI is the check.

After merge

This PR does not publish v0.21.0. After Native desktop is green and the PR is merged, Robert must re-run the failed Native Linux release workflow or retag v0.21.0 onto a commit that includes this fix. Do not merge from this agent; do not retag from this PR.

Open in Web Open in Cursor 

qualification_real spawns target/debug/shadowcode, which cargo test
does not produce. Native Linux release v0.21.0 failed Verify native
source with that missing-binary assertion.

Co-authored-by: Bob Corbin <ShadowfetchLinux@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: d426d194-ca36-4981-bb65-88b37bfb9790


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

Comment @coderabbitai help to get the list of available commands.

@Shadowfetchapps
Shadowfetchapps marked this pull request as ready for review September 21, 2026 13:51
cursoragent and others added 6 commits September 21, 2026 13:55
Those tests looked for target/debug/shadowcode, which cargo test does
not produce. Point them at a same-crate shadowcode-engine bin so
`cargo test --workspace --locked` builds it first on a clean checkout.

Co-authored-by: Bob Corbin <ShadowfetchLinux@users.noreply.github.com>
Native desktop CI failed attach_close_loop_does_not_grow_descriptors
with descriptor leak: baseline=39 after=64. Isolated runs stay flat;
the test reads /proc/self/fd for the whole process while other control
tests run in the same binary. Move it to its own integration crate.

Co-authored-by: Bob Corbin <ShadowfetchLinux@users.noreply.github.com>
Native desktop verify reached the CLI harness after cargo test passed.
test-native-cli.mjs still required ShadowCode 0.20.0; the 0.21.0 binary
prints 0.21.0. Use the packaged version so the next bump does not stall.

Co-authored-by: Bob Corbin <ShadowfetchLinux@users.noreply.github.com>
Native desktop timed out at "Window can close after its owner exits".
reattach() held the attach lock for up to 20s in wait_available, so
desktop_quit/close() could not detach. Release that lock while waiting
and abort reconnect when close starts.

Co-authored-by: Bob Corbin <ShadowfetchLinux@users.noreply.github.com>
Native desktop failed after the window suite: applicationNotices
spawns rustc --version --verbose, but applyPackagingPath only kept
target/, Node, and /usr/bin. Add CARGO_HOME, ~/.cargo/bin, and any
safe PATH directory that already has rustc/cargo. Still reject
/usr/local/bin and Hermes.

Co-authored-by: Bob Corbin <ShadowfetchLinux@users.noreply.github.com>
@Shadowfetchapps
Shadowfetchapps deleted the cursor/fix-native-release-verify-077b branch September 28, 2026 23:47
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