Skip to content

feat(cli): support runok migrate command to auto-convert deprecated sandbox fs config#252

Merged
fohte merged 6 commits intomainfrom
fohte/config-migration-command
Mar 25, 2026
Merged

feat(cli): support runok migrate command to auto-convert deprecated sandbox fs config#252
fohte merged 6 commits intomainfrom
fohte/config-migration-command

Conversation

@fohte
Copy link
Copy Markdown
Owner

@fohte fohte commented Mar 21, 2026

Why

What

  • Add runok migrate subcommand to auto-convert the legacy format to the new format
  • Add a Run runok migrate`` hint to the deprecation warning so users discover the command
runok migrate            # auto-discover config files
runok migrate -c foo.yml # target a specific file
runok migrate -y         # apply without confirmation

Open with Devin

fohte added 3 commits March 20, 2026 02:43
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
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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 migrate command streamlines the transition to newer config schemas, ensuring a smoother user experience and reducing potential errors during upgrades.

Highlights

  • New runok migrate CLI Command: Introduced a new command-line utility, runok migrate, designed to automatically convert deprecated configuration syntax to the latest format. This command aims to simplify the update process for users.
  • Automated Sandbox FS Configuration Migration: Implemented logic to automatically convert the legacy sandbox fs configuration fields (writable and deny) to the new write.allow and write.deny sub-section format, preserving comments and formatting.
  • Enhanced Deprecation Warning: Updated the deprecation warning for the old sandbox fs format to include a direct hint, advising users to run runok migrate for an automated update.
  • Flexible Configuration File Discovery: The migrate command can auto-discover relevant configuration files (global, project, and local extends targets) or target a specific file via the --config flag, ensuring comprehensive migration.
  • Interactive Migration with Diff Preview: The migration process includes an interactive prompt with a diff preview, allowing users to review and confirm changes before they are applied, with an --yes flag for non-interactive execution.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 78.51240% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.50%. Comparing base (1706f2e) to head (729442b).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/config/loader.rs 0.00% 18 Missing ⚠️
src/migrate/mod.rs 83.83% 16 Missing ⚠️
src/main.rs 16.66% 10 Missing ⚠️
src/migrate/sandbox_fs.rs 92.79% 8 Missing ⚠️
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     
Flag Coverage Δ
Linux 89.25% <78.51%> (-0.27%) ⬇️
macOS 90.87% <78.51%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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
devin-ai-integration[bot]

This comment was marked as resolved.

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)
devin-ai-integration[bot]

This comment was marked as resolved.

intent(docs): follow CLAUDE.md convention requiring PR links in release
  notes headings
@fohte fohte merged commit 3dccd3e into main Mar 25, 2026
10 checks passed
@fohte fohte deleted the fohte/config-migration-command branch March 25, 2026 00:19
@fohte-bot fohte-bot Bot mentioned this pull request Mar 20, 2026
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