Skip to content

source-control(ci):portability-lint: pending_annot carry-forward doesn't distinguish inline vs block HTML comments #611

Closed

Description

@kyle-sexton

Lane: work-2 · Category: bug (latent, low-likelihood) · Source: claude-review bot finding on PR #609 (#531), 2026-07-20.

Triggering example

In scripts/check-skill-portability.sh's scan_file awk block, is_comment(l) matches any line containing <!-- — including a CONTENT line that happens to carry an inline HTML comment (e.g. diff against origin/main <!-- some other note --> on a line that is NOT itself annotated with portability-ok:). Because is_comment returns true for that line, pending_annot carries forward to the NEXT line as if a block-level annotation comment preceded it — even though the line was really content, not a comment block.

Observed vs expected

Observed: pending_annot carry-forward logic doesn't distinguish 'this is a dedicated comment line' from 'this is a content line that happens to contain an HTML comment marker'. Reviewer note: 'a content line with an inline HTML comment also acts as an annotated comment for pending_annot carry-forward purposes.'

Expected: anchor the comment-line detection to ^[[:space:]]*<!-- (block-level only) so only a genuine dedicated comment line can set pending_annot, per the reviewer's suggested fix.

Category

bug — low likelihood in real skill files (reviewer's own assessment), not exercised by the current self-test suite, and not blocking merge. Deferred rather than fixed inline in #531's PR to keep that PR's diff scoped to the gate's initial ship; this is a follow-up hardening of the annotation-carry logic itself.

Related

Found during the post-green review pass on PR #609 (closes #531). Two sibling findings from the same review (non-POSIX \b in staged/inactive token patterns; generic guard-marker over-match risk when staged classes activate) were fixed inline in that PR rather than deferred — see PR #609 for the reply classification table.

Work-class: C3 (bug-fix-shaped) — attended triage 2026-07-23, operator-ratified. 🤖

Activity

  1. added
    needs-triage
    on Jul 20, 2026
  2. kyle-sexton commented on Jul 20, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Triage (T1 — routed ready)

    Single-file, well-scoped hardening fix: scripts/check-skill-portability.sh's scan_file awk block treats any line containing <!-- as a comment for pending_annot carry-forward purposes, including content lines that merely happen to contain an inline HTML comment marker. Fix: anchor comment-line detection to ^[[:space:]]*<!-- (block-level only), per the reviewer's suggested fix already stated in the issue body. Zero design decisions — deliberately deferred from PR #609 (still open, implements #531) to keep that PR's diff scoped; this is the tracked follow-up.

    Not blocking — reporter's own assessment: low-likelihood in real skill files, not exercised by current self-test suite. Priority left at default medium (ordering note: rides #531's wave for sub-sorting, since it hardens that gate's own script).

  3. added
    status: ready
    and removed
    needs-triage
    on Jul 20, 2026
  4. added theissue type on Jul 20, 2026
  5. added
    agent-ready
    needs-human
    on Jul 23, 2026
  6. kyle-sexton commented on Jul 24, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI on operator direction.

    Superseded — this item was already ratified and should not have been queued.

    The earlier first-drain ratification request on this issue was raised in error. The admission gate dispatches a C3 bug-fix-shaped item when it carries either its own recorded ratification or a completed first drain — and this issue already carried recorded ratification in its body from attended triage on 2026-07-23. The drain cycle applied the blanket first-drain rule without first reading bodies for an existing ratification, so it queued an item that was already admitted.

    Restored to the autonomous frontier: agent-ready re-applied, needs-human removed. No human action is required, and this issue no longer appears in the attended queue's ratify view.

  7. added
    agent-ready
    needs-human
    and removed
    agent-ready
    needs-human
    on Jul 24, 2026
  8. kyle-sexton commented on Jul 25, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during the work-loop admission gate.

    Classification

    • Work class: C3 scoped, bug-fix-shaped — the portability-lint pending_annot carry-forward
      doesn't distinguish inline vs block HTML comments; a bounded fix to existing carry-forward
      logic, not a new capability.
    • Type: Bug (tracker's existing type).

    Intended dispatch

    Queued for the first-drain C3 ratification gate — first_drain_complete is still false.
    Ratify by replying on this comment via /work-items:attend-queue, or it clears automatically
    once first_drain_complete flips true.

  9. kyle-sexton commented on Jul 25, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during the work-loop admission gate, on the operator's behalf.

    Ratification

    Operator ratified this item's C3 bug-fix-shaped classification and dispatch, direct in the
    /work-items:work-loop session (standing autonomous-lane authorization; explicit "take on up to
    5 items at a time" directive, reaffirmed with "keep driving - up to 5 at a time in one wave").
    Flipping to autonomous-eligible; re-entering the worker loop's frontier for dispatch this cycle.

  10. removed
    needs-human
    on Jul 25, 2026
  11. self-assigned this
    on Jul 25, 2026
  12. kyle-sexton commented on Jul 25, 2026

    @kyle-sexton
    MemberAuthor
    No description provided.
  13. kyle-sexton commented on Jul 25, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during work-loop execution.

    Auto-confirmation (autonomous invocation)

    Selection was pre-bound by the invoker: this item's work-class C3 admission gate and operator
    ratification had already passed (see the kind=ratify-c3 comment and the ratification reply
    above), so the /work-items:work skill's interactive confirmation step was satisfied by that
    admission decision rather than a live prompt — no selection/reselection ran.

    Claim + execution

    Claimed via the seam (assignee + lease, see the lease comment above), executed in an out-of-tree
    worktree on branch fix/611-portability-lint-pending-annot-inline-html-comment.

    Fix: anchored is_comment()'s HTML-comment branch in scripts/check-skill-portability.sh to
    ^[[:space:]]*<!-- (block-level only), per the reviewer's suggested fix in this issue's body, so a
    content line that merely carries an inline <!-- marker no longer extends pending_annot
    carry-forward to a later, unannotated line.

    Tests: added a regression case to scripts/check-skill-portability.test.sh reproducing the
    reported scenario; confirmed it fails against the pre-fix script and passes after the fix. Full
    self-test suite: PASS=17 FAIL=0.

    PR: #1338 (never merged by this lane —
    hands off to /source-control:babysit-prs / human merge per the work-loop's never-merge boundary).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readystatus: ready

Type

Fields

No fields configured for Bug.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions