PREDICATES.md: the "settled at the deadband" example claims converged; main reads stable (step equals dh_zero, and converged needs strict <)

Chiusa Adatta ai principianti
#2,287 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, shell

Direzione di ricerca

Inizia dall’esempio “settled at the deadband” in docs/PREDICATES.md, righe 836-842, e dalla riga converged intorno alla riga 124. Compila con make, poi esegui il repro di quattro righe su ./src/eigenscript per verificare che stampi stable e false. Scegli una correzione: cambiare il fattore in 0.9995 così l’esempio riporta converged, oppure correggere il commento e il paragrafo perché dicano stable. Inoltre, rendi l’esempio un programma completo con un blocco di output abbinato e rimuovi la voce della riga 841 in VALUE_COMMENT_WAIVERS in tests/test_doc_examples.py (intorno alle righe 388-391). Completato quando python3 tests/test_doc_examples.py docs/PREDICATES.md viene superato.

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

Descrizione

area:docs area:observer found-by:duet-audit kind:docs-drift status:claimed

Found by audit area 11 (do doc examples run), read-only, against main b367cd7 (release build, make).

docs/PREDICATES.md:836-842, the "settled at the deadband" example, says the trajectory reads "converged". On main it reads "stable", and converged of x is false.

x is 100.0
for i in range of 20:
    x is x * 0.999
print of (report of x)
print of (converged of x)
$ ./src/eigenscript repro.eigs
stable
false

Expected (doc, line 841): report of x # "converged" — settled AT THE DEADBAND; x is ~98, not ~0. Actual: stable (x is 98.01888648295349, so the "~98" half is right).

The verdict does not change with more steps: 20, 30, 50 and 100 iterations all print stable / false. A smaller step does reach converged: factor 0.9995 and 0.9999 both print converged. That fits the doc's own table (docs/PREDICATES.md:124: converged needs every |rel| < dh_zero, strict) and the paragraph under the example, which says 0.1% per step "is exactly the boundary". A step of exactly dh_zero is not under it, so the example sits on the wrong side of its own boundary.

Why it matters: this paragraph teaches the one semantic an agent most needs from this file (what converged means for slow motion), and the example contradicts it. Nothing caught it because the fence is eigenscript fragment (output not compared) and the line is waived in tests/test_doc_examples.py:388-391 with the reason "the verdict itself is checked by the paired output". There is no paired output. The gate side is #2290.

Alternative reading, checked: the doc may mean "reads settled" loosely, covering stable. The comment names "converged" explicitly and the next paragraph says "converged means every recent step is below the tolerance", so the text claims converged, not just "settled".

Done when

  • The example prints the verdict it claims: either the factor changes to one strictly inside the deadband (for example 0.9995, which reads converged on main) or the comment and paragraph say stable and explain why converged needs a strict <.
  • The example is a whole program with a paired ```output block (so tests/test_doc_examples.py compares the verdict), and the `VALUE_COMMENT_WAIVERS` entry for line 841 is removed.
  • python3 tests/test_doc_examples.py docs/PREDICATES.md passes with the updated population row.

— Duet (orchestrator)


Generated by Claude Code

Lingua principale
C
Stelle
3
Fork
7
Merge medio
6h 28m
PR unite (30g)
312

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 InauguralSystems/EigenScript

Tutte le issue di InauguralSystems/EigenScript

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.