feat(cli): support runok migrate command to auto-convert deprecated sandbox fs config#252
feat(cli): support runok migrate command to auto-convert deprecated sandbox fs config#252
runok migrate command to auto-convert deprecated sandbox fs config#252Conversation
intent(migrate): provide a migration command so users can automatically update deprecated sandbox fs config (writable/deny → write.allow/write.deny) instead of manually rewriting YAML decision(migrate): line-based text processing over YAML AST rewriting — preserves comments and formatting without adding a new dependency, and the transformation is simple enough (2 key renames with re-indenting) decision(migrate): reuse DefaultConfigLoader's file discovery logic via new find_config_paths() method — ensures migrate targets the same files as exec/check, with -c/--config for explicit path override
intent(migrate): prevent unintended file writes by showing diff preview and asking for confirmation before applying changes, matching the init wizard's UX pattern decision(migrate): reuse init's Prompter trait and -y flag for consistency with existing interactive workflows intent(migrate): follow local extends references so preset files with legacy sandbox fs config also get migrated decision(migrate): skip remote extends (github:, https://) since those files are not user-editable
intent(migrate): reduce output noise — only show files that need migration, with "Already up to date." when nothing needs changing
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant quality-of-life improvement for users by providing an automated migration tool for deprecated configuration formats. It addresses the tedium of manual configuration updates, particularly for complex setups involving multiple files and extended configurations. The new Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #252 +/- ##
==========================================
- Coverage 89.74% 89.50% -0.24%
==========================================
Files 50 52 +2
Lines 10489 10730 +241
==========================================
+ Hits 9413 9604 +191
- Misses 1076 1126 +50
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
intent(migrate): fix bug where is_child_line unconditionally consumed blank lines and comments regardless of indentation, corrupting formatting when these appeared between sibling YAML blocks decision(migrate): treat only truly empty lines as ambiguous children; comments are now checked by indentation like regular lines intent(loader): reduce duplication in find_config_paths by extracting a closure for the repeated find_config pattern intent(test): parameterize simple single-file migration tests per CLAUDE.md convention
intent(migrate): fix bug where deny appearing before writable produced duplicate write: keys, silently dropping deny rules when parsed by most YAML implementations intent(migrate): add missing blank line handling in deny continuation loop (matching the writable handler's fix)
intent(docs): follow CLAUDE.md convention requiring PR links in release notes headings
Why
writable/deny) must manually rewrite their YAML config filesfs.read/fs.writesub-section format, but no automated migration tool was providedWhat
runok migratesubcommand to auto-convert the legacy format to the new formatRunrunok migrate`` hint to the deprecation warning so users discover the command