Skip to content

feat(edge): harden fleet reporter delivery - #28

Open
Jorel97 wants to merge 2 commits into
Clawland-AI:mainfrom
Jorel97:codex/edge-reporter-24
Open

feat(edge): harden fleet reporter delivery#28
Jorel97 wants to merge 2 commits into
Clawland-AI:mainfrom
Jorel97:codex/edge-reporter-24

Conversation

@Jorel97

@Jorel97 Jorel97 commented May 31, 2026

Copy link
Copy Markdown

Closes #24

/claim #24
Strengthens the Edge Reporter module for Fleet Manager / MoltClaw delivery while keeping the existing edge config shape intact.

What changed:

  • Adds explicit Register() and SendHeartbeat() reporter methods so registration and heartbeat delivery can be tested directly.
  • Adds ReportStatus() for structured node status snapshots at /fleet/status.
  • Keeps ReportEvent() and PublishGene() behavior, but adds event type validation and deterministic timestamp plumbing for tests.
  • Makes reporter shutdown idempotent and falls back to a sane heartbeat interval when config is zero or negative.
  • Hardens HTTP delivery with trailing-slash-safe endpoint joining, bearer token authorization, injectable HTTP client, and response-body details on non-2xx failures.
  • Documents Fleet Manager reporter endpoints in the README.
  • Adds httptest coverage for registration, heartbeat with gene stats, status, events, gene publishing, authorization, failure details, validation, and idempotent stop handling.
  • Includes a small deterministic pkg/gene tie-breaker fix so the repository-wide Go suite can pass while reviewing the bounty branch.

Verification:

  • go test ./pkg/edge
  • go test ./pkg/edge ./cmd/picoclaw
  • go test ./...
  • git diff --check

Reviewer note: after the maintenance update, the branch passed go test ./..., including pkg/edge, pkg/gene, and pkg/logger.

@Jorel97

Jorel97 commented May 31, 2026

Copy link
Copy Markdown
Author

Maintenance update pushed after the issue-thread validation discussion:

  • added deterministic gene-selection tie-breaks when candidate scores are equal (score desc, then confidence desc, then verification count desc)
  • this removes the unrelated full-suite blocker in pkg/gene while leaving the Edge Reporter scope intact

Validation after the update:

  • go test ./... -> passed, including pkg/edge, pkg/gene, and pkg/logger
  • git diff --check -> passed

@Jorel97

Jorel97 commented Jun 1, 2026

Copy link
Copy Markdown
Author

Validation refresh for bounty #24:

  • PR body now explicitly uses Closes #24 for issue association.
  • Re-ran validation on the current branch:
    • go test ./pkg/edge ./cmd/picoclaw -> passed
    • go test ./... -> passed
    • git diff --check -> passed

No contributor-side changes are pending unless maintainers want a different reporter API shape.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bounty: edge reporter module

1 participant