Skip to content

Two more tools stale after the &str/D22 drift (migrate_method_arg_moves, migrate_seams) #1073

Closed

Description

@eas4ai

Same drift signature as #1069 (verified with the seed at 450733e; audit also confirmed under stage2 — see probe logs). Both are one-shot migration tools, so impact is lower than #1069's set, but both are committed and do not compile under canonical with run:

tools/migrate_method_arg_moves.w — D22 view/move strictness at every layer (fact views into str params, loop-carried values consumed then reused, sort mutating offsets while viewed):

error: cannot take ownership of a non-Copy field through a borrow (str is not Copy); borrow the field, clone it, or restructure so the owner transfers it (D22 §13.6) — call argument
 --> tools/migrate_method_arg_moves.w:44:32
44 |         let path = source_path(fact.path)
error: comparison operands must have compatible types
 --> tools/migrate_method_arg_moves.w:47:16
47 |             if old.path == path and old.offset == fact.start:

The diagnostic design itself (refuse-on-unrelated-error, token-boundary validation, last-use-only application) reads sound — needs a mechanical view-semantics port, not redesign. Minor: --from-tsv (:247) reachable only as positional spelling, undocumented in the :208 usage line.

tools/migrate_seams.w — &str into str param:

error: wrong argument type in call to 'argv_append'
 --> tools/migrate_seams.w:78:31
78 |     var cmd = argv_append("", compiler)
  = label @78:31 argument expression 'compiler' has type &str
  = note: parameter 'arg' expects str

Evidence: .audit/modules/tools__migrate_{method_arg_moves,seams}.w.md, .audit/probes/tools_migrate_*/

Activity

  1. ehartford commented on Sep 16, 2026

    @ehartford
    Contributor

    Review: reproduced

    Verdict. Reproduced: both tools fail to compile under with run, each with the reported error. Same &str/D22 drift as #1069 — code written before the read-only ABI flip that passes &str/field views where owned str is expected. One-shot migration tools, so impact is low, but both are committed and dead.

    Tested.

    Source main @ 5809ac1 (2026-09-14); both tools predate 450733e
    Compilers with v0.15.2.1 built from 5809ac1 (staging worktree); a compiler built from 450733e with the nightly-20260903 seed (migrate_seams spot-checked, same error)
    Platform macOS Darwin 25.6.0 arm64

    with run tools/<t>.w ..., HEAD:

    • tools/migrate_method_arg_moves.w: cannot take ownership of a non-Copy field through a borrow (str is not Copy) ... (D22 §13.6) at :44 (let path = source_path(fact.path)), then comparison operands must have compatible types at :47 (a &str vs str compare).
    • tools/migrate_seams.w: wrong argument type in call to 'argv_append' at :78 — compiler is &str, param arg expects str.

    Root cause. The read-only ABI change made lookups/fields yield &str (borrows) and str non-Copy (D22 §13.6); these tools feed those borrows into owned-str parameters and compare &str against str. The checker is correct; the tools are stale. Established by the runs above.

    Severity. Low: one-shot migration tools that no longer run. No user-facing impact.

    Related. #1069 (four tools, same drift), #1068/#1070 (bare-extern variant). No open PR.

    Recommendation — champion, mechanical (bundle with #1069). Same fix template as #1069 / the green rename_rt_libc_externs.w: take &str parameters, clone only at the Vec[str].push/owning sinks, and compare views to views. Minor doc nit per the report: migrate_method_arg_moves's --from-tsv (:247) is reachable only positionally and is undocumented in the :208 usage line — worth adding while migrating. Acceptance criteria: both tools run to completion under their canonical invocation.

    Blockers / not tested. Read-only; I confirmed the compile failures, not the tools' migration logic. Linux/Windows not exercised.

  2. ehartford commented on Oct 25, 2026

    @ehartford
    Contributor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): does not reproduce; both tools compile.

    $ with check tools/migrate_method_arg_moves.w   # ok
    $ with check tools/migrate_seams.w              # ok
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions