Repository navigation
Description
This was generated by AI during work-loop execution.
Context
Found during the post-green review pass on PR #1338 (fixes #611). A chatgpt-codex-connector[bot]
inline review comment on that PR flagged that #611's fix — anchoring is_comment()'s HTML-comment
branch in scripts/check-skill-portability.sh to ^[[:space:]]*<!-- (block-level only, whitespace
before the marker) — does not recognize a block-level comment nested inside a Markdown list item or
blockquote container, e.g. a portability-ok exemption written as - <!-- portability-ok: reason --> or > <!-- portability-ok: reason -->. The opener is still the first content in that Markdown
container, but the raw-line anchor classifies the line as non-comment, which clears
pending_annot instead of setting it — so a legitimately-annotated block-comment-above exemption
written in that style would fail to carry forward to the content line it is meant to exempt, and the
gate would wrongly flag that line.
Verified empirically (not merely asserted): echo '- <!-- portability-ok: nested list annotation -->' | awk '{ if ($0 ~ /^[[:space:]]*<!--/) print "true"; else print "false" }' prints false.
Not currently a live regression: grep -rn "portability-ok:" --include="*.md" plugins/ over the full
corpus returns zero hits today, so no existing annotation uses this nested-container shape. This is a
forward-looking hardening gap, not an active false-positive.
Deferred out of PR #1338 (fixes #611) rather than fixed inline: #611's acceptance criteria was the
exact ^[[:space:]]*<!-- anchor already recorded in that issue's body (itself the reviewer's
suggested fix from PR #609), so widening the anchor to recognize Markdown container prefixes is new
scope beyond that fix, and needs its own design decision (which prefixes to recognize — -, *,
+, ordered-list markers, >, nesting/combinations — without loosening the anchor back toward the
original bug's "any line containing <!--" over-match).
Proposed work
- Widen
is_comment()'s HTML-comment branch (or add a second branch) to recognize a<!--opener
immediately following a Markdown list/blockquote prefix (-,*,+, an ordered-list marker,
or>, optionally repeated/nested), while continuing to reject a<!--that opens mid-sentence in
prose content (the original source-control(ci):portability-lint: pending_annot carry-forward doesn't distinguish inline vs block HTML comments #611 failure mode). - Add self-test cases to
scripts/check-skill-portability.test.shcovering both the newly-recognized
container-prefixed comment lines and continued rejection of mid-sentence inline comments.
Acceptance criteria
- A block-level
portability-ok/portability-scopeannotation comment written as a Markdown list
item or blockquote (- <!-- portability-ok: reason -->,> <!-- portability-scope: reason -->)
correctly sets/carriespending_annotto exempt the content it precedes. - A content line that merely carries an inline
<!--marker mid-line (the original source-control(ci):portability-lint: pending_annot carry-forward doesn't distinguish inline vs block HTML comments #611 scenario)
still does not set/carrypending_annot. scripts/check-skill-portability.test.shcovers both cases; full suite remains green.
References
- source-control(ci):portability-lint: pending_annot carry-forward doesn't distinguish inline vs block HTML comments #611 — the carry-forward fix this finding was raised against (PR fix(ci): portability-lint: anchor is_comment to block-level HTML comments #1338).
- portability gate: escape-hatch grammar rigor — standalone-comment-only matching + required nonempty reason (pair from PR #609 re-review) #624 — sibling escape-hatch grammar rigor pair from PR feat(ci): add portability-lint gate for ecosystem/forge-agnostic skills (#531) #609's re-review (also
needs-human,
same file/area); this finding continues that grammar-precision thread. - PR fix(ci): portability-lint: anchor is_comment to block-level HTML comments #1338 review thread: chatgpt-codex-connector[bot] inline comment on
scripts/check-skill-portability.shline ~151 (P2).
Metadata
- Category: bug (latent, low-likelihood) / hardening.
- Source: claude-review (Codex) bot finding on PR fix(ci): portability-lint: anchor is_comment to block-level HTML comments #1338 (fixes source-control(ci):portability-lint: pending_annot carry-forward doesn't distinguish inline vs block HTML comments #611), 2026-07-25.
Activity
fix(ci): portability-lint: anchor is_comment to block-level HTML comm…
kyle-sexton commentedon Jul 25, 2026
This was generated by AI during triage.
Triage — raw marker retired, routed human-gated
Contradiction resolved. This item carried both the raw-intake marker (
priority: needs-triage) and a routing label (needs-human). Per the triage closing invariant, the routed state is the truth and the stale raw marker is cleared — otherwise the open-only attention view re-selects an already-routed item every cycle.Verified against current code (not the title). The reported gap reproduces at HEAD:
The
is_comment()HTML-comment branch anchors on^[[:space:]]*<!--, so a block-level comment nested in a Markdown list or blockquote container classifies as non-comment and clearspending_annotinstead of setting it. The report's "not a live regression" claim also holds — noportability-ok:annotation in the plugin corpus currently uses the nested-container shape, so this is forward-looking hardening rather than an active false positive.Classification:
work-class: scoped(C3). Per the work-classes contract, C3 is "a briefed fix or small feature — blast radius bounded by the brief; tests exist, so reversal is a bounded revert." This is a grammar widening in one script plus cases in its existing self-test suite, with acceptance criteria already stated in the body. Not C2 (the widening is a judgment call about which container prefixes to admit, not a deterministic mechanical edit) and not C4 (no cross-cutting contract change).Priority:
low. Latent, zero live occurrences; the report self-describes as "latent, low-likelihood / hardening."Routing: stays
needs-human— not decision-defaulted. The body states the widening "needs its own design decision (which prefixes to recognize ... without loosening the anchor back toward the original bug's over-match)". The open fork is the grammar's boundary — which of-,*,+, ordered-list markers,>, and their nestings to admit — and getting it wrong re-opens the over-match bug that #611 was filed to close. That is open design space rather than a single reversible fork, so it fails closed to human-gated rather than riding in as a default.Related, unchanged: #611 (the carry-forward fix this was raised against, PR #1338), #624 (sibling escape-hatch grammar-rigor pair, same file, also
needs-human).kyle-sexton commentedon Aug 12, 2026
This was generated by AI in the decide-and-implement lane (operator authorization: human gates become decision work for frontier consensus). Decision: recognize the standard Markdown container prefixes — list markers (
-,*,+,N.,N)) and blockquote (>), each required to be followed by whitespace, optionally repeated for nesting — and nothing else. The design question this issue deferred was which prefixes to admit without loosening the anchor back toward #611's any-line-containing-<!--over-match; requiring every container marker to be whitespace-terminated and the whole prefix chain to start at line start (modulo indentation) keeps that boundary: prose carrying a dash, digit, or>mid-sentence before an inline comment still fails the anchor, which the new negative test asserts. The widening applies to both consumers of the anchor —is_comment()'spending_annotcarry-forward and the whole-fileportability-scope:declaration grep — since the issue's acceptance criteria name both annotation kinds in container style. Implemented with seven positive fixture shapes (including nested> - <!--), one negative (list-item content line with an inline comment must not carry the annotation), and a blockquote-nestedportability-scopecase; the full suite is green at 88 passing.