logging/overview.md and logging/api.md document contradictory hdb.log entry formats
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
まず、utility/logging/harper_logger.ts:778 にログエントリを構築する呼び出し元をたどるか、実行中のインスタンスからサンプルを取得します。結果を reference/logging/overview.md および reference/logging/api.md と比較し、tags と TaggedLogger の形式も確認してから、編集する前に v4 のコピーを確認します。ドキュメント化された形式が emitter と一致し、1 ページが正規形式を所有していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- MDX
- スター
- 9
- フォーク
- 9
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HarperFast/documentation のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
HarperFast/documentation#690 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
HarperFast/documentation#677 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 88/100
HarperFast/documentation#675 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
HarperFast/documentation#665 ·
メンテナーはふだん 2 日以内に返信
-
content
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
HarperFast/documentation#478 ·
メンテナーはふだん 2 日以内に返信
HarperFast/documentation の issue をすべて見る
似ている issue
-
area:docs good first issue P3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
uttrflow/uttrflow-swift#3445 ·
メンテナーはふだん 1 日以内に返信
-
adr
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kristofdegrave/homeassistant-smart-charging#1607 ·
メンテナーはふだん 1 日以内に返信
-
Feature
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
Narezzurri/OpenVPN-Config-Manager#95 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
doc good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
collective/icalendar#1865 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信