feat: Store & Forward packets support with custom view (closes #97) #98

Merged
skobkin merged 5 commits from 97_store_n_forward_support into master 2026-06-17 19:42:19 +03:00
Owner
  • feat: Store & Forward packets support with custom view (closes #97)
- feat: Store & Forward packets support with custom view (closes #97)
skobkin self-assigned this 2026-06-17 04:41:59 +03:00
test: close S&F feature test coverage gaps (#97)
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
1a1bf6211a
Migration:
- Refactor `compactLegacyStoreForwardDetails` to tolerate both
  string and int `rr` (via new `resolveLegacyRR` helper). A row
  with a numeric `rr` and a stale `role` key was previously
  aborting the migration with a confusing JSON type-mismatch
  error.
- Add `TestApply_CompactsStoreForwardDetails_AdditionalShapes`
  covering: nonEmptyRaw compactness (`{}`/`null`/`[]` are
  dropped), heartbeat sub-payload round-trip, mixed legacy
  shape (int rr preserved, role stripped), and from/to
  preservation.
- Add `TestApply_CompactsStoreForwardDetails_MissingRRFailsLoudly`
  seeding a legacy row with no `rr` and asserting the
  migration aborts with "missing rr" and rolls back (schema
  version unchanged, row's details_json unchanged).

Renderer:
- Add tab switch test (Details -> Raw -> Details) verifying the
  structured panels are removed when Raw is active and the
  JSON view shows the rr key.
- Add one test per sub-payload grid (stats / history /
  heartbeat) asserting the human-readable labels render -
  catches typos or dropped keys in the *Labels maps.
- Add a test that both from and to render as separate node
  links when both are populated.

Co-Authored-By: Claude <noreply@anthropic.com>
style: fix golangci-lint issues in S&F migration (#97)
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/tag/ci Pipeline was successful
e81c80bd50
CI's `backend-lint` step flagged four issues in the v18 migration
file touched by the previous commit:

- three `nlreturn` warnings (missing blank line before `return` in
  error branches and the function-tail returns)
- one `nilerr` warning on the non-JSON-object pass-through branch in
  `rewriteStoreForwardDetails`. The error is intentionally swallowed
  (any non-object payload should pass through to the generic fallback
  renderer), so the swallow is now explicit via a `//nolint:nilerr`
  directive with a comment.

No behavioural change. `golangci-lint run ./cmd/... ./internal/...`
is now clean and the S&F migration tests still pass.

Co-Authored-By: Claude <noreply@anthropic.com>
skobkin merged commit e81c80bd50 into master 2026-06-17 19:42:19 +03:00
skobkin deleted branch 97_store_n_forward_support 2026-06-17 19:42:19 +03:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
skobkin/meshmap-lite!98
No description provided.