Title: fix(workflow): drafts whose inner code example is unclosed still escape the link check past the example (#400 residual) · Issue #401 · developing-today/code · GitHub
Open Graph Title: fix(workflow): drafts whose inner code example is unclosed still escape the link check past the example (#400 residual) · Issue #401 · developing-today/code
X Title: fix(workflow): drafts whose inner code example is unclosed still escape the link check past the example (#400 residual) · Issue #401 · developing-today/code
Description: Finding PR #400's nesting-aware fence scanner (fixes #393) still lets a trigger-issue draft escape the link check when the draft's embedded code example is itself unclosed. Everything in the draft from the example's opening fence onward ...
Open Graph Description: Finding PR #400's nesting-aware fence scanner (fixes #393) still lets a trigger-issue draft escape the link check when the draft's embedded code example is itself unclosed. Everything in the draft ...
X Description: Finding PR #400's nesting-aware fence scanner (fixes #393) still lets a trigger-issue draft escape the link check when the draft's embedded code example is itself unclosed. Everything in th...
Opengraph URL: https://github.com/developing-today/code/issues/401
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fix(workflow): drafts whose inner code example is unclosed still escape the link check past the example (#400 residual)","articleBody":"## Finding\n\nPR #400's nesting-aware fence scanner (fixes #393) still lets a trigger-issue draft escape the link check when the draft's embedded code example is itself unclosed. Everything in the draft from the example's opening fence onward is stripped before link checking, so any pointer/link after the example is silently unchecked — the same silent-escape failure mode as #382 / #391 / #393.\n\nTwo shapes reproduce it on current main `2b9b424a` via `links()` in `scripts/research_workflow.py`:\n\n1. **Inner example never closed** — the draft's own closing fence is consumed as the example's close:\n ````markdown\n ```markdown\n ```python\n print(1)\n - [concept](missing/a.md)\n \u003c!-- workflow:issue {\"package\": \"pkg\", \"concept\": \"C001\", \"stage\": \"S1\"} -->\n ```\n ````\n Result: no error. The broken pointer `missing/a.md` is never checked. Adding a second closing fence after it changes nothing — still no error.\n\n2. **Inner example closed with a shorter fence than it opened with** (opens ` ````python `, closes ` ``` `): the short bare fence is literal content under `fence_events()`' length rule, so the example is again unclosed and a broken pointer after it passes silently.\n\nControl (the shape PR #400's regression tests cover — pointer before a properly closed ```` ```python ```` example) correctly raises `missing link target: missing/a.md`.\n\n## Evidence\n\n- PR: #400 (merged 2026-10-20T08:08:38Z, commit `b29a56e445ce95416101990dacbed49d42811817`, merge `2b9b424a98bc207e592680e686d55933c01e1b68`): https://github.com/developing-today/code/pull/400\n- `scripts/research_workflow.py:407` — `fence_events()`: only a bare fence at least as long as the innermost one closes a level; an unclosed inner fence therefore consumes the draft's closing fence and leaves the draft stack open.\n- `scripts/research_workflow.py:456` — `fenced_blocks()` returns the trailing unclosed block (per #400), so the draft *is* selected: its `workflow:issue` marker is seen.\n- `scripts/research_workflow.py:491` — `issue_drafts()` then strips nested blocks via `unfenced(block)`. Reparsing the block standalone, the unclosed inner fence opens at the example and never closes, so every line from the example onward classifies as fence content and is dropped from the cleaned draft. Verified directly: for shape 1, `issue_drafts()` yields `['']` while `links()` on the control shape raises.\n- Single-repo: `scripts/research_workflow.py` exists only in developing-today/code (absent from the opencode / openchamber / nix clones).\n- Deduped: issue searches for `fence`, `unclosed draft`, `research_workflow` return only #393 and #382, both closed; neither covers an unclosed *inner* fence.\n\n## Why it matters\n\n`research_workflow.py check` is the guard that draft pointers resolve before a draft is copied into a GitHub issue. #400 explicitly adopted the principle that unclosed shapes are \"checked rather than silently dropped\" for the draft's outer fence; an author who forgets to close an embedded example — or closes it with a shorter fence — is exactly the hand-authoring slip this checker exists to catch, and today it re-opens the silent escape #400 was filed to close, for every link after the example.\n\n## Acceptance criteria\n\n- [ ] A regression test with a draft whose inner code example is unclosed and which carries a broken pointer *after* the example fails `check` (and passes when the pointer is valid).\n- [ ] A regression test for the shorter-closing-fence variant (example opens with 4 backticks, closes with 3) likewise fails `check` on a broken post-example pointer.\n- [ ] Links before the example, and the existing nested/unclosed-draft behaviour from #400, are unchanged: the full workflow suite (48 tests) still passes and `python3 scripts/research_workflow.py check --repo-root .` still returns `ok: true` on the real tree.\n- [ ] Embedded example contents themselves remain exempt from link checks (a link-shaped line inside the example, closed or not, is not checked as draft prose).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-20T09:03:21Z","url":"https://github.com/developing-today/code/issues/401"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dfa8c4e6-49ed-8170-0f0d-540a3116a6c0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 89C0:B0F20:600793:80EE2B:6B0628A5 |
| html-safe-nonce | 2eef82eec7e5d411a1ae231ff234e6a5dd42d74761a6e86cf01ab5d646a6f189 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUMwOkIwRjIwOjYwMDc5Mzo4MEVFMkI6NkIwNjI4QTUiLCJ2aXNpdG9yX2lkIjoiNTQyNTQ2NTU4MTMwODg4MTA2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5817f4d7e1bcfbfcedea8b92b4ec1988eb21ce6208dadde7c0282e8c29ebf386 |
| hovercard-subject-tag | issue:5938969216 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/401/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2caf7c5cb12fca4ef0216ca311099140e4780264f1001a7c6bdf7c1fb63a497c/developing-today/code/issues/401 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2caf7c5cb12fca4ef0216ca311099140e4780264f1001a7c6bdf7c1fb63a497c/developing-today/code/issues/401 |
| og:image:alt | Finding PR #400's nesting-aware fence scanner (fixes #393) still lets a trigger-issue draft escape the link check when the draft's embedded code example is itself unclosed. Everything in the draft ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width