Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: f7bf73d73df14046842000c37d308652
Branch: dev/4-390-journal-status
Base: e6dfffe
At: 2026-11-02T08:38:52Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
What happens
With stateJournal: true, a journal that cannot record stops for the run and leaves one warning, and nothing else ever says so. The diagnostics report a user is asked to paste into an issue therefore looks like a healthy host while no state change has been journalled at all.
Base: e6dfffeeb1ea1a50ab4e0695db9404b65528140f.
core/src/host/journal.js:239— the only trace iswarn('ds-bot: state journal %s is not recording: %s', path, error).stop()keeps no state, andopenJournalreturns no way to ask.core/src/host/store.js— the writer stays in a localjournal;Object.assign(rt, …)does not expose it.core/src/host/diagnostics.js:219—facts()has no journal entry;reportMarkdown(:65-88) lists up toRead-only, so the report showsRead-onlyplusNo host errors recorded.and never mentions the journal.
Reproduction
stateJournal: truein thebotconfig.- Before start, make
<home>/journal/state.jsonlsomething that is not a plain file of its own (a symlink is the shape the existing tests use). - Start the host and open Settings → Diagnostics (or call the report).
Actual: one warning line at start; the report says Read-only: … and No host errors recorded. — no line about the journal, so the person cannot tell that recording is off for this run.
Expected
openJournal(...)returnsstatus()→{ recording: true }, or{ recording: false, because: "<path> is not recording: <error>" }afterstop().store.jsputs that writer onrt(journal), anddiagnostics.facts()gainsstateJournal—recording, orstopped (… )with the home rewritten to~by the existingclean(), so no absolute path reaches a public report.reportMarkdownwrites one line after the table:state journal: recordingorstate journal: stopped (…). A host that never opened a journal (stateJournaloff) gets no extra line at all.- The warning text stays byte-identical in shape (
ds-bot: state journal %s is not recording: %sbecomes one string built once), so existing log-based expectations do not drift.
Acceptance
- Red first, on the base above, with only the new tests added:
state-journal.test.js+diagnostics.test.js→ 37 tests / 35 pass / 2 fail, failing asstopped.status is not a functionand by the report not matching^state journal: stopped \(.*not a plain file.*\)$. After the fix: 37/37. - Mutations each kill their own assertion:
status()always{ recording: true }→ both red;becausewithout the path → only the journal case red;reportMarkdownwithout the new line → only the diagnostics case red. TZ=UTC ARCH_DOCS_BASE=<base> npm run verifyexit 0 at the tip, witharch-docsandds-bot-patches check/canonicalclean;corecount grows by exactly the two new tests.docs/subsystems/core-host.md"Fail closed" gains one sentence saying the report names the stopped journal;changelog.d/<issue>-journal-status.added.mdsays in one user-visible line that Diagnostics now says whether the state journal is recording.smokemay be reported as not run with the reason (nodeepseek-harnesscheckout on this box); the change touchessrc/host/journal status and report assembly only.
Scope
core/src/host/journal.js, core/src/host/store.js, core/src/host/diagnostics.js, core/test/state-journal.test.js, core/test/diagnostics.test.js, docs/subsystems/core-host.md, changelog fragment, and the generated patches/ds-bot/** mirrors — 11 files plus the changelog. No gateFiles (.github/scripts/*, .github/workflows/test.yml, policy/) are touched, so no Policy-sign: is needed.
Out of scope: changing what stops the journal (that is #2131/#2133 and the folder checks of #2056/#2074), adding any new field to the report table, and exposing the journal path or its contents.
Dedupe
Live main grep: stateJournal appears in core/README.md, CHANGELOG.md, journal.js, store.js, docs/subsystems/core-host.md and the patches/ds-bot/** mirrors — none of them reports whether the journal is recording; diagnostics.js has no journal key.
Closed issues: repo:ThinkFlowLab/FlyBot journal → 52 hits, all about the journal refusing a path or being written through (#2056, #2074, #2131/#2133, #2079/#2083), none about reporting a stopped journal; diagnostics → 63 hits, none on this topic. No open issue or PR covers it.
Activity
Report whether the state journal is still recording (ThinkFlowLab#2134)
Merge main (35f5f8e) into dev/2-395-wire-hit-targets
A wire in the run flowchart can be neither pointed at nor read (Think…