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

Aperta Adatta ai principianti
#2,653 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
86/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
devtools

Direzione di ricerca

Leggi hooks/lib/format-caps.ts e i relativi test. Poi confronta come FormatGate.hook.ts e DriftReminder.hook.ts misurano le formule di chiusura. Controlla le copie corrispondenti dell’installer in skills/LifeOS/install/hooks/. Il lavoro è terminato quando entrambi gli hook usano la misura condivisa della lunghezza parlata e i test coprono le formule di chiusura contrassegnate che rientrano nel limite di 110 caratteri e lo superano.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
19.7k
Fork
2.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di danielmiessler/LifeOS

Tutte le issue di danielmiessler/LifeOS

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.