Skip to content

Actually fix the two collapsed runbook snippets from #129, and guard the class - #136

Open
jonfroehlich wants to merge 1 commit into
mainfrom
docs/fix-vistas-snippets
Open

Actually fix the two collapsed runbook snippets from #129, and guard the class#136
jonfroehlich wants to merge 1 commit into
mainfrom
docs/fix-vistas-snippets

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Review finding 14 on #129 was reported fixed and was not. Correcting the record along with the code.

What happened. The patch script that fixed it was a quoted bash heredoc, which strips one level of backslash — so the replacement text's trailing \ + newline became a Python line continuation and the newline was removed. The output was the same collapsed line it was meant to repair. The --op-threshold correction in the same replacement did apply, so the diff looked right.

Both snippets now carry real continuations (written via chr(92), so no layer can eat them):

python scripts/model_comparison/compare.py benchmark/richmond \
    --models rampnet,vistas:curb-cut,vistas:curb-cut+curb

The guard matters more than the two lines. A collapsed continuation still executes, still reads as fine, and its only symptom is that a reader copying the wrapped form gets a broken command — so nothing catches it, including a careful review. test_no_runbook_snippet_has_a_collapsed_line_continuation walks every shell block in the runbook docs and rejects run-on spaces mid-command, excluding the two forms that legitimately use them: aligned trailing comments, and lines that still carry their backslash. It found nothing beyond these two.

Suite 1,238 → 1,239.

🤖 Generated with Claude Code (claude-opus-5[1m], effort: high)

…126)

Review finding 14 on #129 was reported fixed and was not: the patch script that
"fixed" it was written as a quoted bash heredoc, which strips one level of
backslash, so the replacement text's trailing "\" + newline became a Python
line continuation and the newline was removed. The result was the same collapsed
line it was meant to repair -- with the --op-threshold correction applied around
it, which is why the diff looked plausible.

Both snippets now carry real continuations, written via chr(92) so no layer can
eat them.

The guard is the point: a collapsed continuation still runs, still looks fine at
a glance, and its only symptom is that someone copying the wrapped form gets a
broken command -- so nothing catches it. The new test walks every shell block in
the runbook docs and rejects run-on spaces mid-command, excluding the two forms
that legitimately use them (aligned trailing comments, and lines that still have
their backslash). It found nothing else, so these two were the only ones.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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