Skip to content

test: add simulation smoke tests + CI, report delivery trade-off honestly - #2

Merged
Yudis-bit merged 2 commits into
mainfrom
chore/prototype-verification
Aug 5, 2026
Merged

test: add simulation smoke tests + CI, report delivery trade-off honestly#2
Yudis-bit merged 2 commits into
mainfrom
chore/prototype-verification

Conversation

@Yudis-bit

Copy link
Copy Markdown
Owner

Problem

The prototype ran but had no verification or hygiene layer:

  • no tests and no CI, so the README's performance claims were unverifiable on every push
  • six stale __pycache__/*.pyc files tracked in git
  • the README's Key Findings reported ~22% latency improvement and congestion avoidance without noting that the cognitive router delivers only ~24% of packets in the seeded reference run

Changes

  • 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 commit
  • README.md — Key Findings now includes the delivery-rate trade-off and points to both sims + the tests

Verification

  • python3 -m unittest discover -s tests -p test_*.py -v → 6 tests, OK (ran from simulation/)
  • Full 1000-packet reference run reproduced the README numbers before any change (22.08% latency gain; 1/1000 vs 373/1000 congested trips; 23.8% cognitive delivery)

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

…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).
@Yudis-bit
Yudis-bit merged commit c8d146e into main Aug 5, 2026
1 check passed
@Yudis-bit
Yudis-bit deleted the chore/prototype-verification branch August 5, 2026 22:30
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