Skip to content
edgesync Check-in [995066ac2a]
Login

Check-in [995066ac2a]

Overview
Comment:test(sim): hub + leaf agent end-to-end integration test (#126)

Adds sim/hub_leaf_test.go: a real *hub.Hub bound to auto-allocated ports, a real *agent.Agent built against a leaf repo cloned from the hub, and a round-trip Commit + SyncTo + Hub.ReadAt that exercises the HTTP-xfer path end-to-end.

Without this test, the kind of cross-component regression bones surfaced in #120 (the SetMaxOpenConns deadlock under concurrent clones) only shows up downstream. With it, EdgeSync's own CI catches it.

Wired into the existing 'Sim serve tests' step (Makefile + test.yml) alongside TestServeHTTP/TestLeafToLeaf/TestAgentServe so the test runs on every PR.

Closes #113

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 995066ac2a78ebd974159117907a4e30997993054d44b3bc1bc2d5302eecb956
User & Date: [email protected] on 2026-05-04 19:44:29.000
Other Links: manifest | tags
Context
2026-05-04
20:19
docs(architecture): add hub-package.md ADR (#128)

Documents the top-level hub/ package shipped in PR #109 + revised in PR #122 (deadlock fix).

Covers public API surface, lifecycle ordering (HTTP listener bound during NewHub for immediate HTTPAddr availability, then NATS server ReadyForConnections), the SQLite tuning decision (busy_timeout yes, MaxOpenConns(1) explicitly no — see #120), the in-root vs. separate- module choice (with #118 as the migration path), and integration with the leaf agent (sim/hub_leaf_test.go::TestHubLeafE2E locks the contract).

Cross-referenced from agent-deployment.md and listed at the top of CLAUDE.md alongside the other ADRs.

Closes #114 check-in: afa1002be5 user: [email protected] tags: trunk

19:44
test(sim): hub + leaf agent end-to-end integration test (#126)

Adds sim/hub_leaf_test.go: a real *hub.Hub bound to auto-allocated ports, a real *agent.Agent built against a leaf repo cloned from the hub, and a round-trip Commit + SyncTo + Hub.ReadAt that exercises the HTTP-xfer path end-to-end.

Without this test, the kind of cross-component regression bones surfaced in #120 (the SetMaxOpenConns deadlock under concurrent clones) only shows up downstream. With it, EdgeSync's own CI catches it.

Wired into the existing 'Sim serve tests' step (Makefile + test.yml) alongside TestServeHTTP/TestLeafToLeaf/TestAgentServe so the test runs on every PR.

Closes #113 check-in: 995066ac2a user: [email protected] tags: trunk

19:33
refactor(leaf/agent): use libfossil v0.5.0 UUIDFromRID + whole-checkin Diff (#124)

Cleans up two workarounds in code_artifact.go that existed only because libfossil v0.4.x didn't expose them as first-class APIs:

- Delete the ridToUUID helper (raw SQL probe of libfossil's blob table). Replaced with r.UUIDFromRID(rid) at both callsites: Agent.Tip and Agent.toSyncResult.

- Collapse Agent.Diff from ~25 LOC of file enumeration to a single r.Diff(ridA, ridB, "") call. Uses libfossil v0.5.0's Option-A whole- checkin form. Also fixes wrong-ish rename-detection in the previous hand-rolled implementation.

Adds TestAgent_Diff_RenameAcrossRevs to exercise the rename case the old enumeration got wrong.

Closes #112 check-in: ab2db30284 user: [email protected] tags: trunk

Changes