Decide (post-v5): fix/undo/sync command model and exit 0 when there is nothing to undo

オープン
#1,352 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
12/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
活発
技術スタック
cli, rust
領域
cli

調査の方向性

This is a design decision, not a ready change: the maintainer must first settle the new command model and the exit codes for an empty project. Read the per-command table in #1088 and the tests the issue names (in_process_rollback_hosted.rs, mode_migration_vlt.rs, e2e_redirect_vlt_build.rs around L1185-1210). Done means a maintainer decision is recorded, and only then can the tests that pin exit 1 be updated.

索引モデルが issue の本文から書いたものです。

説明

agent:needs-human agent:triaged arch-audit priority:p3 refactor ux

[agent] Split out of #1088. The maintainer's 2026-10-09 triage narrowed #1088's v5 scope to "a bare scan/get keeps the project's mode" (PR #1317). The other two questions from #1088 are not release requirements, so they are tracked here, without v5-blocker.

Q1, option 3: new command model (next major)

New Replaces
read-only scan today's scan --dry-run
fix [TARGET…] [--mode M] scan (write) and get
undo [TARGET…] rollback, remove and vendor --revert
sync apply, repair and scan --prune
check apply --check and vendor --check

The old verbs would stay as aliases for one major. This is blocked by the C11/C12 engine split (#843, #894). See #1088 for the full rationale (register C34).

Q2: "nothing to undo" exits differently per command (register C74)

On a project with no patch state (a fresh project, or one that a full rollback just emptied), list, apply and vendor --revert exit 0, but rollback and repair exit 1 (manifest_not_found, and rollback uses the legacy {"status":"error","error":"Manifest not found"} shape). So a second rollback exits 1. #1088 has the per-command table and repro.

The proposal (#1088 option A):

  • rollback on an empty project returns status: success with zero counts.
  • repair on an empty project matches apply (noManifest, exit 0).
  • remove <target> with no match keeps exit 1 (not_found).

Tests that pin today's exit 1: in_process_rollback_hosted.rs, mode_migration_vlt.rs, e2e_redirect_vlt_build.rs (L1185-1210) and the covgap rollback/repair suites.

Both parts need a maintainer decision before implementation.

主要言語
Rust
スター
9
フォーク
2
平均マージ
20時間 47分
マージ済み PR(30日)
681

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SocketDev/socket-patch のほかの issue

SocketDev/socket-patch の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。