Skip to content

adopt-project.py plan: an id derived from --project is refused as --id '…' must match, naming a flag nobody passed #601

Closed

Description

@brettheap

adopt-bad-id should name a derived id by where it came from, as _flag_named does for #529, with tests for a passed and a derived value of --id and --tracking-branch.

From the checklist triage of 2026-10-15; Brett Heap approved its recommendations at 2026-10-15T16:49:38Z. One pull request covers the lines below.

Lines

  • [W529/RV567] An id derived from --project Foo_Bar is refused adopt-bad-id: --id 'foo_bar' must match …, naming an unpassed flag. Where: adopt-project.py _checked_plan_inputs (:2925-2930). Effort S; all. On main 26c1600: At 26c1600 args.id = args.id or args.project.lower() (:2925) and the refusal says --id {args.id!r} (:2928) whether or not id is in flags_given, while the tracking branch and the elector go through _flag_named (:2435-2444); tests/test_adopt_plan.py:332-337 asserts only the code. (source)

Rides along (backlog; tick it here if the same change covers it)

  • [RV567] No test pins the label for a PASSED --tracking-branch ('', feat#1); two mutations survive. Where: tests (adopt-project.py _checked_plan_inputs, :2895-2898). Effort S; all. On main 26c1600: Mutation run at 26c1600 over six adopt files (test_adopt_tracking_branch, _plan_yaml_quoting, _plan, _manifest_values, test_windows_paths, test_ruleset_hint_tracking_branch): a passed branch labelled "not given" (_flag_named(TRACKING_KEY, set())) and given = bool(args.tracking_branch), which also lets --tracking-branch '' silently become the source's branch, each pass 733 tests (1 skipped); the only label test is the derived case at tests/test_adopt_tracking_branch.py:215-222. (source)

Each line above is marked → this issue on its tracking issue. Tick it there too when this closes.

The lines as written on the tracking issues

adopt-project.py plan: adopt-bad-id: --id 'foo_bar' must match … names --id when the id was derived from --project Foo_Bar and nobody passed --id; the sentence has no "is" to hang #529's "not given" label on, so it needs a reworded sentence and test. (W529/RV567, 2026-10-14)
— #457, comment

adopt-project.py plan: no test pins the label for a --tracking-branch the person PASSED (--tracking-branch '' / feat#1 → REFUSED unsafe-value: --tracking-branch is '<given>', no "not given", no plan written). Two mutations (a passed branch labelled "not given"; truthiness instead of is not None) pass all 632 tests in test_adopt_tracking_branch, test_adopt_plan_yaml_quoting, test_adopt_plan, test_windows_paths. Predates #567. (RV567, 2026-10-14)
— #457, comment

Activity

  1. added this to the v1.1.0 milestone on Oct 15, 2026
  2. brettheap commented on Oct 15, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-2, session 81650e29-c906-4fe8-96c9-55580bfe0c44@Eagle, 2026-10-15T18:22:05Z, for #601

    Logged in lanes/log/openRepoShape-2.md at 66d9c3f08d21a94ad5a13d000de6a65e3f26bae9.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#601:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#601"`, kept where the row or its body names `#601`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `601` as a whole token:
       none
    
  3. added a commit that references this issue on Oct 15, 2026
  4. brettheap commented on Oct 16, 2026

    @brettheap
    ContributorAuthor

    (lane openRepoShape-1, 2026-10-16T11:42:49Z) For lane openRepoShape-2, which holds #601 and its PR #620.

    One more line for #620's next fix round. It comes from lane 1's triage of 2026-10-15, D7, approved by Brett Heap at 2026-10-16T11:21:17Z ("Approve all (Recommended)"), and it is #601's mechanism again: a derived value named as a flag.

    [L1-39] adopt-manifest-invalid names a filled-in --org as a flag (an org from a url that checked_value accepts but validate-manifest.py refuses, such as ~x), the mechanism lane 3's #529 fixed for --elected-by (landed as #567); an org entry in FLAG_DEFAULTS is the cheap fix. Measured on 182389e. (Found in #591's writer and review.)

    — #457, comment

    If #620 lands without it, it stays a known limit. If it goes in, tick L1-39 on #457 (issuecomment-6200110061) when #620 lands.

    Lane: openreposhape-1 (openRepoShape-1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions