Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Safe Outputs Conformance] TYPE-016: Conformance checker regex false-positives on enforceCommentLimits signature (comment_limit_helpers.cjs)

Cerrado Apto para principiantes
#70,450 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bash, github-actions
Área
ci-cd, testing

Línea de trabajo

Lee la comprobación TYPE-016 alrededor de la línea 2503 en scripts/check-safe-outputs-conformance.sh y compara su patrón con la firma de enforceCommentLimits descrita en el issue. Ajusta la comprobación para que siga verificando ambos parámetros obligatorios cuando haya parámetros adicionales después. Luego ejecuta bash scripts/check-safe-outputs-conformance.sh y confirma que TYPE-016 pasa y que sigue detectando si se elimina cualquiera de los dos parámetros.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

automated conformance high-priority safe-outputs
Conformance Check Failure

Check ID: TYPE-016
Severity: HIGH
Category: Specification/Implementation (add_comment Configurable Link Limit, Section 7.1 / 8.3 MCE5, v1.29.9)

Problem Description

scripts/check-safe-outputs-conformance.sh reports:

[HIGH] TYPE-016: enforceCommentLimits does not accept a configurable maxLinks and agent-only linkBody (generated links must be excluded)

Investigation result: this is a checker regex false positive, not a product defect. The actual implementation in actions/setup/js/comment_limit_helpers.cjs (function enforceCommentLimits, around line 64) is:

function enforceCommentLimits(body, { maxLinks = MAX_LINKS, linkBody = body, maxLength = MAX_COMMENT_LENGTH } = {})

This already supports a configurable maxLinks, a separate linkBody (so generated/footer content can be excluded from the link count), and the E008 error message correctly interpolates the configured limit: "E008: Comment contains \${links} links, maximum is \${maxLinks}..." (line 79).

The checker regex at scripts/check-safe-outputs-conformance.sh line 2503 is:

grep -qE "function enforceCommentLimits\(body, \{ maxLinks = MAX_LINKS, linkBody = body \}" "$helpers"

This requires the destructured parameter list to end immediately after "linkBody = body" (literal " }" right after). Since a third parameter, maxLength = MAX_COMMENT_LENGTH, was added between linkBody = body and the closing brace (to support the body-length limit, E006), the regex no longer matches even though the required maxLinks/linkBody behavior is fully intact. The sibling checks in the same TYPE-016 function (handler enforcement, MCP gateway enforcement, schema max-links definition) all still pass.

Affected Components
  • Files: scripts/check-safe-outputs-conformance.sh (line 2503, TYPE-016 check)
  • Verified correct (no change needed): actions/setup/js/comment_limit_helpers.cjs
Current vs Expected Behavior
Current Behavior

The checker regex anchors on an exact, dated function-signature substring that breaks whenever a new parameter is inserted before the closing brace, even when maxLinks/linkBody configurability is preserved.

Expected Behavior

The checker should verify presence of the required destructured parameters (maxLinks = MAX_LINKS and linkBody = body) without requiring them to be the last parameters in the signature, so legitimate signature extensions (like the maxLength parameter) do not trip a false HIGH finding.

Remediation Steps

This task can be assigned to a Copilot coding agent with the following steps:

  1. In scripts/check-safe-outputs-conformance.sh, update the TYPE-016 regex (around line 2503) to drop the trailing closing-brace anchor, or split it into two independent greps: one for "maxLinks = MAX_LINKS" and one for "linkBody = body", both scoped to the enforceCommentLimits function definition.
  2. Re-run bash scripts/check-safe-outputs-conformance.sh and confirm TYPE-016 reports PASS.
  3. Keep the check meaningful: ensure it still fails if a future refactor removes maxLinks or linkBody configurability from enforceCommentLimits.
  4. No change needed in actions/setup/js/comment_limit_helpers.cjs itself - the implementation already satisfies the TYPE-016 requirement.
Verification

After remediation, verify the fix by running: bash scripts/check-safe-outputs-conformance.sh

The check TYPE-016 should pass without errors.

References
  • Safe Outputs Specification: docs/src/content/docs/specs/safe-outputs-specification.md
  • Conformance Checker: scripts/check-safe-outputs-conformance.sh
  • Run ID: 39376524099
  • Date: 2026-10-20

Generated by ✅ Daily Safe Outputs Conformance Checker · claude · agent · 98 AIC · ⌖ 0.625 AIC · ⊞ 5.4K · ◷

  • expires on Oct 20, 2026, 9:53 PM UTC-08:00
Lenguaje dominante
Go
Estrellas
5.5k
Forks
606
Merge medio
4 h 13 min
PR fusionados (30 d)
823

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/gh-aw

Todos los issues de github/gh-aw

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.