Title: fix(workflow): #411 marker test misses trapped draft prose when the marker sits before an unclosed inner example · Issue #414 · developing-today/code · GitHub
Open Graph Title: fix(workflow): #411 marker test misses trapped draft prose when the marker sits before an unclosed inner example · Issue #414 · developing-today/code
X Title: fix(workflow): #411 marker test misses trapped draft prose when the marker sits before an unclosed inner example · Issue #414 · developing-today/code
Description: Finding PR #411 (fix for #410, merged in e987e5c7) made the trailing-fence drop in issue_drafts() conditional on the workflow:issue marker itself being the trapped text: # scripts/research_workflow.py:567-571 on current main (7ccd2817) d...
Open Graph Description: Finding PR #411 (fix for #410, merged in e987e5c7) made the trailing-fence drop in issue_drafts() conditional on the workflow:issue marker itself being the trapped text: # scripts/research_workflow...
X Description: Finding PR #411 (fix for #410, merged in e987e5c7) made the trailing-fence drop in issue_drafts() conditional on the workflow:issue marker itself being the trapped text: # scripts/research_workflow...
Opengraph URL: https://github.com/developing-today/code/issues/414
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fix(workflow): #411 marker test misses trapped draft prose when the marker sits before an unclosed inner example","articleBody":"## Finding\n\nPR #411 (fix for #410, merged in `e987e5c7`) made the trailing-fence drop in `issue_drafts()` conditional on the `workflow:issue` marker itself being the trapped text:\n\n```python\n# scripts/research_workflow.py:567-571 on current main (7ccd2817)\ndropped = \"\\n\".join(lines[:-1])\nif \"workflow:issue\" not in draft_prose(block) and \"workflow:issue\" in draft_prose(dropped):\n block = dropped\n```\n\nThat recovers the canonical #401 shape (marker after an unclosed inner example) and preserves the #410 exemption (marker before a properly closed example that is the draft's last element). It does **not** recover the combination of the two acknowledged placements:\n\n- the marker sits **before** the inner example — the exact placement PR #411's own new test documents (\"The marker sits before the example, as in a draft whose example is an appendix\"), and\n- the inner example is **unclosed** (#401's authoring slip), so draft prose after the example's opening fence is trapped inside the example as `draft_prose()` sees it, and the draft's own closing fence is the block's trailing bare fence.\n\nIn that shape `draft_prose(block)` already contains the marker (it is before the example), so the first condition fails, the fence is kept, and the trapped prose is discarded with the closed-looking example. A broken link in the trapped prose passes the check silently — the #401 failure mode, differing only in marker position.\n\n## Evidence\n\nVerified on current main `7ccd2817` with the merged `scripts/research_workflow.py` (scratch copy, removed after):\n\nCanonical #401 shape (marker after the unclosed example) — recovered, as intended:\n- `issue_drafts()` yields the concept pointer line; the broken pointer is link-checked.\n\nHybrid shape (marker before, pointer trapped after the unclosed example):\n\n````markdown\n```markdown\n# Research\n\u003c!-- workflow:issue {\"package\": \"pkg\", \"concept\": \"C001\", \"stage\": \"S1\"} -->\n```python\nprint('example')\n- Concept Document: [concept](concepts/C001-source-preservation.md)\n```\n````\n\n- `_fenced_blocks()` yields the block with `closed=False`, trailing line is a bare fence — the same trigger shape as #401/#410.\n- `draft_prose(block)` = `'# Research\\n\u003c!-- workflow:issue ... -->'` (marker present, so no drop).\n- `draft_prose(dropped)` does surface the trapped pointer line, but it is never used because the marker test short-circuits the decision.\n- `issue_drafts()` yields only `'# Research\\n'`; `link_targets()` on the drafts is `[]` — the broken pointer `concepts/C001-source-preservation.md` never reaches the link check, so `check` passes on a draft whose pointer is broken.\n- Control: the #410 shape (marker before a *properly closed* example at the end) correctly yields the valid pointer and keeps the example's broken link-shaped line exempt — that behaviour must not regress.\n\nCross-repo: `research_workflow.py` / `draft_prose` / `issue_drafts` exist only in this repo (checked the local clones of developing-today/opencode, developing-today/openchamber and dezren39/nix — no matches), so this is a single-repo issue.\n\nDeduped: searches for `draft_prose`, \"unclosed draft\" and \"410 411 fence\" return only #401 (closed), #410 (closed) and PRs #407/#411 themselves — neither covers a marker placed before the unclosed example.\n\n## Why it matters\n\n`research_workflow.py check` is the guard that a trigger-issue draft's pointers actually resolve before the draft is copied into a GitHub issue. A whole class of drafts — marker-early / appendix-style drafts, a placement #411 itself treats as valid — silently loses that guard for any prose written after an unclosed inner example, which is precisely the slip #401 set out to recover.\n\n## Acceptance criteria\n\n- A regression test with an unclosed draft whose marker sits before an unclosed inner example, with draft prose (including a concept pointer) after the example's opening fence: the draft fails `check` when that pointer is broken and passes when it is valid.\n- The existing #401 tests (marker after the unclosed example) and the #410 tests (marker before a properly closed example at the end — example contents stay exempt, draft prose still checked) all still pass.\n- The full workflow test suite stays green and `research_workflow.py check --repo-root .` on the real tree returns ok.\n- If the two shapes are judged genuinely indistinguishable for this placement too, record that limitation explicitly in the `issue_drafts()` comment instead of leaving the marker test as an implied complete recovery, and close this issue with that rationale.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-20T12:27:29Z","url":"https://github.com/developing-today/code/issues/414"}
| 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:7f209d71-5ceb-cb69-6bea-3e40db7c84a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD08:3AD124:AD8486:E03EAB:6B06387D |
| html-safe-nonce | df276163d06b2ac4273d78c96f610d591c4667360541d9b6c5cdc619f41c92b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDA4OjNBRDEyNDpBRDg0ODY6RTAzRUFCOjZCMDYzODdEIiwidmlzaXRvcl9pZCI6IjI5OTMxNTMxMzI2MDA4OTk3MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e6c3f7941b630fb79c1e2930cf76fd38f79741dbd02b9ace6dcdff9c61bd77dd |
| hovercard-subject-tag | issue:5941612230 |
| 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/414/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ba352b6cf7f85bde881c1a5579ef752cdf8cd6357d95cea31b5cf95c79a33c41/developing-today/code/issues/414 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ba352b6cf7f85bde881c1a5579ef752cdf8cd6357d95cea31b5cf95c79a33c41/developing-today/code/issues/414 |
| og:image:alt | Finding PR #411 (fix for #410, merged in e987e5c7) made the trailing-fence drop in issue_drafts() conditional on the workflow:issue marker itself being the trapped text: # scripts/research_workflow... |
| 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 | dcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297 |
| 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 | 0f38f5735226749ec5e08a8649dce4cb2613d9ad |
| ui-target | full |
| 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