-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add Rust code translation of start-command CLI #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #38
Move all JavaScript source files, tests, scripts, and experiments into a dedicated js/ folder to prepare for Rust implementation. - Move src/ to js/src/ - Move test/ to js/test/ - Move scripts/ to js/scripts/ - Move experiments/ to js/experiments/ - Update package.json paths - Update eslint.config.mjs paths - Disable no-unused-vars for test and experiment files This prepares the codebase for adding a parallel Rust implementation in a rust/ folder. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Translate the JavaScript CLI tool to Rust with full feature parity: - args_parser.rs: Command-line argument parsing - substitution.rs: Natural language command substitution (.lino files) - user_manager.rs: User isolation management - isolation.rs: Process isolation (screen, tmux, docker, ssh) - failure_handler.rs: GitHub issue auto-reporting All 42 unit tests pass. The Rust implementation maintains simplicity and correctness as requested, avoiding premature optimizations. Also includes case study documentation in docs/case-studies/issue-38/ Closes #38 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update all script and source file paths in the GitHub Actions workflow to point to the new js/ directory structure: - scripts/*.mjs → js/scripts/*.mjs - src/bin/cli.js → js/src/bin/cli.js - test/*.test.js → js/test/*.test.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit 2defe9a.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Please double check tree of files, we still have some JavaScript related files that are left in the root of the repository. I want clear separation, JavaScript related files go to Ensure all changes are correct, consistent and fully meet the requirements. |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-29T19:06:27.252Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Move all JavaScript-related configuration files into the js/ folder for cleaner separation between JS and Rust implementations: - Move package.json, package-lock.json, bun.lock to js/ - Move eslint.config.mjs, .prettierrc, .prettierignore to js/ - Move bunfig.toml to js/ - Move .changeset/ to js/ - Update .husky/pre-commit to cd into js/ before running lint-staged - Update CI workflow with working-directory: js for all JS-related steps - Update package.json paths to be relative to js/ folder - Fix cli.js package.json import path .husky/ remains at root as it needs to be in the git hooks location. All JavaScript tests pass (22/22). Rust tests pass (42/42). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes MadeI've addressed the feedback about JavaScript files remaining at the repository root. Here's what was moved: Files moved to
|
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
I asked to keep these in the root of repository: Also rust version should have it's own tests. Also for Rust we should have https://github.com/link-foundation/rust-ai-driven-development-pipeline-template used, (scripts) will be shared with https://github.com/link-foundation/js-ai-driven-development-pipeline-template. But instead of single release.yml, we now should have js.yml and rust.yml workflows. |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-29T19:55:24.471Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Changes: - Move scripts/ and experiments/ to repository root (shared) - Add separate js.yml and rust.yml workflows - Remove single release.yml in favor of language-specific workflows - Add Rust integration tests in rust/tests/ - Add changelog.d/ for Rust changelog fragments - Update js/package.json paths to reference root scripts - Update scripts to support --working-dir and --type parameters Repository structure: - js/: JavaScript implementation - rust/: Rust implementation with src/, tests/ - scripts/: Shared CI/CD scripts - experiments/: Shared experiments - changelog.d/: Rust changelog fragments - .github/workflows/: js.yml and rust.yml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Apply cargo fmt to fix formatting issues that were caught by CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes: - Fix unused variable warnings (prefix with underscore) - Replace map_or with is_ok_and for better idiomatic code - Add #[derive(Default)] where appropriate instead of manual impl - Remove redundant trim() before split_whitespace() - Use next_back() instead of last() on DoubleEndedIterator - Use iter().flatten() instead of manual if let pattern 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Skip test_get_current_user_groups on Windows since `groups` command is Unix-specific - Add admin/staff groups to test_group_exists check for macOS compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Try getent first (Linux-specific) - Fall back to dscl command for macOS support - This fixes the test_group_exists failure on macOS CI 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Summary
This PR translates the JavaScript
start-commandpackage to Rust, creating a complete Rust implementation that mirrors the JavaScript API. It also reorganizes the repository structure per feedback.Changes
Rust Implementation
args_parser.rs- Command-line argument parsingsubstitution.rs- Natural language command substitution engineuser_manager.rs- User creation/isolation management (cross-platform)isolation.rs- Command isolation with loggingfailure_handler.rs- Git clone suggestions on command failuremod.rs- Public library interfaceRepository Structure (per feedback)
scripts/andexperiments/to root - Shared between JS and Rust implementationsrust/tests/folder - Integration tests for Rust implementationjs.ymlandrust.ymlinstead of singlerelease.ymlCI/CD Workflows
js.yml- JavaScript CI/CD with detect-changes, changeset check, lint, test, and release jobsrust.yml- Rust CI/CD with detect-changes, changelog check, lint, test, build, and release jobsscripts/folderRust Features
START_DEBUG=1environment variableFiles Changed
rust/tests/integration_test.rs.github/workflows/rust.yml.github/workflows/release.yml→.github/workflows/js.ymljs/scripts/*→scripts/js/experiments/*→experiments/changelog.d/README.md(Rust changelog fragments)bump-version.mjs,collect-changelog.mjs,detect-code-changes.mjs,get-bump-type.mjs,merge-changesets.mjsTest plan
cargo build --releaseproduces working binaryFixes #38
🤖 Generated with Claude Code