Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

YamlReporter silently drops prompt text, so the YAML report cannot be paired with the prompt it answered

Abierto Apto para principiantes
#70 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript
Área
tooling

Línea de trabajo

Comienza con src/reporters/yaml.ts e inspecciona YamlReporter.append; después compara sus campos de entrada con los del reportero JSONL. Lee las aserciones relacionadas en yaml.test.ts, incluidas las comprobaciones de prompt comentadas. Se considera terminado cuando el comportamiento del reportero es intencionadamente coherente y las pruebas cubren el comportamiento de gestión de prompts elegido.

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

Descripción

bug S3

Observed behavior

YamlReporter.append writes only id, status, and either output (plus optional structuredOutput) or reason for each entry. The block that would serialise prompt.prompt is commented out:

// src/reporters/yaml.ts
lines.push(`id: "${prompt.id}"`);
lines.push(`status: ${result.status}`);
// lines.push('prompt: |');
// for (const line of formatBlockScalar(prompt.prompt).split('\n')) {
//   lines.push(line === '' ? '' : `  ${line}`);
// }

The matching assertions in yaml.test.ts are commented out alongside it, so the gap is not caught by tests.

The JsonlReporter does serialise the prompt (JSON.stringify({ ...prompt, ...result })), so the two reporters disagree about what a "report entry" contains: a user who switches the reporter field from 'jsonl-report' to 'yaml-report' (or the default) silently loses the prompt column.

Expected behavior

Both built-in reporters should record the same data per entry, and the documented role of a reporter ("persists the results of running prompts through an agent" - src/reporters.ts) implies that the prompt is part of the entry. Reviewing a finished run typically requires reading the prompt that produced each output, especially for prompt-generation tasks that template per-item content into the prompt string.

If dropping the prompt text from the YAML report is intentional (for example, to keep the report readable when prompts are very large), the choice should be documented and ideally configurable per reporter, rather than encoded as commented-out dead code that diverges from the JSONL reporter.

Minimal reproduction

import { JsonlReporter } from 'loop-the-loop/reporters/jsonl';
import { YamlReporter } from 'loop-the-loop/reporters/yaml';
import { mkdtemp, readFile } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';

const dir = await mkdtemp(join(tmpdir(), 'reporter-diff-'));
const yaml = await YamlReporter.create({ outputDir: dir, jobName: 'y' });
const jsonl = await JsonlReporter.create({ outputDir: dir, jobName: 'j' });

const entry = [
  { id: 'a', prompt: 'review this file' },
  { status: 'success', output: 'looks fine' },
] as const;
await yaml.append(...entry);
await jsonl.append(...entry);

console.log(await readFile(join(dir, 'y-report.yaml'), 'utf-8'));
// ---
// id: "a"
// status: success
// output: |
//   looks fine

console.log(await readFile(join(dir, 'j-report.jsonl'), 'utf-8'));
// {"id":"a","prompt":"review this file","status":"success","output":"looks fine"}

Suggested fix

Either:

  1. Uncomment the prompt block in YamlReporter.append (and the matching assertions in yaml.test.ts) so both reporters record the prompt text, or
  2. Strip the prompt from the JSONL reporter as well, and document that Reporter entries do not include the prompt.

Option 1 keeps parity with the JSONL reporter and matches what most users will expect from an audit trail.

Lenguaje dominante
TypeScript
Estrellas
2
Forks
1
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 joewalker/loop-the-loop

Todos los issues de joewalker/loop-the-loop

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.