logging/overview.md and logging/api.md document contradictory hdb.log entry formats
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- documentation, observability
Research direction
Start by tracing callers that build log entries into utility/logging/harper_logger.ts:778, or capture a sample from a running instance. Compare the result with reference/logging/overview.md and reference/logging/api.md, including the tags and TaggedLogger forms, then check the v4 copies before editing. Done means the documented formats agree with the emitter and one page owns the canonical format.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- MDX
- Stars
- 9
- Forks
- 9
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 30
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HarperFast/documentation
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
HarperFast/documentation#677 ·
-
Difficulty 2/5 Half a day Newbie friendliness 88/100
HarperFast/documentation#675 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
HarperFast/documentation#665 ·
-
content
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
HarperFast/documentation#478 ·
-
content
Difficulty 1/5 Under an hour Newbie friendliness 76/100
HarperFast/documentation#399 · 2 comments ·
All issues in HarperFast/documentation
Similar issues
-
Area: Excel support
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
orbeon/orbeon-forms#7893 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
kb-infra-drift
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OCHA-DAP/ds-knowledge-base#653 · 1 comment ·
-
area/dev-productivity area/disaster-recovery area/ipcei kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 90/100
EclipseFdn/open-vsx.org#13419 ·