Repository navigation
feat: record notesd's and the app shell's problems in the local journal (T857 t12) - #130
Merged
Merged
Conversation
…al (T857 t12) notesd records panics (main goroutine, request handlers, and a crash file turned into a record at the next start) and 5 coded errors: store.migrate_failed, merge.failed, vault.write_failed, watch.overflow_rescan and sync.protocol_error, with github.com/frostyard/std/problems (std v0.5.0). The Tauri shell records its panics with the crate frostyard-problems (std tag v0.5.0). Builds stamp the release version: notesd strips the tag's v, and the Flatpak's stamp-version.sh also stamps FROSTNOTES_VERSION, which pnpm tauri build --config gives the shell. A development build records nothing. Nothing is sent over a network (ADR-0036).
bketelsen
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan T857, task t12: notesd and the Tauri shell record problems in the local systemd journal (core ADR-0069, schema
frostyard.problem/1, kind S8). Decision: ADR-0036.What changes
github.com/frostyard/std/problems, std v0.5.0), app IDorg.frostyard.Frostnotes, componentdaemon:RecoverPanicinrunWith; a dispatcher inrpcserverrecords a request handler's panic and re-panics, so the kit still answers internal as before;CrashOutputturns a crash of any other goroutine (or a fatal error) into 1 record at the next start.store.migrate_failed(cmd/notesd, on*store.MigrateError),merge.failed(vault.guardMerge: a panic of the merge library is recorded and re-panicked;internal/mergeis unchanged),vault.write_failed(vault.writeFailedinwriteandcreate; client errors, cancels and simulated crashes are not recorded),watch.overflow_rescan(fsnotify.ErrEventOverflowonly),sync.protocol_error(syncer.protocolFault, once for a run of failing sessions).internal/problem.Recorder); no package state.frostyard-problems, git dependency on std tagv0.5.0), componentgui:src/problems.rsinstalls the panic hook with the version frompackage_info().v(make build's git describe). The Flatpak manifest givespnpm tauri build --configthe version inFROSTNOTES_VERSION(0.0.0), andstamp-version.shstamps the tag's version there on av*tag, checked exactly once like the ldflags. A development build (dev,flatpak,v0.5.0-3-gabc,0.0.0-…-snapshot, a shell at0.0.0) records nothing./run/systemd/journal/socket. README says the apps send nothing; only chairlift can send, under its own consent.make flatpak-sourcesregeneratedcargo-sources.jsonandgo-sources.json.Tests (test socket, fields checked with
problems.Validate/validate)cmd/notesd/problems_test.go(migration end to end through a real socket, main-goroutine panic, crash file in a child process,releaseVersion),internal/vault/problems_test.go(write failure and its exclusions, merge panic, overflow),internal/syncer/problems*_test.go(table test ofprotocolFault, de-duplication),internal/rpcserver/panic_test.go(handler panic recorded, reply unchanged),internal/store/store_test.go(MigrateError),internal/packagecheck/flatpak_test.go(the new stamp).problems::tests::a_panic_is_recorded,an_unstamped_build_records_nothing.vstrip, write exclusions, re-panic, de-duplication, stamp script, 2 Rust tests). Re-checked by hand:watch.overflow_rescanremoved →TestAWatchOverflowIsRecordedfails.Checks
make check✅;go test -raceon vault, syncer, store, rpcserver, cmd/notesd, packagecheck ✅make app-build,make app-test(40 passed) ✅,make ui-check✅cargo testwith the git crate vendored (as the Flatpak does) ✅. No localflatpak-builderrun: CI's Flatpak job builds it.Must not break
RPC replies are unchanged (a panic still answers internal); sync and write behaviour are unchanged (merge panics still propagate); standalone Flatpak behaviour is unchanged; no new network call.
Revert test (scratch worktree at
b8de1ab)internal/problem.Recordmade a no-op (the recording reverted, tests kept), thengo test -count=1 ./internal/vault/ ./internal/syncer/ ./cmd/notesd/: 7 tests fail on their record assertions:TestAWriteThatFailsOnDiskIsRecorded,TestWriteFailedRecordsOnlyInternalErrors,TestAMergeThatPanicsIsRecordedAndPanicsAgain,TestAWatchOverflowIsRecorded,TestAProtocolFaultIsRecordedOncePerRun,TestAProtocolFaultOfTheHubIsRecorded,TestAFailedMigrationIsRecorded. The scratch worktree was restored and removed.Cross-review
openai/gpt-6.1-sol(codergithub-copilot/claude-opus-5.5), base5675138, headb8de1ab, 33 files in 2 batches (lockfiles and generated sources excluded): Ready, Blocking: none.