[bug] DriftReminder counts the voice tags in the spoken closer while FormatGate…

Abierto Apto para principiantes
#2,653 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 7 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
86/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
devtools

Línea de trabajo

Lee hooks/lib/format-caps.ts y sus pruebas. Después, compara cómo FormatGate.hook.ts y DriftReminder.hook.ts miden los cierres. Comprueba las copias correspondientes del instalador en skills/LifeOS/install/hooks/. El trabajo estará hecho cuando ambos hooks usen la medida compartida de longitud hablada y las pruebas cubran cierres etiquetados que se ajusten al límite de 110 caracteres y lo superen.

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

Descripción

What happened

DriftReminder counts the voice tags in the spoken closer while FormatGate strips them, so it flags closers that fit the 110-character cap

Summary

[!NOTE]
🤖 Avi (AI assistant) writing on behalf of Hans-Jakob. He read and approved this text before it was posted.

DriftReminder and FormatGate measure the spoken closer differently. FormatGate strips the Drama 3 voice tags before comparing against CLOSER_MAX_CHARS (110), since the tags are performed and never spoken. DriftReminder's closerSpokenChars does not strip them, so the per-turn FORMAT CONTRACT reminder reports "closer N chars (spoken cap 110)" for closers that fit.

Measured on one session's four flagged closers:

Reported by DriftReminder Spoken length (tags stripped) Over the cap?
136 113 yes
123 103 no
115 96 no
137 117 yes

Two of the four reminders were false, and the two real ones were inflated by about 20 characters each.

This is the same class of problem as #2166 (the em-dash cap defined twice), which moved the cap into hooks/lib/format-caps.ts. The fix we run locally does the same for the closer:

  • hooks/lib/format-caps.ts exports CLOSER_MAX_CHARS and closerSpokenLength(line): the text after the 🗣️ <name>: prefix, passed through stripVoiceTags.
  • FormatGate.hook.ts and DriftReminder.hook.ts both call it. FormatGate re-exports CLOSER_MAX_CHARS for existing importers.
  • hooks/lib/format-caps.test.ts pins the measure (a tagged closer counts only its spoken words) and runs both hooks on a tagged closer that fits (103 spoken) and one that does not (117). DriftReminder exports measure for this.

Not changed: the two hooks still pick the closer line differently. FormatGate measures the last visible line, and DriftReminder measures the last line that contains 🗣️ anywhere in the raw text, so a reply that quotes 🗣️ after its real closer is measured on different lines.

To reproduce: put a closer such as 🗣️ Avi: [owning it, steady] followed by 100 spoken characters as the last line of a reply. FormatGate passes it, and the next prompt's FORMAT CONTRACT line reports it as about 120 characters, over the cap.

The installer's template copies under skills/LifeOS/install/hooks/ carry the same two files and would need the same change.

Details

  • Kind: bug
  • LifeOS version: 8.761.0

Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.

Lenguaje dominante
TypeScript
Estrellas
19.7k
Forks
2.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 danielmiessler/LifeOS

Todos los issues de danielmiessler/LifeOS

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.