Skip to content

Dev - #28

Open
Elenetta17 wants to merge 3 commits into
mainfrom
dev
Open

Dev#28
Elenetta17 wants to merge 3 commits into
mainfrom
dev

Conversation

@Elenetta17

Copy link
Copy Markdown
Member

No description provided.

authenticate/readerLoop/writerLoop now use retina-commons' framing
package instead of encoding/json, and model.ProbingDirective/
ForwardingInfoElement/Prober interface instead of api/v1 types.

Real bugs found and fixed along the way, not just type renames:
- validatePD: restored NearTTL==0 and NearTTL==255 checks that were
  silently dropped during migration (255 would wrap farTTL to 0,
  since NearTTL is uint8); split the combined ICMP/ICMPv6
  header-presence check so an ICMP PD carrying an ICMPv6NextHeader
  (or vice versa) is correctly rejected instead of passing validation
- buildFIE: SourceAddress now only taken from a probe result that
  actually succeeded, not a timed-out one that happens to carry one
- processPD: nil-ProbeResult guard before recordProbeOutcome's
  unconditional dereference - a Prober returning (nil, nil) instead
  of (nil, ErrDuplicatePD) would otherwise panic under wg.Go
- Run: net.Dialer.DialContext instead of net.Dial (ctx wasn't honored
  during connect); single cancellation watcher installed before
  authenticate (not just around the pipeline loops) so shutdown
  during the handshake is honored promptly too
- readerLoop: errors.As instead of a direct net.Error type assertion
  for timeout classification
- G115/exhaustive/copylocks/gocyclo lint fixes throughout

cmd/mock-orchestrator: migrated alongside (framing/wire, same
pattern) since it exchanges directives/FIEs with the agent directly
and would otherwise be unable to speak to it at all post-migration.

Depends on retina-commons with ForwardingInfoElement.SourceAddress
optional (a PD whose near and far legs both time out has no reply
data to derive a source address from).

Verified end-to-end against the real retina-orchestrator binary.
Signed-off-by: Elena Nardi <elena.nardi@lip6.fr>
Signed-off-by: Elena Nardi <elena.nardi@lip6.fr>
Signed-off-by: Elena Nardi <elena.nardi@lip6.fr>
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.44444% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.79%. Comparing base (033e2b2) to head (6052d61).

Files with missing lines Patch % Lines
internal/agent/agent.go 91.17% 5 Missing and 1 partial ⚠️
cmd/mock-orchestrator/main.go 97.10% 2 Missing ⚠️
internal/agent/caracal_prober.go 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   90.72%   90.79%   +0.07%     
==========================================
  Files           8        8              
  Lines        1067     1086      +19     
==========================================
+ Hits          968      986      +18     
- Misses         87       90       +3     
+ Partials       12       10       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant