fix(cuprate): explicit, correct logging levels in Cuprated.toml #152

Manually merged
chaum merged 0 commits from fix/cuprate-explicit-logging-levels into main 2026-09-01 12:49:47 +00:00
Collaborator

Summary

  • The manifest's files[].content for Cuprated.toml only ever wrote network/target_max_memory/rpc.restricted.enable — the [tracing.stdout]/[tracing.file] tables were silently absent, so the deployed config never showed what log level was actually running.
  • Added both tables explicitly. First pass copied cuprated --generate-config's raw binary default (file.level = "debug"), which turned out wrong — compared against ssmithx@archy-dev-pa:/home/ssmithx/cuprate/Cuprated.toml (the actual dev config this app was built/tested against), file logging is meant to run at info with 14 rotated files, not the binary's raw debug/7. Second commit corrects this.
  • Deliberately left out that reference config's resource tuning (8GB target_max_memory, tokio/rayon/reader thread counts, P2P connection counts) — those were sized for the dev box, not the container; this manifest's target_max_memory already stays deliberately under the container's 4Gi memory_limit.
  • Regenerated releases/app-catalog.json to embed the updated manifest (still unsigned — needs scripts/sign-catalog.sh before it's authoritative for the fleet).

Scope / impact

  • overwrite: false means this only changes what new installs get. The already-deployed amishparadise node was updated by hand to match and its container restarted — confirmed live: podman logs stdout stayed INFO throughout, and the on-disk file log (.local/share/cuprate/logs/<date>) now shows all INFO instead of flooding with per-peer DEBUG gossip (was ~400KB in 2 minutes).

Test plan

  • cuprated --dry-run --config-file validated the new TOML parses
  • Restarted cuprate on amishparadise; startup config dump confirms stdout: INFO, file: INFO, max_log_files: 14
  • Tailed the live file log post-restart — 100% INFO, no DEBUG lines
  • scripts/check-manifest-shell.py clean
  • scripts/sign-catalog.sh (needs release mnemonic — not run by Claude)
## Summary - The manifest's `files[].content` for `Cuprated.toml` only ever wrote `network`/`target_max_memory`/`rpc.restricted.enable` — the `[tracing.stdout]`/`[tracing.file]` tables were silently absent, so the deployed config never showed what log level was actually running. - Added both tables explicitly. First pass copied `cuprated --generate-config`'s raw binary default (`file.level = "debug"`), which turned out wrong — compared against `ssmithx@archy-dev-pa:/home/ssmithx/cuprate/Cuprated.toml` (the actual dev config this app was built/tested against), file logging is meant to run at `info` with 14 rotated files, not the binary's raw `debug`/7. Second commit corrects this. - Deliberately left out that reference config's resource tuning (8GB `target_max_memory`, tokio/rayon/reader thread counts, P2P connection counts) — those were sized for the dev box, not the container; this manifest's `target_max_memory` already stays deliberately under the container's 4Gi `memory_limit`. - Regenerated `releases/app-catalog.json` to embed the updated manifest (still unsigned — needs `scripts/sign-catalog.sh` before it's authoritative for the fleet). ## Scope / impact - `overwrite: false` means this only changes what **new installs** get. The already-deployed `amishparadise` node was updated by hand to match and its container restarted — confirmed live: `podman logs` stdout stayed INFO throughout, and the on-disk file log (`.local/share/cuprate/logs/<date>`) now shows all INFO instead of flooding with per-peer DEBUG gossip (was ~400KB in 2 minutes). ## Test plan - [x] `cuprated --dry-run --config-file` validated the new TOML parses - [x] Restarted `cuprate` on `amishparadise`; startup config dump confirms `stdout: INFO`, `file: INFO, max_log_files: 14` - [x] Tailed the live file log post-restart — 100% INFO, no DEBUG lines - [x] `scripts/check-manifest-shell.py` clean - [ ] `scripts/sign-catalog.sh` (needs release mnemonic — not run by Claude)
ssmithx added 2 commits 2026-09-01 12:30:33 +00:00
apps/cuprate/manifest.yml only ever wrote network/target_max_memory/
rpc.restricted.enable into Cuprated.toml, so the [tracing.stdout] and
[tracing.file] tables were silently absent — cuprated still applied
its built-in info/debug/7 defaults, but nothing on disk showed it.
Verified live on amishparadise 2026-09-01: the deployed 5-line file
had no [tracing] section at all, and the level was only discoverable
by running `cuprated --generate-config` and diffing.

Add both tables to the manifest's files[].content with the same
values cuprated already defaults to, so every new install ships a
Cuprated.toml an operator can actually read and tune. overwrite:false
means already-deployed nodes (amishparadise included) keep their
existing file untouched — this only changes what fresh installs get.

Regenerated releases/app-catalog.json (unsigned) to embed the updated
manifest; needs scripts/sign-catalog.sh before it's authoritative for
the fleet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ga6N8Jk1YdCTMMX1LjDpAr
The previous commit on this branch copied cuprated's raw
--generate-config defaults (stdout=info, file=debug, max_log_files=7)
verbatim. Turns out that's the wrong reference: compared against
ssmithx@archy-dev-pa:/home/ssmithx/cuprate/Cuprated.toml — the actual
dev config this app was built and tested against — file logging is
meant to run at "info" with 14 rotated files, not the binary's raw
"debug"/7. Confirmed live on amishparadise: podman logs (stdout) was
already clean at info, but the on-disk file log
(.local/share/cuprate/logs/<date>) was flooding with per-peer DEBUG
gossip (~400KB in 2 minutes) because it inherited the binary default
instead of the intended one.

Left the resource-tuning knobs in the reference config (8GB
target_max_memory, tokio/rayon thread counts, P2P connection counts,
explicit reader_threads) out of this file — those were sized for
ssmithx's dev box and don't apply here; this manifest's
target_max_memory already stays deliberately under the container's
4Gi memory_limit.

Regenerated releases/app-catalog.json (still unsigned).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ga6N8Jk1YdCTMMX1LjDpAr
chaum manually merged commit 7125dea05d into main 2026-09-01 12:49:47 +00:00
Sign in to join this conversation.