Skip to content

feat(perturbation): distinguish grid and telecom outage causes - #1691

Merged
AdaWorldAPI merged 3 commits into
mainfrom
research/bangladesh-dual-cause-oracle-egglog
Oct 22, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
research/bangladesh-dual-cause-oracle-egglog

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Purpose

Apply the now-merged #1689 egglog/eggcc/3LA research as a bounded independent oracle contract for perturbation-sim, using AdaWorldAPI/Bangladesh-outage as a historical behaviour/data-source reference without confusing it for measured causal ground truth.

Changes

  • Add crates/perturbation-sim/src/outage_oracle.rs: scalar strong-Kleene 3-state oracle for grid-supply, backup-power and telecom-path availability. Keep grid incidents, service loss, telecom failures and simultaneous causes separate.
  • Add assess_bound: reject invalid windows, cross-tower identities and stale per-source generations before any future egglog/R2IL extraction.
  • Add 11 targeted unit tests (backup protects service; grid-only; telecom-only; both; unknown; contradiction; source freshness; different GUIDs; K3 rewrite truth table).
  • Register and re-export the module from src/lib.rs.
  • Add BANGLADESH_EGGLOG_ORACLE.md: exact legacy Python source mapping, leakage audit, effect-safe cold egglog -> typed R2IL -> Quack/mask-risc target, and independent acceptance gates.

Source-grounded blockers

Historical A10H telemetry labels grid_status = off whenever a tower outage interval is active. It is not an independent power-grid observation, and the A10H event generator lacks a separate telecom-path failure. Region/day aggregation loses site/incident cause. The legacy training pipeline also includes a precomputed future target_outage_15d in model features; fits scaler before split; feeds Sigmoid to BCEWithLogitsLoss; calibrates on scored validation. Do not cite historical synthetic metrics as a physically validated causal oracle.

perturbation-sim::simulate_outage still computes a transmission-grid perturbation, not a tower-down signal. It cannot infer distribution/site power, tower batteries, radio equipment or backhaul without explicit independent evidence.

Verification and status

  • Re-read all committed files on this branch and checked module declaration/re-exports.
  • Independent Python reference enumerated and checked the 27 3-state operand triples for guarded algebra.
  • Rust compiler/Cargo unavailable in this execution environment; unit tests not executed. Run cargo test --manifest-path crates/perturbation-sim/Cargo.toml in a checkout with sibling ndarray before merging.
  • No egglog library integration, R2IL executable, real-data calibration, benchmark, new hot executor or actual database commit in this PR. This is deliberately a draft prerequisite for one source-versioned, offline egglog extraction and independent 3LA-style differential.
  • No changes to Bangladesh-outage itself: it stays a pinned historical reference. Data boundary and model-training corrections belong in separate reviewed changes.

Acceptance/red lines

Grid loss does not imply tower loss when backup works; tower failure does not imply grid loss; simultaneous causes do not collapse. UNKNOWN does not become FALSE. Local row ordinal cannot stand in for tower identity. A cascade's spectral risk ranking cannot be used as an observed site power outage. No cross-table positional gather or effect reordering is admitted by equality saturation.

Links: #1689; Bangladesh-outage.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d07a99e8-184f-4720-89a3-65d6746fa3cb
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 22, 2026 06:35
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-22T06:35:23.777530Z fdc8397 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AdaWorldAPI
AdaWorldAPI merged commit 56ef170 into main Oct 22, 2026
10 checks passed
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