YamlReporter silently drops prompt text, so the YAML report cannot be paired with the prompt it answered
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- tooling
調査の方向性
src/reporters/yaml.ts から始めて YamlReporter.append を調べ、次にそのエントリーフィールドを JSONL reporter と比較します。コメントアウトされた prompt のチェックを含め、yaml.test.ts の関連するアサーションを読みます。reporter の動作が意図的に一貫しており、選択した prompt の処理動作をテストがカバーしていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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:
- Uncomment the prompt block in
YamlReporter.append(and the matching assertions inyaml.test.ts) so both reporters record the prompt text, or - Strip the prompt from the JSONL reporter as well, and document that
Reporterentries do not include the prompt.
Option 1 keeps parity with the JSONL reporter and matches what most users will expect from an audit trail.
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
joewalker/loop-the-loop のほかの issue
-
bug S4
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
joewalker/loop-the-loop#88 ·
-
Git exec(): child killed by a signal rejects with new Error('') and loses the signal informationオープンbug S3
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
joewalker/loop-the-loop#84 ·
-
bug S3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
joewalker/loop-the-loop#83 ·
-
bug S3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
joewalker/loop-the-loop#82 ·
-
bug S4
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
joewalker/loop-the-loop#79 ·
joewalker/loop-the-loop の issue をすべて見る
似ている issue
-
[Bug]: Pen taps on sidebar rows start a drag and lose their click対応中かも @makhnatkin が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
b310-digital/teammapper#1515 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
puckeditor/puck#1884 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
outline/outline#14378 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nicobailon/pi-web-access#642 ·
メンテナーはふだん 1 日以内に返信