Share one bun e2e toolchain module: 7 helpers are md5-identical across the 3 bun build suites and bun_toolchain drifted only in a suite name

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
66/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bun, rust
領域
testing, tooling

調査の方向性

Read the existing cargo_e2e_matrix and composer_e2e_common modules, then compare the helper copies in e2e_redirect_bun_build.rs, e2e_vendor_bun_build.rs, and mode_migration_bun.rs; also inspect e2e_bun_lockb for the noted tgz and file_mode helpers. Add the shared tests/bun_e2e_common/mod.rs and update the suites to use it. Done means each suite lists the same tests, the pinned Bun CI job passes with SOCKET_PATCH_BUN_E2E_REQUIRED=1, and the grep check finds one parse_bun_version definition.

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

説明

arch-audit refactor

[agent] Filed by the scheduled architecture audit (audit-cli-tests). Register: register.

Kind: refactor. Register ID: T70.

Problem: the three bun build suites each keep their own copy of the bun toolchain block. Each helper below hashes the same in all three files (md5 of the fn body with comments and whitespace stripped):

fn e2e_redirect_bun_build e2e_vendor_bun_build mode_migration_bun md5
bun_required L161 L147 L208 87d11bab
pinned_bun_version L166 L152 L213 f0a8041d
parse_bun_version L175 L161 L222 59beb239
expected_lock_version L202 L188 L249 302e2a61
fixture_install_args L216 L202 L263 f599907c
packages_line L621 L516 L612 9864c4c9
bun_toolchain L239-L276 L225-L262 L286-L321 three hashes; only the SKIP suite-name string differs
  • lock_version, build_tgz and make_tgz_from_installed are identical in redirect and vendor. mode_migration and e2e_bun_lockb inline a set_mtime(0) variant.
  • Copies: redirect L161-L276,`` vendor L147-L262,``` mode_migration L208-L321.````
  • The SOCKET_PATCH_BUN_E2E_REQUIRED gate lives in each copy, so this is also an instance of T50 (#1940).

Proposed change: create a tests/bun_e2e_common/mod.rs, in the same pattern as cargo_e2e_matrix and composer_e2e_common, with the helpers above. bun_toolchain(suite: &str) takes the suite name. Delete the three local copies, and include the module from the three suites (and from e2e_bun_lockb for the tgz/file_mode helpers).

Size: 4 test files plus 1 new module. About −300/+120 lines.

Acceptance criteria:

  • No product code changes.
  • The three bun suites list the same tests (cargo test --test <suite> -- --list --ignored).
  • They pass in the pinned bun CI job with SOCKET_PATCH_BUN_E2E_REQUIRED=1.
  • grep -n "fn parse_bun_version" crates/socket-patch-cli/tests returns one hit.
主要言語
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 を短くまとめたダイジェスト。