Commit 6c8c67d
Address PR R0 P3s: bootstrap placeholder + hardening test coverage
P3 #1 (Maintainability): The bootstrap-skip branch — when BASE_SHA does
not yet contain `tools/notebook_md_extract.py` and the PR touches tutorials
— previously only logged "skipped" to stdout without emitting anything to
the compiled prompt. The reviewer would see no prose section AND no
indication why. Restructured the prose-extraction block so CHANGED_NB is
computed unconditionally, and added an `elif [ -n "$CHANGED_NB" ]` branch
that emits a `<notebook-prose untrusted="true">` placeholder explaining
the one-shot bootstrap state and listing the changed tutorial files. This
PR itself is the bootstrap case but doesn't touch tutorials, so the path
is currently exercised only structurally; the first tutorial-touching PR
after merge stops triggering this branch entirely.
P3 #2 (Tech Debt): Extended `TestWorkflowPromptHardening` with two
parametrized-style tests mirroring the existing `<pr-title>`/`<pr-body>`
coverage: one asserts the `<notebook-prose untrusted="true">` wrapper +
closing tag are present in the workflow YAML; the other asserts the
sanitizer escapes `</notebook-prose>` to `</notebook-prose>`. A
future workflow edit that drops the wrapper or sanitizer for the new tag
now fails the test suite.
All 16 tests in TestWorkflowPromptHardening + test_notebook_md_extract pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f3ca8c7 commit 6c8c67d
2 files changed
Lines changed: 50 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
263 | 265 | | |
264 | | - | |
265 | | - | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
298 | 319 | | |
299 | 320 | | |
300 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1754 | 1754 | | |
1755 | 1755 | | |
1756 | 1756 | | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
1757 | 1784 | | |
1758 | 1785 | | |
1759 | 1786 | | |
| |||
0 commit comments