test: add simulation smoke tests + CI, report delivery trade-off honestly - #2
Merged
Conversation
…livery trade-off The prototype had no test coverage or CI, tracked six stale .pyc files, and its README reported the latency and congestion-avoidance results without noting that the cognitive router delivers only ~24% of packets in the seeded reference run (1000 packets, MAX_HOPS=25). - simulation/tests/test_simulation_smoke.py: end-to-end smoke tests for run_cognitive_sim (200-packet run: completion, dumb-router 100% delivery, cognitive congested-link usage <5%, positive latency gain) and run_baseline_sim (west-to-east route found) - .github/workflows/ci.yml: run the smoke tests on push and PR - README: report the delivery-rate trade-off next to the headline latency claim and point at both sim scripts and the tests Verified: python3 -m unittest discover -s tests passes (6 tests).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The prototype ran but had no verification or hygiene layer:
__pycache__/*.pycfiles tracked in gitChanges
simulation/tests/test_simulation_smoke.py— end-to-end smoke tests for both shipped sim scripts (200-packet run): completion, dumb-router 100% delivery, cognitive congested-link usage <5%, positive latency gain, baseline route found.github/workflows/ci.yml— runs the smoke tests on push and PR (python 3.12).gitignore— ignore__pycache__//*.pyc; the six tracked bytecode files are untracked in the first commitREADME.md— Key Findings now includes the delivery-rate trade-off and points to both sims + the testsVerification
python3 -m unittest discover -s tests -p test_*.py -v→ 6 tests, OK (ran fromsimulation/)Security review
Docs/tests/CI only; no code paths changed; no secrets in diff.
Compatibility
No API or behaviour changes to the simulation code. Tests pin behavioural ranges (not exact floats) so they hold across Python versions despite the seeded RNG.
Follow-up