logging/overview.md and logging/api.md document contradictory hdb.log entry formats
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- documentation, observability
Línea de trabajo
Empieza rastreando los llamadores que construyen entradas de log en utility/logging/harper_logger.ts:778, o captura una muestra de una instancia en ejecución. Compara el resultado con reference/logging/overview.md y reference/logging/api.md, incluidas las formas de tags y TaggedLogger, y comprueba después las copias de v4 antes de editar. Se considera terminado cuando los formatos documentados coinciden con el emisor y una página contiene el formato canónico.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What's wrong
Two reference pages document the hdb.log entry format with different field orders, and both present it as "the standard format." One of them is wrong.
| Page | Documented format |
|---|---|
reference/logging/overview.md:26 |
<timestamp> [<thread>/<id>] [<level>] ...[<tags>]: <message> |
reference/logging/api.md:128 |
<timestamp> [<level>] [<thread>/<id>]: <message> |
overview.md puts thread before level; api.md puts level before thread. overview.md also documents a trailing [<tags>] field that api.md omits entirely, and its worked example at :32 follows its own ordering:
2023-03-09T14:25:05.269Z [main/0] [notify]: HarperDB successfully started.
api.md:134 additionally gives a distinct TaggedLogger form, <timestamp> [<level>] [<tag>]: <message>, with no thread field — which may be correct, may be a third variant, or may just be the same disagreement again.
Which one is right
Not determined. I traced the emitter as far as utility/logging/harper_logger.ts:778:
function logToFile(log) {
let entry = `${new Date().toISOString()} ${log}${log.endsWith('\n') ? '' : '\n'}`;
That prepends only the ISO timestamp — every bracketed field is assembled by callers upstream, so the ordering is not visible at this layer. Settling it needs either a sample from a running instance or a trace of the call sites that build log. That is step one for whoever picks this up; please do not resolve it by picking the more plausible-looking page.
Also worth confirming while there: whether [<tags>] still exists as a field, and whether the TaggedLogger form genuinely drops the thread or whether that is the same error a third time.
Why this is worth fixing beyond the inconsistency
This is not only a reader-facing problem. Both files are declared whole-file sources for the logging rule in @harperfast/skills:
- path: reference/v5/logging/overview.md
role: primary
- path: reference/v5/logging/api.md
role: primary
The generator concatenates both and hands them to the model as one undifferentiated block with no per-source labels. Faced with two contradictory formats, it silently emitted only api.md's ordering and dropped overview.md's tags field, its worked example, and its field table (thread/id values main/http/job; tags values custom-function/auth-event). The generated rule's own "When to Use" advertises helping an agent "understand the log entry format."
Nothing flags this. validate-generated.mjs passes — it checks structure (manifest consistency, frontmatter, sourceCommit/inputHash, AGENTS.md round-trip, source-exists, byte-identical slices), not agreement between sources. So a contradiction in our docs is laundered into agent-facing rules with no signal, and whichever page the model happens to favor becomes the one agents act on.
The skills-side manifest cannot fix this. A generator can pick one of two contradictory inputs, but it cannot know which is true.
Suggested fix
- Determine the actual emitted format (live sample or trace the callers of
logToFile). - Correct whichever page is wrong, and reconcile the
[<tags>]field and theTaggedLoggervariant. - Prefer having one page own the format and the other link to it, rather than restating it. Two independent statements of the same format is what produced this.
- Check the v4 versioned copies under
reference_versioned_docs/version-v4/against a v4 harper ref before touching them — do not assume v4 matches v5.
How this surfaced
Found during a coverage audit of docs-driven skill rule generation, which was itself prompted by a confirmed content loss in a different rule (HarperFast/skills#81). This one is a distinct failure mode: not material dropped for lack of an anchor, but two sources disagreeing and the disagreement being resolved silently.
sent with Claude Opus 5
- Lenguaje dominante
- MDX
- Estrellas
- 9
- Forks
- 9
- Merge medio
- 2 d 23 h
- PR fusionados (30 d)
- 26
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de HarperFast/documentation
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
HarperFast/documentation#690 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
HarperFast/documentation#677 ·
Los mantenedores suelen responder en 2 días
-
Document markCredentialRejection / credentialRejectionError, the server.getUser rejection tagAbierto
Dificultad 2/5 Medio día Aptitud para principiantes 88/100
HarperFast/documentation#675 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
HarperFast/documentation#665 ·
Los mantenedores suelen responder en 2 días
-
Add Harper deploy behaviorAbiertocontent
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
HarperFast/documentation#478 ·
Los mantenedores suelen responder en 2 días
Todos los issues de HarperFast/documentation
Issues similares
-
How do I build the project?Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
AR-js-org/arjs-plugin-artoolkit#70 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
docs good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CGSeb/lessonfolk#201 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
EasyTier/EasyTier#2672 · 1 comentario ·
Los mantenedores suelen responder en 1 día