Skip to content

update-shape.py: check's root header, update-root-missing, update-branch-not-utf8's REFUSED text, a typed --upstream's update-upstream-not-a-repo and pin_source's three refusals name the path as shown_path does (Part of #1318) - #1329

Draft
brettheap wants to merge 2 commits into
fix/1288-refusals-shown-morefrom
fix/1318-root-lines-shown

Conversation

@brettheap

@brettheap brettheap commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Goal

Part of #1318. Five places in update-shape.py named a typed --root (or --upstream) as it was typed, so a bidi override (U+202E), an ESC or a line feed in a folder's name reached the terminal raw, or began a line of the name's choosing. Each now names the path as shown_path does, as #1288 and #1310 did for the pin: as it is, or as repr spells it where a character in it does not print. A printable path prints byte for byte as before. No refusal code changes and no word but the path.

DRAFT. Stacked on #1310 (base fix/1288-refusals-shown-more, head daaa5ad8a). It restacks onto main after #1284 and #1310 land. shown_path is already imported by update-shape.py at that base (#1284), so the import is untouched.

The sites (measured before and after)

Real runs of update-shape.py over a project cut by scaffold-project.py --local-remote-dir from a clone of the base, a copy of it in a folder named with U+202E, an ESC, a line feed, and a printable name (wd + e-acute + and a space), with a stub gh first on PATH, GH_TOKEN=bogus, an empty GH_CONFIG_DIR, GIT_SSH_COMMAND=false, GIT_CONFIG_GLOBAL=/dev/null and a local --upstream. 28 runs before (at daaa5ad8a) and 28 after: the 21 runs over a name that does not print each put U+202E or the ESC on a stream raw, or began a line WARNING forged-line: pwned/...; the 7 printable runs print the folder as typed, and print byte for byte the same text after (stdout and stderr compared whole, with the temp path and the commit ids normalised).

line site at daaa5ad8a run exit raw before raw after
check's root <root> header, stdout :2480 (report) check --root R --upstream U --at B 1 3 of 3 0 of 3 in the header and the report; the NEXT line under it is pasted (below)
update-root-missing, <root> is not a directory :2544 (prepare) check --root <a folder that is not there> 2 3 of 3 0 of 3
update-branch-not-utf8, <root> is on the branch b'caf\xe9' ... (the REFUSED text) :2828 (current_branch) apply --branch, HEAD on a branch named with the bytes caf and 0xE9 2 3 of 3 0 of 3 in the REFUSED text; its _by_hand remedy under it is pasted (below)
update-upstream-not-a-repo for a typed --upstream, --upstream <path> exists but is not a git repository :704 (open_upstream) check --root R --upstream <a folder that holds no repository> 2 3 of 3 0 of 3
update-upstream-not-a-repo, <pin>: source_repository: is <value>, which exists but is not a git repository :816 (pin_source's named) check --root R, the pin's source_repository: an existing folder that is no repository 2 3 of 3 0 of 3
update-upstream-unresolvable, the same line, which is not an owner/repo name :816 the pin's source_repository: is no-such-shape 2 3 of 3 0 of 3
unsafe-value for the pin's source_repository: (repo_shape.checked_value's, handed named as its what) :816 the pin's source_repository: is -a/b 2 3 of 3 0 of 3

After the change the root reads, for U+202E, '<D>/wd-pl\u202ean' (quotes and escapes as repr spells it), and a printable root as it was, with no quotes. pin_source's named is one f-string, so spelling its {pin_path} once covers all three codes.

What changed

update-shape.py, five edits and two comments, +16 -7: report's header, prepare's update-root-missing, current_branch's update-branch-not-utf8 text, open_upstream's --upstream {spec}, and pin_source's named. Each takes shown_path(...) where it took the bare value. The new tests/test_update_shape_root_lines_shown.py holds them. Nothing else in the tree changes. The README, AGENTS.md, docs/cli.md and the handbook quote none of these lines (grep for each line's words and codes), so no doc changes; tests/test_cli_reference.py and tests/test_agents_md_codes.py pass.

Rows

