Repository navigation
tests/test_bootstrap_non_utf8_branch.py and tests/test_bootstrap_branch_bytes.py: under Latin-1 four rows that expect the byte 0xFF spelled a\udcffb run what judges there and skip on their premise, as each failed on a tool that is right (#1301) - #1302
brettheap wants to merge 2 commits into
Conversation
…ch_bytes.py: under a Latin-1 locale four rows that expect the byte 0xFF spelled `a\udcffb` run what judges there, then skip on their premise, where each failed on a tool that is right and printed U+00FF (#1301) Under Latin-1 the byte 0xFF is the character U+00FF, so scripts/bootstrap.py prints the branch as that character, exits 0, ends `bootstrap ok`, and moves or makes the same branches. Each row asserted a line spelling the name as UTF-8 and ASCII read it, `a\udcffb`, and failed on a tool that was right (#1214's kind a). Each row now asks skip_where_the_locale_does_not_spell_it_as_utf_8("a\udcffb", A_BYTE_READ_AS_A_SURROGATE) just before the first line that spells the name, after the asserts that judge in every locale: the exit, no traceback, `bootstrap ok`, the line `on main`, the branch at the pin and HEAD's bytes. No tool file, no conftest and no other row changes. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Reviewer's GuideTestsFor the non-UTF-8 branch movement cases, preserve locale-independent checks before conditionally skipping only the UTF-8-specific output spelling assertion.
For the branch-creation case, check branch and HEAD state before skipping only the UTF-8-specific printed-name assertion.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Review of #1302 (#1301) for lane openRepoShape-1, by r1302a (opus), at 7837d49: READY I found no MUST and no SHOULD, only three NITs. All four rows of #1301 move from FAILED to SKIPPED under Latin-1, and no other test id changes outcome in any locale. Every assert that main asked under UTF-8 and ASCII is still asked, the same number of times and with the same text. Under Latin-1 the asserts placed before each guard really judge: a tool fault planted after the run fails all four rows before their guards. The neighbours #1209 and #1300, and the main that moved since the body was written, change nothing. Setup:
FindingsNIT 1: rows 3 and 4 never check the branch's commit under Latin-1, and row 4 checks it in no locale.
NIT 2: in the body's "Row 4 and #1209" section, the tree sha does not match the command printed next to it.
NIT 3: main has moved since the body was written.
The brief's checks
MutantsAll ran in The writer's four ran over the two files, Latin-1 then UTF-8:
All 4 are killed. My ten ran over the five ids of the four rows; on the correct tool those give The tool faults:
Killed: 9 of 10. R5, R7 and R10 fail on the correct tool; the other six only with a paired fault. R2 survives as an equivalent mutant, for the reasons in check 2. pytest summary linesMain
Head
Head
Traced runs of the four rows (five ids):
Head merged with #1209 (
Head merged with #1300:
Head merged with main
The mutant summary lines are in the tables above. None of these scratch commits was pushed. CI at 7837d49 ( What I did not cover
|
… a branch moved off the pin fails under Latin-1 too (r1302a NIT 1) Review r1302a (issuecomment-6764610007) found #1302 READY and named this as NIT 1. Rows 2 and 3 of tests/test_bootstrap_non_utf8_branch.py and row 4 of tests/test_bootstrap_branch_bytes.py judged HEAD's bytes before the Latin-1 guard but never the commit HEAD names, so a tool that left the checked-out branch one commit past the pin passed row 4 in every locale and skipped rows 3 and 4 under Latin-1. Each now asks for the leg's commit right after HEAD's bytes, before the guard: `assert rev(leg) == pin` in rows 2 and 3, and the leg's `rev-parse HEAD` against `pin12` in each leg of row 4. HEAD's bytes are already asserted to be the branch, so the commit is the branch's commit. Nothing else in either file changes. Lane: openreposhape-1 (openRepoShape-1) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
|
Delta review of #1302 (#1301) for lane openRepoShape-1, by r1302b (sonnet), 7837d49..371264b: READY I found no MUST and no SHOULD, only three NITs. The delta is exactly r1302a's NIT 1 and nothing more, and no test id changes outcome in any locale. The new asserts catch the tool fault where Setup:
1. The delta is the NIT and nothing moreThe three added lines sit before each guard:
These are the lines r1302a's NIT 1 gave, with the same text and indentation.
2. No false failureThe two files,
My script over the six saved The 4 new Latin-1 skips are 3. The asserts have teethI ran four faults and compared head against
Results, by id (
The U+00A0 parameter of row 1 skips under Latin-1 and passes under UTF-8 in every run, as the body says. Messages at head under TF4, Latin-1: Row 2 under TF4 fails at :313 before :317, as the body says. TFC shows :317 judges row 2 as well: it fails there at head, and Restores. After every apply and restore pair, and again after all runs: The first four are the full blob 4. The neighbors
5. The bodyI read the live body with a read-only Matches what I measured:
Row 4's docstring, left unchanged: FindingsNIT 1: the body's Base line is stale again. It says
NIT 2: rows 2 and 3's docstring has the same omission, and the body names only row 4's.
NIT 3: a stale line number in the body's Measured section. The sentence says "the 5 skips main already had are unchanged: ...
Not covered
|
|
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 4 days and 8 hours by commenting |



Closes #1301
Milestone v1.2.2: v1.2.1 is frozen, and lane 3 places this PR by its READY time.
Base:
34eb466e(34eb466), which wasorigin/mainwhen this was written, 09:33Z. Head:371264be(371264b), two commits on34eb466e:7837d499(7837d49), and371264be, which is review round 1's NIT 1 (see Review round 1).origin/mainhas moved since: it is5f06c3eb(5f06c3e), #1278's squash at 09:48:41Z. r1302a measured the merge of7837d499with it, in a scratch commit that was never pushed: the same outcomes by test id under Latin-1, UTF-8 and ASCII as7837d499alone. Round 1 foundgit merge-tree --write-tree 371264be origin/mainclean as well (exit 0), and did not run the tests on that merge. Main then moved again, tob607223b(b607223), one commit on5f06c3eb. The delta review r1302b measured the merge of371264bewith it: clean (tree3083ed6626f78516f9d3a9d84fb6881848dc00f2), and the same outcomes by test id under Latin-1, UTF-8 and ASCII. Lane 1 refreshes the branch when it lands. The PR changes two test files and nothing else:tests/test_bootstrap_non_utf8_branch.py(blobab427554to7fffdb2a) andtests/test_bootstrap_branch_bytes.py(bloba2892e45to0b14df90), +51 -15 against34eb466e. No tool, no template and notests/conftest.pychanges. This body is ASCII, apart from the footer's emoji:<ff>stands for the one byte 0xFF, which a Latin-1 terminal shows as U+00FF.What
Under a Latin-1 locale (
LOCPATH,LC_ALL=en_US.ISO-8859-1,PYTHONUTF8=0, built as #1153'slatin1fixture builds it) four rows failed on main. Each now runs the asserts that judge there, then skips on its premise withskip_where_the_locale_does_not_spell_it_as_utf_8("a\udcffb", A_BYTE_READ_AS_A_SURROGATE), asked just before the first line that spells the name:test_a_branch_past_the_pin_is_moved_back_whatever_its_upstream_is_named[the-byte-0xff](test_bootstrap_non_utf8_branch.py)moved backlinetest_a_leg_on_a_branch_whose_name_is_not_utf8_is_placed_on_every_run[make-bootstrap](same file)the leg was on a\udcffblinetest_a_leg_on_a_branch_whose_name_is_not_utf8_is_placed_on_every_run[--branch-a<ff>b](same file)on a\udcffblinetest_a_name_that_is_not_utf8_is_still_carried_and_the_branch_made(test_bootstrap_branch_bytes.py)branch a\udcffb createdline7837d499)The guard's reason, as pytest prints it for each:
this locale's encoding (iso8859-1) reads b'a\xffb' as 'a\xffb', not as 'a\udcffb': the row needs a byte that is not UTF-8, which Python reads in as a surrogate (U+DC80 to U+DCFF) where the locale is UTF-8 or ASCII; here it is a character, and the tool takes it as one.Under Latin-1 the two files go from
4 failed, 83 passed, 5 skippedto83 passed, 9 skipped. Under UTF-8 (92 passed) and ASCII (86 passed, 6 skipped) no row changes its outcome, by test id (see Measured).Why
The tool is right; the rows asked UTF-8's question. Re-measured on main
34eb466e, with pytest itself in each locale. Under Latin-1 the byte 0xFF is the character U+00FF, soscripts/bootstrap.pyprints the branch as that character where UTF-8 and ASCII print the surrogate U+DCFF as\udcff. Each failed row's later asserts are the ones the tool answers rightly, and under the guard they now run and pass in a Latin-1 pytest: the run exits 0 with no traceback,bootstrap okends it (rows 2 and 3), the branch is at the pin (row 1), HEAD's bytes arerefs/heads/a<ff>borrefs/heads/main(rows 1 to 4), and the leg's commit is the pin (row 1, and rows 2 to 4 since review round 1). Only the spelling of the name differs. These are #1214's kind a, as #1258 put it: "the tool runs and answers rightly for the bytes Latin-1 gives, and the row expects UTF-8's reading or spelling". None is a tool defect, and none is #1259's, #1285's or #1283's row.The decision: guard each row on its premise, as #1258 did for this kind.
skip_where_the_locale_does_not_spell_it_as_utf_8(text, premise)is asked only of the text the row's premise is about, and just before the first line that needs it. The text is the name as the row spells it,"a\udcffb"(row 1 asksraw, and only wherebyteis true: its other parameter, an upstream ending in U+00A0, is not about the byte and already skips under a one-byte locale throughNEEDS_A_UTF8_PROCESS).Rejected:
git -C spec merge --ff-only 'origin/a<ff>b', where UTF-8's is theprintfword"$(printf -- 'origin/a\377b')"(the assembly root's bootstrap.py: thegit -C <leg> merge --ff-only '<upstream>'line names an upstream that is not UTF-8 by its\udcXXescape, so it does not paste #932). Row 4 runs the child withPYTHONIOENCODING=utf-8:strict, which writes U+00FF as two bytes. That is three spellings of one name, each re-deriving what the tool prints, in rows whose job is that a name that is not UTF-8 is carried. validate-family.py: the holder's gate escapes what its stdout cannot encode, so it passes under Latin-1 where it ended in a traceback, and 45 rows in 11 test files that cannot judge under a one-byte locale skip there on their own premise (#1214) #1258 and tests: under a Latin-1 locale 12 of the 13 rows of #1259 skip on their own premise or read their UTF-8 file as UTF-8, and the 13th, the assembly root bootstrap.py saying it could not create a branch it made, is left failing for its own issue (#1259) #1278 chose the guard for this kind, and what step (a) does under Latin-1 is assembly-root bootstrap.py: under Latin-1,tracking_branchtb\udcffxis made with HEAD on it at the pin, but_head_ofreads the ref as another text, so it sayscould not create branch, thengit refused to check it out, both false (#1259 row 13) #1283's question, for which lane 1's assembly-root bootstrap.py: step (a) asks whether HEAD is on the tracking branch by the bytes git was handed, so under a Latin-1 localetb\udcffxis said created, then on, where it saidcould not create branchandgit refused(#1283) #1300 adds a file of rows that runbootstrap.pyin a Latin-1 child.skipifon the locale. Either skips before the asserts that judge under Latin-1 and loses them. validate-family.py: the holder's gate escapes what its stdout cannot encode, so it passes under Latin-1 where it ended in a traceback, and 45 rows in 11 test files that cannot judge under a one-byte locale skip there on their own premise (#1214) #1258's rule is to ask the text the premise is about, just before the line that needs it.skip_where_a_name_cannot_be_not_utf_8, or anything intests/conftest.py. Row 4 calls it first, and tests/conftest.py and tests/test_adopt_plan_paths_spelled.py: under a one-byte locale such as Latin-1 the 0xff--work-dirrow skips and the two U+00E9 rows read the child's UTF-8, so none of the three fails on a tool that is right, and the bytes helper starts its child asrun_scriptdoes (#1196) #1209 (lane 4's draft) changes it. validate-family.py: the holder's gate escapes what its stdout cannot encode, so it passes under Latin-1 where it ended in a traceback, and 45 rows in 11 test files that cannot judge under a one-byte locale skip there on their own premise (#1214) #1258 kept the locale question out of it, so that a row about a branch that is not UTF-8 "judges there too (tests/conftest.py: follow-up of PR #1209 (#1196) from its review: the helper's locale skip also catches 80 rows that can judge the tool under a one-byte locale, and four smaller gaps (a Windows failure, an unheld order, a triple predicate, a docstring) #1224's N1)". This PR leaves it alone (see Row 4 and tests/conftest.py and tests/test_adopt_plan_paths_spelled.py: under a one-byte locale such as Latin-1 the 0xff--work-dirrow skips and the two U+00E9 rows read the child's UTF-8, so none of the three fails on a tool that is right, and the bytes helper starts its child asrun_scriptdoes (#1196) #1209).Measured
Python 3.12.3, pytest 9.1.1, git 2.43.0, in the probe environment (a stub
ghfirst on PATH,GH_TOKEN=bogus-w1301a, an emptyGH_CONFIG_DIR,GIT_CONFIG_GLOBAL=/dev/null,GIT_SSH_COMMAND=false,EMAILset,LANES_LANEunset). A Python started in each locale reportsiso8859-1,utf-8andasciiforsys.getfilesystemencoding()(UTF-8 isLC_ALL=C.UTF-8; ASCII isLC_ALL=C PYTHONUTF8=0 PYTHONCOERCECLOCALE=0). The first commit's runs usedGH_TOKEN=bogus-w1301a; review round 1's runs, by a second writer, usedGH_TOKEN=bogus-w1302nand the same Latin-1 build.The two files,
-v -rfs, on main34eb466e, on the first commit7837d499and on head371264be. The main column is from before round 1. The other two ran in round 1, on a host with other lanes' tests running, so their times are not comparable with the main column:7837d499371264be4 failed, 83 passed, 5 skipped in 17.31s83 passed, 9 skipped in 25.15s83 passed, 9 skipped in 27.82s92 passed in 19.20s92 passed in 27.01s92 passed in 29.88s86 passed, 6 skipped in 18.73s86 passed, 6 skipped in 24.91s86 passed, 6 skipped in 24.94sBy test id, the 92 ids of the two files, main against the first commit
7837d499(PASSED,FAILED,SKIPPED). Round 1's commit changes no id: head371264beagainst7837d499is 92 ids with 0 differing in outcome under each of Latin-1, UTF-8 and ASCII (a script over the saved-voutput of the six runs above), so the table holds at head:[the-byte-0xff][make-bootstrap][--branch-a<ff>b]..._still_carried_and_the_branch_madeCompared id by id with a script over the saved
-voutput: 4 ids change under Latin-1, none under UTF-8, none under ASCII. Under Latin-1 the 5 skips main already had are unchanged: the 4NEEDS_A_UTF8_PROCESSrows andtests/test_bootstrap_branch_bytes.py:438at the head (:436at7837d499;UNWRITABLE). The 4 new skips are the guard's, attests/conftest.py:1334.The asserts that still run under Latin-1
The rows were traced under Latin-1 with a
sys.settraceplugin (kept in the scratch folder, not in the PR) that records the lines each test's own frame ran. Line numbers are head's (371264be), and round 1 traced the five ids again at it (5 skipped in 7.14s). The asserts round 1 added are in bold.needs_the_byte, the run, :233 exit 0, :234 noTraceback, :235rev(leg, refs/heads/a<ff>b) == pin(the branch at the pin), :236rev(leg) == pin(HEAD at the pin), :237 HEAD's bytes equalrefs/heads/a<ff>b. The guard is :238-240.moved back ... origin/a\udcffb ... printflineTraceback, :311bootstrap ok, :313 the lineon main at <pin> (branch tip == pin). Then :315 HEAD's bytes equalrefs/heads/main, and :317rev(leg) == pin(the leg's commit is the pin). The guard is :318-319.the leg was on a\udcffb ..., asked of each runrefs/heads/a<ff>b, and :317rev(leg) == pin. The guard is :318-319.on a\udcffb at <pin>and thethe leg was online, asked of each runskip_where_a_name_cannot_be_not_utf_8(first, as on main), :387 exit 0 and noTraceback, then forspecandcode: :389 nocould not create branch, :393 HEAD's bytes equalrefs/heads/a<ff>b, and :394-395 the leg'srev-parse HEAD, first 12 characters, equalspin12. The guard is :396-397.branch a\udcffb created at <pin12> ... at the pinline of each legWhat I moved, and why the meaning stays. I moved the asserts that spell the name down, past the guard, and left every other assert where it judges. Read the other way:
rev(leg, f"refs/heads/{raw}") == pin,rev(leg) == pinandhead_bytes(leg) == ...moved up, above the line that spells the name. Each reads git, never stdout, so the order changes nothing.Tracebackandbootstrap okasserts, and row 2'son mainassert (it spells no byte). It now appends each run's stdout toprinted. The guard comes after the loop, HEAD's bytes and (round 1) the leg's commit. Then one loop overprintedasks what spells the name: row 3'splacedassert, and the(placed + left in stdout) is (not given and run == 1)assert of both rows, word for word. Each assert is asked once per run, as before.createdassert, which spelled the name, moved from the loop overspecandcodeto a second loop after the guard.could not create branch, HEAD's bytes and (round 1) the leg's commit stay in the first loop.Under UTF-8 and ASCII every assert main asked is still asked, the same number of times (r1302a counted them by trace), so a regression that fails one fails it there, in another order for rows 2 to 4 (a failure of run 1's name line is now reported after run 2 has run). Round 1 adds two assert lines to that set:
assert rev(leg) == pinin rows 2 and 3, and the leg's commit in row 4's first loop (run once for each leg). They pass wherever the tool is right: the two files pass under all three locales above.The branch's commit, judged under Latin-1 since round 1 (r1302a's NIT 1). In the first commit, rows 3 and 4 judged the branch at the pin only through a line that spells the name, which Latin-1 never reaches, and row 4 judged it in no locale. HEAD's bytes are already asserted to be the branch, so the leg's commit is the branch's commit, and
371264beasks for it before each guard. To show that it judges, a tool fault was run (r1302a's TF4, rewritten as the smallest patch that does it,fault.pyin the scratch folder). In a scratch clone it patchestemplates/assembly-root/scripts/bootstrap.pyso that aftermain()returns, in each leg that has the brancha<ff>b, it makes a commit on HEAD's tree with HEAD as its parent and points HEAD at it: the checked-out branch stands one commit past the pin. The five ids of the four rows (row 1 has a second parameter, the upstream ending in U+00A0) ran under Latin-1 and UTF-8,-v -rfs, with the fault, once at7837d499and once at371264be. After each pair of runs the file was written back fromgit cat-file blob HEAD:<path>:git hash-objectprinted41c2eb42b56390a5b958940a0abc84e7a3c98db8, the blob at HEAD, for both trees, andgit status --porcelainwas empty. The worktree of this PR was never mutated.7837d499, Latin-17837d499, UTF-8371264be, Latin-1371264be, UTF-8[the-byte-0xff][make-bootstrap][--branch-a<ff>b]..._still_carried_and_the_branch_made[an-upstream-ending-in-U+00A0]2 failed, 3 skipped in 6.94s3 failed, 2 passed in 7.31s4 failed, 1 skipped in 7.90s4 failed, 1 passed in 8.13sRows 3 and 4 now fail under both locales, at the new asserts (:317 and :394), where at
7837d499row 3 skipped under Latin-1 and row 4 skipped under Latin-1 and passed under UTF-8 (row 3 under UTF-8 failed at :321, in7837d499's numbering, only through the line that spells the name). Row 1 fails at :235 at both. Row 2's leg ends onmain, but the test makes the brancha<ff>bin it, so the fault fires there too: run 2 then reportsPIN ... != branch main tip ...where :313 expectsbranch tip == pin, and the row fails at :313 before the new :317 is reached, at both. The U+00A0 parameter is not about the byte and the fault does not reach it.Row 4 and #1209
#1209 (lane 4's draft, head
13a2c58cb79d640ed6392edef77cf5d27ed9d2b3) changesskip_where_a_name_cannot_be_not_utf_8, which row 4 calls first. #1209 does not touch either test file of this PR.4 failedabove).tests/conftest.py:1334), after 7 asserts (5 at7837d499).--work-dirrow skips and the two U+00E9 rows read the child's UTF-8, so none of the three fails on a tool that is right, and the bytes helper starts its child asrun_scriptdoes (#1196) #1209: the merge is not clean. Round 1 fetched tests/conftest.py and tests/test_adopt_plan_paths_spelled.py: under a one-byte locale such as Latin-1 the 0xff--work-dirrow skips and the two U+00E9 rows read the child's UTF-8, so none of the three fails on a tool that is right, and the bytes helper starts its child asrun_scriptdoes (#1196) #1209's head into a scratch clone (git fetch --no-write-fetch-head <origin> +refs/pull/1209/head:refs/l1/pr/1209; it is still13a2c58cb79d640ed6392edef77cf5d27ed9d2b3, andorigin/mainin that clone is5f06c3eb). Each command below is printed as it was run, with the tree it gave and its exit code:Each prints one conflict,
CONFLICT (add/add): Merge conflict in tests/test_adopt_plan_paths_spelled.py, which this PR does not touch. The second command is main against #1209 alone, so the conflict is #1209's against main and not this PR's. The trees differ because a conflicted tree holds the arguments as typed in its conflict markers (<<<<<<< 7837d499,<<<<<<< origin/main, each against>>>>>>> refs/l1/pr/1209): one commit spelled two ways gives two trees. The first version of this body printed8e4ba1ab, which is the tree ofHEAD refs/l1/pr/1209, beside the command with7837d499(r1302a's NIT 2); the commands above are the ones run. To measure row 4 anyway, at7837d499, I took the merge tree of the two heads (it differs between the spellings only in that one file's markers), resolved the one file to the side of this head (blob7b15d2aa, which is stage 2 in the output) in a scratch index, and made acommit-treeof it with both parents (a46fb0807, never pushed). #1209'stests/conftest.pymerged without a conflict. A detached scratch worktree of it gave the table below, measured at7837d499and not re-run at371264be:a46fb0807(head + #1209)83 passed, 9 skipped in 20.17s92 passed in 21.72stests/conftest.py:1187, with no assert run:this system's file name encoding (iso8859-1) reads the byte 0xFF as '\xff', not as '\udcff', so no file name here is one that is not UTF-8; the new guard is not reachedtests/conftest.py:1353), as at headThe ids of the two files under Latin-1 are the same at
7837d499and at7837d499+ #1209. So with #1209 row 4 neither fails nor skips twice: the first skip ends the test, and it is #1209's helper that ends it. It skips on a reason that is the same premise as the new guard's (the byte reads as a character). What changes is how much runs first: at7837d499, 5 asserts judge under Latin-1 before the skip (7 at371264be), and with #1209 none does, because #1209 asks the locale before the run. Round 1 added asserts only above row 4's guard and touched no helper, so with #1209 row 4 still ends at #1209's helper before any assert; that is a reading of the diff, not a run at371264be. #1258 kept the locale question out of that helper so a row about a branch that is not UTF-8 judges in every locale (#1224's N1). Whether #1209 should keep it out too is lane 4's and lane 1's call, and this PR changes neither the helper nortests/conftest.py. If #1209 lands first the new guards stay correct: under Latin-1 row 4's guard is then never reached, and under UTF-8 and ASCII it passes through.git merge-tree --write-tree 371264be origin/mainis clean (exit 0, treeb0a4b55d344333ef36c48ba72db518f498d78382;origin/mainis5f06c3ebin that clone). While main had not moved,7837d499 origin/maingavec7c0368e1ae16cb84f778b08e0cb75eda834f296, head's own tree. No open PR changes either test file: lane 1 checked the open PRs' files at 09:16Z, and r1302a checked 25 open PRs again (#1209, #1282 and #1300 touch only the neighbouring files).Mutants
Four mutants, each applied alone in a detached scratch worktree of head (
7837d499) and run over the two files under Latin-1 and UTF-8. After each, both files were written back fromgit cat-file blob HEAD:<path>and proved equal to HEAD's blobs bygit hash-object(00af26c940cd055ebcfcc23afd25136ff1ea1459and561f4c320583fff346fc06e9ae0b8def9ca4f679,EQUALfour times). The worktree of this PR was never mutated. They ran at7837d499, before round 1, and were not re-run at371264be: the guards and asserts they change are the same lines, one or two lines further down. r1302a re-ran M1 to M4 at7837d499and got these counts exactly.1 failed, 83 passed, 8 skipped in 18.63s: row 1[the-byte-0xff]alone, at themoved backline92 passed in 20.08s2 failed, 83 passed, 7 skipped in 17.29s:[make-bootstrap]and[--branch-a<ff>b]92 passed in 18.76s1 failed, 83 passed, 8 skipped in 17.23s: row 4, at thecreatedline92 passed in 18.53s"ab", which is all ASCII4 failed, 83 passed, 5 skipped in 18.51s: all four rows92 passed in 19.93s4 of 4 killed, no survivor. Each mutant that fails under Latin-1 fails the ids that failed on main, at the assert that spells the name: M1 at the
moved backassert, M2 at row 3'splacedassert and row 2'sleftassert, M3 and M4 at row 4'screatedassert, and M4 also at those of rows 1 to 3. No id changes under UTF-8. M4 shows the guard skips because of the name: asked of ASCII it does not skip, and the four rows fail again.Tests
In the probe environment, at most 2 calls at once, one basetemp per slot,
df -h /workspaceanddf -i /checked first (51G free and 35% of inodes in use for calls 1 to 16; 48G free and 36% for calls 17 to 25). Calls 1 to 16 were run for the first commit, at7837d499unless a row says otherwise. Calls 17 to 25 are review round 1's, at head371264beunless a row says otherwise. Python 3.12.3.34eb466e4 failed, 83 passed, 5 skipped in 17.31s92 passed in 19.20s86 passed, 6 skipped in 18.73s83 passed, 9 skipped in 22.91s92 passed in 24.63s86 passed, 6 skipped in 20.23s5 skipped, 87 deselected in 5.37s(the fifth is the U+00A0 parameter, skipped as on main)5 passed, 87 deselected in 5.64sa46fb0807)83 passed, 9 skipped in 20.17s92 passed in 21.72s1 skipped in 1.41s1 passed in 1.56s1 failed, 83 passed, 8 skipped;2 failed, 83 passed, 7 skipped;1 failed, 83 passed, 8 skipped;4 failed, 83 passed, 5 skipped92 passedeach (in 20.08 s, 18.76 s, 18.53 s, 19.93 s)tests/test_bootstrap_*.py(13 files, listed to a file and passed withxargs -d '\n' -a), UTF-8643 passed, 3 skipped in 196.87stests/test_path_guard_hygiene.py,tests/test_no_auto_maintenance.py,tests/test_repo_hygiene.py, UTF-8280 passed, 2 skipped in 25.09s83 passed, 9 skipped in 27.82s92 passed in 29.88s86 passed, 6 skipped in 24.94s7837d499, run again83 passed, 9 skipped in 25.15s7837d499, run again92 passed in 27.01s7837d499, run again86 passed, 6 skipped in 24.91s5 skipped in 7.14s7837d499, Latin-1 then UTF-82 failed, 3 skipped in 6.94s;3 failed, 2 passed in 7.31s4 failed, 1 skipped in 7.90s;4 failed, 1 passed in 8.13stests/test_bootstrap_ref_store.py:102(this git, 2.43.0, makes no reftable repository). Call 16's 2 aretests/test_no_auto_maintenance.py:222, because the probe environment setsGIT_CONFIG_GLOBAL=/dev/null.tests/test_shape_doctor.pyandtests/test_scaffold_leg_path_collisions.py(noadopt-project.pychange), and the doc trio (no doc, code or--helpchange).371264be: calls 7 to 16 (the traces, head + tests/conftest.py and tests/test_adopt_plan_paths_spelled.py: under a one-byte locale such as Latin-1 the 0xff--work-dirrow skips and the two U+00E9 rows read the child's UTF-8, so none of the three fails on a tool that is right, and the bytes helper starts its child asrun_scriptdoes (#1196) #1209, the mutants, the 13tests/test_bootstrap_*.pyfiles and the gate trio) ran at7837d499. Round 1 adds three lines inside two test bodies and no helper. The modules that import helpers from the two files (test_bootstrap_casefold_twin.py,test_bootstrap_pasteable_lines.py,test_bootstrap_create_twins.py,test_yaml_reader_spaces.py,test_assembly_root_unreadable_paths.py) were not run again, and r1302a ran the 13 files (643 passed, 3 skipped) and the gate trio (280 passed, 2 skipped) at7837d499too.git diff --check 34eb466e 371264beis clean, no added line in it is over 79 characters, and the diff is ASCII.Review round 1 (r1302a)
r1302a (an Opus reviewer) reviewed
7837d499and posted its review on this PR as issuecomment-6764610007. Verdict: READY, with no MUST, no SHOULD and three NITs. It confirmed that the four rows go from FAILED to SKIPPED under Latin-1 and that no other id changes outcome in any locale, and that every assert main asked under UTF-8 and ASCII is still asked, the same number of times and with the same text. Nine of its ten mutants were killed and the tenth (R2) is equivalent. This round applied all three NITs:371264beaddsassert rev(leg) == pinafter HEAD's bytes in rows 2 and 3 (:317), and the leg'srev-parse HEADagainstpin12in row 4's first loop (:394-395), each before its guard: 3 lines in two files, nothing else changed. With the fault, rows 3 and 4 now fail under Latin-1 and UTF-8 (table in The asserts that still run). The two files give the same outcomes by id as7837d499under all three locales.git merge-tree --write-tree 7837d499 refs/l1/pr/1209was the tree ofHEAD refs/l1/pr/1209.7837d499 refs/l1/pr/1209gives8db01c84, exit 1;origin/main refs/l1/pr/1209gives827fa790, exit 1). The conflict is the same file, and the same against main. The cause is in the section.5f06c3eb(#1278) since the body was written, so "main had not moved" and "one commit above main" were stale.34eb466e, that main is5f06c3eb, and that r1302a measured the merge with it: the same outcomes by test id under Latin-1, UTF-8 and ASCII.git merge-tree --write-tree 371264be origin/mainis clean (exit 0).Known limits
"a\udcffb", the one name these rows use. A row in these files that names another byte needs a guard of its own; none does. Windows and macOS were not run: the rows skip there throughneeds_the_byteandskip_where_a_name_cannot_be_not_utf_8, unchanged.--work-dirrow skips and the two U+00E9 rows read the child's UTF-8, so none of the three fails on a tool that is right, and the bytes helper starts its child asrun_scriptdoes (#1196) #1209 skips before any assert runs (see Row 4 and tests/conftest.py and tests/test_adopt_plan_paths_spelled.py: under a one-byte locale such as Latin-1 the 0xff--work-dirrow skips and the two U+00E9 rows read the child's UTF-8, so none of the three fails on a tool that is right, and the bytes helper starts its child asrun_scriptdoes (#1196) #1209), and tests/conftest.py and tests/test_adopt_plan_paths_spelled.py: under a one-byte locale such as Latin-1 the 0xff--work-dirrow skips and the two U+00E9 rows read the child's UTF-8, so none of the three fails on a tool that is right, and the bytes helper starts its child asrun_scriptdoes (#1196) #1209 conflicts with main in a file this PR does not touch.371264be). What Latin-1 still cannot judge in these rows is each line that spells the name, which is what the guards skip. The fault that shows it judging is one kind: the checked-out branch one commit past the pin, in a leg that hasa<ff>b.could not create branchand HEAD's bytes" and does not name the leg's commit. Round 1 changed no line outside the three asserts, so it stands as written.Not in this PR
templates/assembly-root/scripts/bootstrap.py(lane 1's assembly-root bootstrap.py: step (a) asks whether HEAD is on the tracking branch by the bytes git was handed, so under a Latin-1 localetb\udcffxis said created, then on, where it saidcould not create branchandgit refused(#1283) #1300, for assembly-root bootstrap.py: under Latin-1,tracking_branchtb\udcffxis made with HEAD on it at the pin, but_head_ofreads the ref as another text, so it sayscould not create branch, thengit refused to check it out, both false (#1259 row 13) #1283, changes it), ortests/test_bootstrap_branch_one_byte_locale.py(assembly-root bootstrap.py: step (a) asks whether HEAD is on the tracking branch by the bytes git was handed, so under a Latin-1 localetb\udcffxis said created, then on, where it saidcould not create branchandgit refused(#1283) #1300 adds it).tests/conftest.py, andskip_where_a_name_cannot_be_not_utf_8in particular (tests/conftest.py and tests/test_adopt_plan_paths_spelled.py: under a one-byte locale such as Latin-1 the 0xff--work-dirrow skips and the two U+00E9 rows read the child's UTF-8, so none of the three fails on a tool that is right, and the bytes helper starts its child asrun_scriptdoes (#1196) #1209's).tests/test_bootstrap_spelling.py,tests/test_pinned_copy_text.pyandtests/test_family.py(tests: under a Latin-1 locale 12 of the 13 rows of #1259 skip on their own premise or read their UTF-8 file as UTF-8, and the 13th, the assembly root bootstrap.py saying it could not create a branch it made, is left failing for its own issue (#1259) #1278), tests: 16 rows of test_family.py and test_pinned_copy_text.py fail under an ASCII locale and pass under UTF-8, 15 of them reading a UTF-8 file with read_text() and no encoding, and none is in #1259 or #1278 (RV1278 NIT-2) #1285's 16 ASCII rows, and assembly-root bootstrap.py: under Latin-1,tracking_branchtb\udcffxis made with HEAD on it at the pin, but_head_ofreads the ref as another text, so it sayscould not create branch, thengit refused to check it out, both false (#1259 row 13) #1283's row.371264be; the lines that spell the name are still skipped there, by the guards, and are asked under UTF-8 and ASCII.Lane: openreposhape-1 (openRepoShape-1)
🤖 Generated with Claude Code