docs(6209): test prose in the present tense — "used to", "previously", "before this" restated as the failure shape
Twenty-eight test files described the code they guard by what it did before a fix. Each is now the property and the failure it prevents, in the present tense: the backfill snapshot, the per-dial calibration query, the rule scope, the lesson trigger filter, the subshell global, the trash owner scope, the version readout fallback, and others. A docstring line that narrated the backup suite's own history is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -119,13 +119,13 @@ def test_an_unusable_marker_is_refused_rather_than_sent(tmp_path, body):
|
||||
|
||||
|
||||
def test_the_reason_survives_the_command_substitution_that_fetches_it(tmp_path):
|
||||
"""Regression on a bug this nearly shipped with.
|
||||
"""The reason cannot be a global the function sets.
|
||||
|
||||
The reason used to be a global the function set, which every caller reads
|
||||
through `$( )` — a subshell, so the assignment died with it and the caller
|
||||
saw an UNSET variable. The hooks all run `set -u`, where reading one aborts
|
||||
the script: a directory with a misaddressed marker would have cost the
|
||||
session its entire SessionStart context, to fetch a warning about a file.
|
||||
Every caller reads the function through `$( )` — a subshell, so a global
|
||||
assignment dies with it and the caller sees an UNSET variable. The hooks all
|
||||
run `set -u`, where reading one aborts the script: a directory with a
|
||||
misaddressed marker would cost the session its entire SessionStart context,
|
||||
to fetch a warning about a file.
|
||||
|
||||
So the reason comes back through stdout with the id, and this asserts on
|
||||
the shape the caller actually uses: read in a subshell, split, and used
|
||||
|
||||
Reference in New Issue
Block a user