Skip to content

portability gate: escape-hatch grammar rigor — standalone-comment-only matching + required nonempty reason (pair from PR #609 re-review) #624

Closed

Description

@kyle-sexton

Category: bug (latent) / hardening · Source: claude-review (Codex) bot re-review on PR #609 (#531), 2026-07-20 — a matched pair, deferred together per control-tower ruling.

Both findings tighten the portability gate's escape-declaration grammar in scripts/check-skill-portability.sh. That grammar's tokens (portability-ok:, portability-scope:) are the same escapes awaiting operator-convention ratification on #531 (items 1-2), so the rigor fix bundles with that ratification pass rather than a separate review cycle. Neither is blocking: both sit on the escape-hatch logic, the review job passed, and CI is green.

Finding 1 — restrict portability-scope: to a standalone comment (and require a reason)

Thread: #609 (comment)

scan_file gates the whole-file escape with grep -qE 'portability-scope:', which matches the substring anywhere in a scanned file. So ordinary skill prose or a doc example — e.g. a line explaining the `portability-scope: <reason>` annotation — silently exempts the entire file, disabling the gate for any later bare origin/main addition in it.

Expected: recognize the declaration only in its intended standalone-comment form, and require a non-whitespace reason, before treating the file as exempt.

Finding 2 — require a nonempty reason for portability-ok:

Thread: #609 (comment)

is_annotated treats any portability-ok: substring as an exemption, including an empty <!-- portability-ok: -->. A changed skill can therefore keep a bare origin/main and pass this required gate with no reason recorded for a reviewer to assess.

Expected: validate that non-whitespace reason text follows the marker before suppressing the hit.

Why deferred, not fixed inline

Both change the gate's documented escape-declaration contract (header escape list at scripts/check-skill-portability.sh lines 33-43, the violation help text, and new self-test cases), and both operate on the escape-hatch matching logic — not the quoted-path collection fix that PR #609 shipped. They are a coherent grammar-rigor pair and are best ratified alongside the #531 operator-convention items 1-2 they depend on, keeping #609's diff scoped to the quoted-path finding it was opened for.

Related

Found during the post-push Codex re-review on PR #609 (#531). The two threads above are resolved on that PR with a pointer to this issue. Sibling deferral from the same gate: #611 (annotation-carry inline-vs-block comment distinction).

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 (umbrella-fold) — the issue's own body states these two escape-hatch grammar findings sit on the same portability-ok:/portability-scope: tokens awaiting operator-convention ratification on #531 (items 1-2), and should bundle with that ratification pass rather than a separate review cycle. Same root-cause pattern as #531 (hardcoded-agnosticism/portability-gate coupling class). Folding rather than routing standalone per the umbrella-fold rule.

    Blocked by #531's decision. Not routed to needs-human individually.

  3. removed
    needs-triage
    on Jul 20, 2026
  4. kyle-sexton commented on Jul 20, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage (historic normalization, rule 8g).

    blocked by #531 decision — this issue's own body already self-identifies as a member of #531's portability-lint scope. Cluster-routed as a member rather than triaged separately; #531's own operator-convention ratification (how a skill declares its agnosticism scope) is what unblocks this issue.

  5. added theissue type on Jul 20, 2026
  6. added
    needs-human
    on Jul 23, 2026
  7. kyle-sexton commented on Aug 12, 2026

    @kyle-sexton
    MemberAuthor

    Closing as fixed on main.

    Evidence: check-skill-portability.sh now requires a nonempty portability-ok: reason and anchors portability-scope: to genuine comment lines only.

    • scripts/check-skill-portability.sh:160 — anchored portability-scope: grep
    • scripts/check-skill-portability.sh:176 — portability-ok:[[:space:]]*[^[:space:]#<\-] (nonempty reason)
    • scripts/check-skill-portability.test.sh — empty portability-ok: fails; prose mentioning portability-scope: does not exempt
    • Shipped in fix(scripts): require a nonempty portability-ok reason #2440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-human

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions