Regenerate the example labs, and fail CI if they drift again #399
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!399
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/examples-generated"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Running the documented regeneration step on a clean tree rewrote all four examples — lab1 +59, lab2 +34, lab3 +435, lab4 +111 lines. The committed JSON was a state the serializer could no longer produce: it predates the
seqfield, and its device and link entries differ too.Nothing failed, which is why it survived — every lab still loaded and pinged. The cost landed on the next contributor: add one lab, inherit 639 lines of unrelated churn.
Regenerates the four files and adds
test/examples-generated.test.js, which re-serialises each committed file and fails when the result differs, naming the drifted keys and the command that fixes it.Proved it catches the drift rather than assuming: reverted the examples, ran the test against the committed state — four failures, one per lab, each naming
devices, links, seq. After regeneration, 21 assertions pass. It also asserts each file serialises identically twice and pings two labs, so a clean round trip cannot hide a broken lab. 85 suites, 4232 assertions.d8a6edc91f8150a10621