tests/test_update_shape_root_lines_shown.py, 28 ids: four tests over NAMES (U+202E, ESC, line break, printable) for the header, update-root-missing, update-branch-not-utf8 and the typed --upstream, and one over the pin's three codes times NAMES. Each runs the real tool and asserts the exit code, the whole REFUSED line (or the header line) with the path as named_as gives it (repr where the name does not print, byte for byte where it does), no U+202E, ESC or forged line on the lines it owns, and no traceback. Each skips by name where its folder cannot be made (unsafe_folder). The file is ASCII; the names come from conftest (the e-acute as an escape) and chr(0x202E).

  • At daaa5ad8a's update-shape.py (the sha256 eca58c8960e8..., in a detached tree with the new file copied in): 21 failed, 7 passed. The 21 are every row over a name that does not print; the 7 printable controls pass.
  • At this head: 28 passed.

Mutants

Each applied alone to this head's update-shape.py in a detached tree, run against the new file, and restored with its sha256 checked (f74fe96b3a56...):

mutant rows that fail
header reverted to the bare root 3 (the header's three)
update-root-missing reverted 3
update-branch-not-utf8 text reverted 3
typed --upstream reverted 3
named reverted (all three pin codes) 9 (three codes, three names each)
only checked_value's what reverted 3 (unsafe-value alone)
only the two refusals reverted, what kept spelled 6 (the other two codes)
rival: repr always, at all five sites 7 (every printable control)
rival: an escaper of LF and ESC only 7 (every U+202E row)
rival: an escaper of the C0 and C1 controls but not the bidi controls 7 (every U+202E row)

No survivor.

Runs

Python 3.12.3, git 2.43.0 and git 2.47.1 (the lane's own build from kernel.org's tarball), git-filter-repo 2.47.0 (CI's pin, on PATH), through tools/run10.sh, -rs alone, at most 100 ids a run, one pytest at a time, run names n1318-.... Every group passed on both gits:

run files git 2.43.0 git 2.47.1
A test_update_shape_root_lines_shown, test_update_shape_unreadable rc=0, 84 passed rc=0, 84 passed
B test_update_shape_apply_lines_and_headers, test_update_shape_pin_source rc=0, 97 passed rc=0, 97 passed
C test_update_shape_merged_away, test_value_pattern_line_break, test_family_member_name, test_update_shape_paste_lines rc=0, 92 passed rc=0, 92 passed
D test_windows_paths, test_update_shape_partial_rollback, test_update_shape_add_ignored rc=0, 94 passed rc=0, 94 passed
E test_update_shape rc=0, 90 passed rc=0, 90 passed
F test_update_shape_messages, test_update_shape_next_quoting, test_cli_reference rc=0, 99 passed rc=0, 99 passed
G test_refusal_paths_shown_more rc=0, 92 passed rc=0, 92 passed
H test_pinned_copy_text rc=0, 89 passed rc=0, 89 passed
I test_no_auto_maintenance rc=0, 58 passed, 2 skipped rc=0, 58 passed, 2 skipped
J test_agents_md_codes rc=0, 47 passed rc=0, 47 passed
K test_path_guard_hygiene (alone, flock) rc=0, 121 passed rc=0, 121 passed
L test_repo_hygiene (alone, flock) rc=0, 101 passed rc=0, 101 passed
M test_yaml_reader_spaces (alone, flock) rc=0, 513 passed rc=0, 513 passed

Skips, named: tests/test_no_auto_maintenance.py:222, 2 rows on each git: "the session began with GIT_CONFIG_GLOBAL set, and its file includes that one" (run10.sh exports GIT_CONFIG_GLOBAL=/dev/null, so they skip in every lane run). No other skip.

One run of the new file on git 2.43.0 under the lane's run10-lane.sh (the same runner with LANES_LANE exported): 28 passed.

Merges

Heads read fresh, git merge-tree --write-tree of this head with: daaa5ad8a (the base) clean; main a6f1374b0 clean (main moved from dcf63b8b9 while this ran; the one commit between them touches repo_shape.py and adopt-project.py, neither of which this PR touches); #1294's head cf07ba0d1 (the open PR that touches update-shape.py) clean; #1284's head 86ab76db4 clean. No other open PR touches update-shape.py or the new file.

Round 1

rv1329's independent review of cccde4ec1 is READY (issuecomment-6783933685): no MUST, no SHOULD and three NITs. The sections above describe cccde4ec1 and stand. This round changes rows only: update-shape.py is byte for byte as at cccde4ec1 (sha256 f74fe96b3a56...). The new commit is 28a71d981 (tests/test_update_shape_root_lines_shown.py alone, +36 -12), pushed to this branch as a fast-forward.

  • NIT 1, rv1329's X1. The typed --upstream row passed an absolute, resolved path, which shown_path(spec) and shown_path(path) spell alike, so naming the resolved path in open_upstream passed all 28 rows. A new test, test_a_relative_upstream_is_named_as_it_was_typed_and_spelled, adds four ids (U+202E, ESC, line break, printable). Each runs check --upstream ./<name> from the folder that holds <name> and holds the whole REFUSED update-upstream-not-a-repo line: the flag's value as typed, ./ and all, spelled as shown_path spells it ('./wd-\x1b[31mRED' for the ESC). The absolute row stays as a control.
  • NIT 2, rv1329's X2. update-branch-not-utf8's row read only the first line of stderr, so a second detail line holding the raw root, above the remedy, passed. The row now holds refusal_detail(result.stderr, "update-branch-not-utf8") == [<the REFUSED line>] (tests/conftest.py), so the detail is one line. The remedy under it is a pasted line and stays raw by design, so nothing is asserted about it. The row keeps its four ids.
  • NIT 3. cccde4ec1's subject ends (#1318), which in this repository reads as a reference to the whole issue. This PR is one part of it: closingIssuesReferences is empty, and the squash message will say Part of #1318. The new commit's subject ends (Part of #1318).

Rows: 32 ids, the 28 above and the four new ones. At daaa5ad8a's update-shape.py (sha256 eca58c8960e8..., in a detached tree with this file copied in): 24 failed and 8 passed. The 24 are every row over a name that does not print, and the 8 printable controls pass. At this head: 32 passed.

Mutants, each applied alone to this head's update-shape.py in a detached tree, run against the new file, and restored with its sha256 checked (f74fe96b3a56...):

mutant rows that fail rows that failed before this round
X1: shown_path(path) for shown_path(spec) in open_upstream 4 (the four new rows) 0
X2: a second detail line, the raw root, above update-branch-not-utf8's remedy 4 (the branch row's four ids) 0
X1b: shown_path(candidate), the normalised Path, which drops the ./ 4 (the four new rows) not run
n1318's header, update-root-missing, update-branch-not-utf8 text 3, 3, 3 3, 3, 3
n1318's typed --upstream reverted 6 3
n1318's named, checked_value's what only, the two refusals only 9, 3, 6 9, 3, 6
n1318's rivals: repr always, LF and ESC only, no bidi controls 8, 8, 8 7, 7, 7

X1 and X2 are killed, and n1318's ten are still killed. The new relative rows add three failures to the typed --upstream mutant (its three unsafe names) and one to each rival. No survivor.

Gates at 28a71d981, Python 3.12.3, through tools/run10.sh, -rs alone, one pytest at a time, run names n1318b-...:

run files git 2.43.0 git 2.47.1
A test_update_shape_root_lines_shown, test_update_shape_unreadable rc=0, 88 passed rc=0, 88 passed
K test_path_guard_hygiene (alone, flock) rc=0, 121 passed rc=0, 121 passed
L test_repo_hygiene (alone, flock) rc=0, 101 passed rc=0, 101 passed

One run of the new file on git 2.43.0 under the lane's run10-lane.sh: 32 passed. There was no skip in any of these runs. No file but the new test file changed, so the other groups of the Runs table above stand. The merge-trees were not run again for this commit.

Known limits

Not in this PR

Candidates, for Brett Heap's word (nothing is filed, and no issue is drafted):

Part of #1318
Lane: openreposhape-5 (openRepoShape-5)

🤖 Generated with Claude Code

Summary by Sourcery

Display update-shape.py root, upstream, and pin paths safely in reports and refusals without changing their codes or surrounding text.

Bug Fixes:

  • Sanitize root, upstream, and pin paths in update-shape.py diagnostics so terminal control characters, bidi overrides, and line breaks cannot alter displayed refusal or report lines.

Enhancements:

  • Preserve byte-for-byte output for printable paths while using safe path representations for non-printable names.

Tests:

  • Add coverage for unsafe root, upstream, and pin paths across all affected diagnostics, including printable and non-printable names.

…e-branch-not-utf8`'s REFUSED text, a typed `--upstream`'s `update-upstream-not-a-repo` and `pin_source`'s three refusals name the path as `shown_path` does (#1318)

These five places printed a typed `--root` (or `--upstream`) as it was
typed, so a bidi override, an ESC or a line feed in a folder's name reached
the terminal raw, or began a line of the name's choosing. Each now names the
path as `shown_path` does, as #1288 and #1310 did for the pin: as it is, or
as `repr` spells it where a character in it does not print. `pin_source`'s
`named` is spelled once, so `update-upstream-not-a-repo`,
`update-upstream-unresolvable` and `unsafe-value` (which `checked_value`
raises with `named` as its `what`) all follow. A printable path prints byte
for byte as before; no code and no other word changes.

tests/test_update_shape_root_lines_shown.py runs the real tool over a root
(or an `--upstream`) named with U+202E, an ESC and a line feed, and a
printable name: 28 rows, 21 of which fail on #1310's head.

Every line a person pastes (`_by_hand`'s calls, `apply_command`,
`next_line`, `landing_failed`'s NEXT, `_restore_by_hand`'s redirect) still
names the root as typed: that is #1318's Scope question, left to Brett Heap.

Part of #1318
Lane: openreposhape-5 (openRepoShape-5)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@brettheap brettheap added this to the v1.2.2 milestone Nov 11, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Render the root, typed upstream, and pin paths with shown_path in the five affected diagnostics while preserving printable-path output.

  • update-shape.py L817-820, L2484-2487, L2836-2839 (+2 small edits)

Tests

Exercise the affected diagnostics with unsafe and printable root, upstream, and pin paths, including a relative typed upstream.

  • tests/test_update_shape_root_lines_shown.py L1-251

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@brettheap

Copy link
Copy Markdown
Contributor Author

Independent review of #1329 (Part of #1318) for lane openRepoShape-5, by rv1329 (opus), at cccde4e: READY

Summary. There is no MUST and no SHOULD. I found three NITs and have six follow-up candidates.

  • The five sites now name the path as shown_path does. Every other byte of output is unchanged, checked by exact comparison against daaa5ad8a. The split between this part and the pasted lines falls exactly where the body puts it.
  • Rows: 21 fail and 7 pass at the base. All 28 pass at the head.
  • Mutants: n1318's 10 are all killed, with the counts the body gives. Both of my own mutants survive, which gives NITs 1 and 2.
  • Gates: every one is green on git 2.43.0 and on git 2.47.1.
  • Merge-trees: all clean. The record is clean.

Findings

MUST: none. SHOULD: none.

NIT 1: the --upstream row cannot tell "as typed" from "resolved".

  • Mutant X1 swaps shown_path(spec) for shown_path(path), so the line names the resolved path. All 28 rows still pass.
  • The rows pass str(folder), which is already absolute and resolved, so both spellings give the same text.
  • The code itself is right. In real runs (probe5) a relative --upstream ./<name> prints as typed at the head, byte for byte as at the base, and the ESC form is spelled as typed: './rv-\x1b[31mRED'.
  • A row that types a relative --upstream from cwd=tmp_path would pin this.

NIT 2: the update-branch-not-utf8 row reads only stderr line 0.

  • Mutant X2 keeps the spelled first line and adds a second detail line with the raw root, above the remedy. All 28 rows still pass.
  • Asserting refusal_detail(result.stderr, "update-branch-not-utf8") == [expected] (already in conftest) would pin the detail as one line. It would still leave out the remedy line, which is pasted and raw by design.

NIT 3: the commit subject ends (#1318), but the title says (Part of #1318).

  • In this repo a bare (#N) in a subject names the issue a PR closes. The explicit squash message should say Part of.
  • It is not a closing keyword, and closingIssuesReferences is [].

Note. The body on GitHub is n1318's body.md with a Sourcery summary added after the footer. Lane 5 did not write that part. It holds no closing keyword, and body-guard exits 0 on the GitHub copy.

1. Each site, measured with real runs

Probe setup:

  • The probe rules were followed: stub gh first on PATH, GH_TOKEN=bogus, an empty GH_CONFIG_DIR, GIT_SSH_COMMAND=false, GIT_CONFIG_GLOBAL=/dev/null, and a local --upstream only.
  • 7 cases (header, root-missing, branch-not-utf8, typed --upstream, and the pin's three codes) times 10 folder names.
  • The names: U+202E, ESC, LF, CR, TAB, U+2028, U+00A0, U+009B, a printable name (e-acute and a space), and a printable name with a quote and a backslash.

Results, 70 base/head pairs, 0 mismatches:

  • Nothing else changes. At the head, stdout and stderr are exactly the base output with that one line's path re-spelled. The exit codes are equal, and the base held each anchor exactly once.
  • Printable names are unchanged. All 14 printable pairs are byte-identical.
  • No raw control in the changed line. None of the 56 unprintable runs has one there.
  • Where the line falls. The only raw lines left at the head are check's NEXT line (8 runs) and update-branch-not-utf8's _by_hand remedy (8 runs). Both are pasted lines, raw by design, as the body says.
  • A separate scan of every f-string field confirms that exactly the five fields changed between the base and the head.

2. What is left

These lines still print a typed root or path raw and are not pasted lines. Unless marked otherwise, each was measured at the base and the head over U+202E, ESC, LF and a printable name, and the output was the same at both. Each is listed as a candidate.

3. The rows

  • At the base (daaa5ad8a's update-shape.py, sha256 eca58c89..., swapped in and put back by sha256): 21 failed, 7 passed. All 21 failures are the unprintable names, and the 7 passes are the printable controls.
  • At the head: 28 passed.
  • Skips: with a plugin that makes Path.mkdir refuse any name that is not printable ASCII, all 28 rows skip at tests/conftest.py:2501 with "this filesystem cannot hold the name".
  • Assertion strength: each row checks the exit code, the whole line, and no U+202E, ESC or forged line. The refusal rows check the whole output, and the header row checks the whole report plus an empty stderr. The gaps are NITs 1 and 2.
  • Checked clean: the file is ASCII only, no assert joins conditions with and or or, and the imported module-scoped fixture is built fresh per module (mktemp).

4. Mutants

Each was applied alone in rv1329-mut and put back by sha256 (f74fe96b...) every time.

Mutant Rows that fail
M1 header 3
M2 root-missing 3
M3 branch-not-utf8 3
M4 typed --upstream 3
M5 named 9
M5b checked_value's what only 3
M5c the two refusals only 6
R1 repr always 7
R2 LF and ESC only 7
R3 no bidi 7
X1 (mine) resolved path for --upstream 0, survives (NIT 1)
X2 (mine) raw second detail line 0, survives (NIT 2)

5. Gates

Environment: Python 3.12.3, run through run10.sh, -rs alone, one pytest at a time under flock. git 2.43.0 is /usr/bin/git and git 2.47.1 is L/tools/git247/bin/git. git-filter-repo is 2.47.0 (venv247).

The results were identical on both gits:

Run Files Result
A new file + test_update_shape_unreadable 84 passed
B test_update_shape_pin_source + test_update_shape_apply_lines_and_headers 97 passed
C test_update_shape_messages + test_cli_reference + test_agents_md_codes 97 passed
D test_update_shape 90 passed
E test_refusal_paths_shown_more 92 passed
F test_no_auto_maintenance 58 passed, 2 skipped
G test_path_guard_hygiene, alone under flock 121 passed
H test_repo_hygiene, alone under flock 101 passed
M new file on local merge b0ffe46fe (head + main a6f1374b0, made with commit-tree, never pushed) 28 passed

6. Merge-trees

Heads were read fresh, and ls-remote matched each one.

Merged with Result
#1310's head daaa5ad8a (an ancestor) clean, tree e65270ba, the head's own tree
main a6f1374b0 clean, d9b586c6
#1294 cf07ba0d1 clean, fdb0d07b
#1284 86ab76db4 (an ancestor) clean

No other open PR touches update-shape.py or the new test file.

7. The record

Files

Logs, probes and STATE.md are in /workspace/projects/.lane-worktrees/openRepoShape-5/work/rv1329/:

  • probe1.log, probe2.log, probe3.log, probe5.log and probe4/
  • logs/base-new-243.log, logs/skipmeasure-243.log, logs/mutants.txt, logs/gate-g243-*.log, logs/gate-g247-*.log, logs/gate-g243-combined.log, logs/gate-summary.txt

Both trees, /workspace/projects/openRepoShape-worktrees/rv1329-review and /workspace/projects/openRepoShape-worktrees/rv1329-mut, are clean at cccde4ec1. I left them in place.

Nothing was posted to GitHub, and no issue was filed or drafted.

Lane: openreposhape-5 (openRepoShape-5)

…is pinned as typed and not as resolved, and `update-branch-not-utf8`'s detail is pinned as one line with `refusal_detail` (Part of #1318)

rv1329's review of cccde4e found two mutants of update-shape.py that
no row killed. Rows now kill both; update-shape.py is unchanged.

NIT 1: the typed `--upstream` row passed an absolute, resolved path, which
`shown_path(spec)` and `shown_path(path)` spell alike, so naming the
resolved path in `open_upstream` passed every row. Four new rows type a
relative `--upstream ./<name>` from the folder that holds it, over U+202E,
an ESC, a line feed and a printable name, and hold the whole line, naming
the flag's value as typed and as `shown_path` spells it.

NIT 2: the `update-branch-not-utf8` row read only the first line of stderr,
so a second detail line holding the raw root, above the remedy, passed.
The row now holds `refusal_detail(stderr, "update-branch-not-utf8")` equal
to the one `REFUSED` line. The remedy under it is a pasted line and stays
raw by design, so nothing is asserted about it.

The file has 32 rows; 24 fail on #1310's head. Those two mutants and the
ten the file already killed are each killed.

Part of #1318
Lane: openreposhape-5 (openRepoShape-5)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

Delta check of #1329 (Part of #1318) for lane openRepoShape-5, by rv1329b (sonnet), cccde4e..28a71d9: READY

No MUST and no SHOULD. I found one new NIT and no new follow-up candidates. Everything below was measured at 28a71d981d5b4475199da24f3fdee501d47fca4b. ls-remote and gh pr view agree that is the head, and the PR is a DRAFT with base fix/1288-refusals-shown-more at daaa5ad8a. I made one tree, /workspace/projects/openRepoShape-worktrees/rv1329b-check. It is clean at the head, with update-shape.py at sha256 f74fe96b3a56.... I made no GitHub writes: only gh pr view, gh pr list and gh api GETs, plus a git fetch into the shared object store.

Findings

MUST: none. SHOULD: none.

NIT 1 (new): the update-branch-not-utf8 row no longer reads anything above the REFUSED line.

  • refusal_detail starts at the REFUSED line. The old row read stderr.splitlines()[0].
  • My mutant X2e prints the raw root to stderr just before raise Refusal("update-branch-not-utf8", ...), so it lands above the REFUSED line.
  • Against the new file, X2e survives: 32 passed.
  • Against cccde4ec1's file, run from a scratch copy, it fails 4 of 4 branch ids.
  • It does not touch rv1329's X2, which is killed. Reaching it takes a stray print before the raise, so it is contrived.
  • A whole-stderr safety check cannot be used, because the pasted remedy holds the raw root by design. The cheap fix is to assert result.stderr.startswith(detail[0] + "\n").

1. The diff

  • git diff cccde4ec1 28a71d981 touches tests/test_update_shape_root_lines_shown.py only: 36 insertions, 12 deletions.
  • update-shape.py has the same blob, e48428ebe360, at both commits. Its sha256 is f74fe96b3a56ac8e72afdeca4dc1c00a6ed7f17233ee7cf7e5d084e299c9cc4a.
  • The PR against its base is update-shape.py plus the test file.
  • No other file in the tree names the new test file.
  • The file is ASCII only. An AST scan finds no assert with and or or. It has 6 test functions and 32 collected ids.

2. The rows

All mutants ran one at a time in my one tree, against the new file only. After each, update-shape.py was restored from a saved copy and its sha256 checked: 18 restores, all f74fe96b..., dirty=0.

  • NIT 1, relative --upstream: test_a_relative_upstream_is_named_as_it_was_typed_and_spelled has 4 ids (U+202E, ESC, line-break, printable). Each runs check --upstream ./<name> with cwd=tmp_path. Each asserts the whole REFUSED update-upstream-not-a-repo line. The expected text is built with repr, not with shown_path.

    • X1 (shown_path(path)): 4 failed, 28 passed.
    • My three rivals each fail the same 4: X1b shown_path(candidate), X1c shown_path(Path(spec).absolute()) and X1d (spec minus ./).
  • NIT 2, branch row: it asserts refusal_detail(result.stderr, "update-branch-not-utf8") == [<the REFUSED line>], with nothing about the remedy.

    • X2 (raw root as a second detail line): 4 failed, 28 passed.
    • My two rivals each fail the same 4: X2b (a fixed second line) and X2c (a spelled-root second line).
    • X2e is NIT 1 above.
  • daaa5ad8a's update-shape.py swapped in (sha256 eca58c8960e8..., restored): 24 failed and 8 passed.

    • The 24 are 3 header, 3 root-missing, 3 branch, 3 typed upstream, 3 relative upstream and 9 pin.
    • All 8 printable ids pass.
  • The older ten, at the head:

    Mutant Rows that fail
    M1 3
    M2 3
    M3 3
    M4 6
    M5 9
    M5b 3
    M5c 6
    R1 8
    R2 8
    R3 8

    These match the body's table exactly.

  • Skips: with rv1329's no-folder plugin (a copy in my scratchpad), all 32 rows skip by name: tests/conftest.py:2501, "this filesystem cannot hold the name".

3. The commit

4. Gates

Python 3.12.3, L/tools/run10.sh, -rs alone, one pytest at a time, run names rv1329b-.... git-filter-repo is 2.47.0. git 2.43.0 is /usr/bin/git, and git 2.47.1 is L/tools/git247/bin/git.

Run Files git 2.43.0 git 2.47.1
A new file + test_update_shape_unreadable 88 passed 88 passed
H test_repo_hygiene, alone under flock 101 passed 101 passed
G test_path_guard_hygiene, alone under flock 121 passed 121 passed
  • There was no skip in any gate log.
  • The new file under L/work/n1299/run10-lane.sh on 2.43.0: 32 passed.
  • n1318b's own logs in L/work/n1318b/logs/ agree.
  • My logs are in /tmp/claude-1000/-workspace-projects-openRepoShape/50cede29-ab82-4ca3-9f67-d98e1a58c8d2/scratchpad/rv1329b/logs/.

5. The body

I read the live body (updated 01:21:39Z) against L/work/n1318b/live-body.md. The live body equals n1318b's body-post.md byte for byte.

6. Merge-trees

Heads were fetched and read back with ls-remote. Main moved to 49b23bb68 (#1307) since rv1329. The ## Merges section still names a6f1374b0, which Round 1 says it left as it was.

Merged with Result
main 49b23bb68 clean, tree 1f0ce94c3
#1310 daaa5ad8a clean, ancestor, tree 3fed93336, the head's own
#1294 cf07ba0d1 clean, tree e4955bf0b
#1284 86ab76db4 clean, ancestor

The only open PRs touching update-shape.py are #1329, #1310, #1294 and #1284.

Not run, and leftovers

  • I did not re-run the body's other Runs groups B to J and M, nor the combined test_update_shape plus new-file fixture session. The commit touches no file they read.
  • The failing mutant runs left their basetemps under /workspace/projects/.lane-worktrees/openRepoShape-5/tools/bt/rv1329b-*. That is 28 dirs, about 1.1G and 167k inodes, and df -i reads 42%. I cannot rm, so they are for you to clear.
  • The tree rv1329b-check is left in place.
  • Nothing was posted, filed or drafted. The only candidate is NIT 1, for the lane's own decision.

Lane: openreposhape-5 (openRepoShape-5)

This branch has not been deployed

No deployments
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