Fix ia-candidate marker HTML-comment wrapper loss (kotkan/claude-plugin-inference-arbitrage#23) #27

Merged
oleks merged 3 commits from fix/issue-23-marker-wrapper into main 2026-07-30 19:54:28 +03:00

3 Commits

Author SHA1 Message Date
Oleks 5f5462571c Use 4-backtick outer fence (markdownlint MD048 requires backtick, not tilde)
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
The tilde fence from the previous commit avoided the nesting collision but
violated this repo's markdownlint style (backtick-only), which the pre-push
hook enforces and rejected. A 4-backtick outer fence with the real 3-backtick
example nested inside satisfies both: CommonMark only closes a fence on a
matching-or-longer run of the same character, and MD048 sees backticks
throughout.
2026-07-30 19:25:27 +03:00
Oleks 64d6c90284 Fix nested code-fence collision the pre-push formatter introduced
The previous commit nested a triple-backtick example fence inside a
triple-backtick pseudocode block; the repo's markdown auto-formatter treated
the inner ``` as closing the outer block and reindented/moved the "for
action == comment" case out of the Agent(...) call. Use ~~~ for the outer
fence so the real triple-backtick example nests without collision.
2026-07-30 19:24:54 +03:00
Oleks b77fbdddbb Fix marker-wrapper loss and add backward-compat match (kotkan/claude-plugin-inference-arbitrage#23)
Root cause: bin/filing-plan and references/issue-template.md always render
the ia-candidate marker HTML-comment-wrapped. A direct issue_write probe
confirmed the Gitea MCP write path preserves a literal <!-- --> unchanged, so
the loss on oleks/claude-plugin-cluster#56 and #57 happened on the
Agent(anxious:issuer-agent) relay hop: an HTML comment is invisible when its
surrounding text is read as markdown, so an agent relaying "what the body
should say" instead of pasting it verbatim can silently drop it.

Two fixes:
- bin/filing-plan: find_existing()'s marker_re() now also matches the bare,
  unwrapped "ia-candidate: <id>" line (end-of-line anchored, not \b, since
  candidate ids contain "-" and a word-boundary check would false-match a
  longer id sharing a prefix) so already-filed issues like cluster#56/#57
  are still recognized and not duplicate-filed.
- skills/offload-audit/SKILL.md: the issuer delegation prompt now fences the
  rendered body in its own code block and explicitly warns that the leading
  marker is an invisible-by-design HTML comment, not stray syntax to clean
  up, instead of inlining it as bare markdown the relaying agent could read
  right through.

references/issue-template.md documents both, and tests/filing.test.sh adds
coverage for the bare-marker match plus a same-prefix-different-id
non-match case.

Bumps plugin.json to 0.7.1.
2026-07-30 19:24:13 +03:00