Legacy artifact hash normalises member names, so NFC-equivalent names hash identically

Abierto
#161 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@xm33 ya está trabajando en esto.

Desde el 3/11/2026.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
security

Línea de trabajo

Start with reference-implementations/dacs-directory/src/catalog/legacyListingHash.ts around line 30, where member names are NFC-normalised before sorting and serialising. Check the callers in listingVerification.ts (line 336) and bundlePolicy.ts (lines 135 and 212) to see which legacy hashes must keep their current output. Done means that objects with NFC-equivalent member names are rejected, names that are not NFC are rejected, and tests cover both key orders, nested objects, and a non-ASCII name that normalises to ASCII.

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

Descripción

contributors-section

This repo holds community tools for DACS, an open standard for agent commerce, including the reference Directory.

Paths and line numbers are as of main at commit 58055373.

reference-implementations/dacs-directory/src/catalog/legacyListingHash.ts:30 NFC-normalises object member names before sorting and serialising. Two names that are equal after NFC (for example a precomposed and a decomposed é, or U+212A and K) end up as duplicate names in the serialization. Objects that differ only in how member names are spelled then get the same legacyListingHash. The hash is used for legacy Listings (listingVerification.ts:336) and historical bundle artifacts (bundlePolicy.ts:135, :212). The current-profile canonicalizer (canonical.ts:20, SDK jcs.ts) keeps names byte-exact and is not affected.

Fix: in legacyListingHash/legacyCanonicalize, recursively reject any object with two member names that are equal after NFC, and any member name that is not already NFC, instead of serialising them. Test both key orders, nested objects, and a non-ASCII name that normalises to an ASCII one.

Send the fix as a pull request to phase0-completion. It merges once tests pass and a maintainer has approved it.

Lenguaje dominante
TypeScript
Estrellas
0
Forks
3
Merge medio
20 h 26 min
PR fusionados (30 d)
119

Preparar el entorno

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 DACS-Agent-commerce/Community

Todos los issues de DACS-Agent-commerce/Community

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.