Skip to content

Fill remaining zero-coverage modules: 12 test files, 476 tests, fix ZeroDivisionError#5

Draft
Copilot wants to merge 7 commits intomainfrom
copilot/continue-task-progress
Draft

Fill remaining zero-coverage modules: 12 test files, 476 tests, fix ZeroDivisionError#5
Copilot wants to merge 7 commits intomainfrom
copilot/continue-task-progress

Conversation

Copy link

Copilot AI commented Mar 10, 2026

Every source module outside core/ had zero test coverage. This adds comprehensive tests for all 12 uncovered modules and fixes a latent crash discovered in the process.

New test files

Module File Tests
core test_social_relational.py 48
mapping test_network_topology.py 40
mapping test_platform_scanner.py 28
mapping test_sentiment_flows.py 45
constellation test_account_registry.py 47
constellation test_content_calendar.py 42
constellation test_cross_promoter.py 47
forecasting test_trend_predictor.py 48
forecasting test_cascade_simulator.py 46
forecasting test_readiness_index.py 48
influence test_comprehension_mechanics.py 56
influence test_receptivity_windows.py 47

Each file covers happy paths, boundary conditions, and empty/unknown-input edge cases for all public methods.

Bug fix — receptivity_windows.py

get_optimal_posting_windows() crashed with ZeroDivisionError when called with an empty node_ids list and min_audience_size=0 because len([]) >= 0 passed the guard before the division:

# Before
if len(receptive_nodes) >= min_audience_size:
    avg_receptivity = total_receptivity / len(receptive_nodes)  # ZeroDivisionError

# After
if len(receptive_nodes) >= max(1, min_audience_size):
    avg_receptivity = total_receptivity / len(receptive_nodes)

Notable test design choices

  • CommunityReadinessIndex fixture isolation: the nascent/strong comparison test uses independent instances rather than shared @pytest.fixture to prevent pytest's function-scoped fixture aliasing from giving both the same underlying object.
  • CrossPromoter.get_promotion_stats() early-returns zeros when self.relays is empty — tests that check chain/reach stats also register a relay to avoid the short-circuit.
  • Kindpath alignment assertions use "community-regenerative" (hyphenated) as a signal keyword so both "community" and "regenerative" substring-match in a single token, reliably producing STRONG alignment (2 keyword matches).

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 10, 2026 06:05
Co-authored-by: S4mu3lD4v1d <238962710+S4mu3lD4v1d@users.noreply.github.com>
Co-authored-by: S4mu3lD4v1d <238962710+S4mu3lD4v1d@users.noreply.github.com>
Copilot AI changed the title [WIP] Continue progress on ongoing task Add .github/copilot-instructions.md to configure Copilot coding agent Mar 10, 2026
…nsparent ops, operator wellness

Co-authored-by: S4mu3lD4v1d <238962710+S4mu3lD4v1d@users.noreply.github.com>
Copilot AI changed the title Add .github/copilot-instructions.md to configure Copilot coding agent Add ethical operations layer replacing stealth infrastructure concept Mar 10, 2026
Copilot AI and others added 2 commits March 10, 2026 06:36
Co-authored-by: S4mu3lD4v1d <238962710+S4mu3lD4v1d@users.noreply.github.com>
…ith state persistence

Co-authored-by: S4mu3lD4v1d <238962710+S4mu3lD4v1d@users.noreply.github.com>
Copilot AI changed the title Add ethical operations layer replacing stealth infrastructure concept Fill test gaps for eldership & ownership engines; wire CLI to real modules Mar 10, 2026
…DivisionError in receptivity_windows

Co-authored-by: S4mu3lD4v1d <238962710+S4mu3lD4v1d@users.noreply.github.com>
Copilot AI changed the title Fill test gaps for eldership & ownership engines; wire CLI to real modules Fill remaining zero-coverage modules: 12 test files, 476 tests, fix ZeroDivisionError Mar 10, 2026
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.

2 participants