fix: planet finder review fixes + add microlensing detection pipeline#263
Open
fix: planet finder review fixes + add microlensing detection pipeline#263
Conversation
Review fixes:
- Fix XSS vulnerability in PlanetDashboard.ts (sanitize innerHTML with API data)
- Fix SNR variance calculation in planet_detection.rs (use out-of-transit only)
- Fix sort comparator for string columns in PlanetDashboard.ts
- Fix material/texture memory leaks in PlanetSystem3D.ts (dispose on clearSystem/destroy)
- Fix camera auto-rotate drift by storing intended radius
- Use Kepler's third law for semi-major axis calculation
- Seed orbit eccentricity/inclination from candidate ID for reproducibility
- Add metadata field constants (replace magic numbers)
- Document synthetic embedding limitation
- Fix ADR-040 typo ("two-machinevisu" → "two-machine")
New feature:
- Add microlensing_detection.rs example with M0-M3 pipeline for rogue planet
and exomoon candidate detection using synthetic OGLE/MOA-style light curves
with Paczynski PSPL fitting, residual anomaly detection, and coherence gating
https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
…mple - Change FIELD_* constants from u32 to u16 to match MetadataEntry.field_id type - Add microlensing_detection example to Cargo.toml https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Implements full s-t mincut pipeline for exomoon detection: - Binary lens (Chang-Refsdal perturbation) magnification model - PSPL grid search with linear F_s/F_b regression - Per-window lambda_i scoring with Occam penalty - RuVector retrieval prior from injection bank - Temporal chain + kNN pairwise edges for MRF graph - Edmonds-Karp BFS max-flow / min-cut solver - Global BIC + fragility J-score decision rule - MOA-II and OGLE-IV survey cadence adapters - RVF integration with witness chains and metadata https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Key improvements to the exomoon detection pipeline: PSPL Fitting: - Extract pspl_chi2_at() helper for reuse - Add fine refinement pass (±1 unit, 0.2 step) around coarse grid best - Better parameter recovery for all geometric parameters Lambda Computation: - Three complementary statistics: excess chi2, runs test coherence, Gaussian bump fit - Excess chi2 normalized against event's global reduced chi2 (not theoretical) - Differential lambda: compare each window to its tau-neighbors, producing z-scores that are ~0 for uniform fit quality and positive for localized anomalies - This key change prevents the cut from labeling entire peak regions as moon Detection Criteria: - J-score from lambda_sum with per-window penalty (replacing BIC formalism) - Fragility bootstrap for support stability - Support fraction bounded (2-50%) for localization Embeddings: - Fixed residual computation to use fitted F_s * A(u) + F_b model - Injection bank labels based on positive local evidence (not just geometry) - Bank size increased to 60 events for better prior calibration Current metrics: P=25%, R=25%, F1=0.25 on 30 synthetic events. Detection quality is limited by the perturbative Chang-Refsdal approximation — production requires a full polynomial lens solver, as noted in the user's formulation. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
…ipelines Three new examples extending the graph cut / MRF optimization framework: 1. real_microlensing.rs — Real data analysis pipeline - Simulates events with parameters from published OGLE/MOA discoveries - OGLE-2005-BLG-390 (first cool super-Earth), MOA-2011-BLG-262 (rogue+moon candidate) - OGLE-2016-BLG-1195 (ice planet), MOA-2009-BLG-387 (massive planet) - OGLE EWS format parser for future real data ingestion - Correctly identifies 2 planet candidates + 1 moon candidate - Cross-event similarity search via RVF embeddings 2. medical_graphcut.rs — Medical imaging lesion segmentation - Synthetic 2D tissue with injected tumors (T1-MRI, T2-MRI, CT modalities) - Per-voxel feature extraction: intensity, texture, multi-scale statistics - Graph cut with spatial adjacency + gradient-weighted edges - Outperforms simple thresholding: Dice 0.44-0.59 vs 0.32-0.46 - RVF storage with modality-filtered similarity search 3. genomic_graphcut.rs — DNA copy number variant detection - Synthetic chromosomes with CNV gains, losses, LOH, mutation hotspots - WGS (30x), WES (100x), targeted panel (500x) sequencing platforms - Graph cut segmentation: linear chain + RuVector similarity edges - Cancer driver genes (TP53, BRCA1, EGFR, MYC) detected across all platforms - Sensitivity 91-95%, specificity 66-97% depending on platform All examples include RVF integration (embeddings, filtered queries, lineage, witness chains) and demonstrate the graph cut framework's versatility across astrophysics, medical imaging, and genomics domains. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Reduce both examples to under 500 lines per CLAUDE.md guidelines. Preserve all functionality: graph cut segmentation, RVF integration, witness chains, evaluation metrics, and cancer driver gene detection. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
- Medical: adaptive local thresholding (7x7 neighborhood), 8-connected grid with Gaussian gradient-weighted edges - Genomic: platform-adaptive thresholds, GC-content bias correction, skip-2 segment smoothing edges - Exomoon: finer bump-fit grid (16x8 vs 11x5) for better perturbation sensitivity - New: supply chain anomaly detection (logistics vertical) with 6 disruption types, multi-tier network graph, RVF witness chain https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
- Financial fraud: credit card fraud detection with 5 attack types (card-not-present, account takeover, card clone, synthetic, refund), log-normal transaction amounts, temporal chain + merchant edges - Cybersecurity: network threat detection with 6 attack types (port scan, brute force, exfiltration, C2 beacon, DDoS, lateral movement), flow-level features, source/destination graph edges - Climate: environmental anomaly detection on 30x40 station grid with 6 event types (heat wave, pollution spike, drought, ocean warming, cold snap, sensor fault), spatial adjacency + gradient weighted edges All examples use Edmonds-Karp mincut, RVF witness chains, filtered queries, and lineage derivation. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
…R update Benchmark results and optimizations: - Medical: Dice 0.559-0.750 vs threshold 0.316-0.461 (+41-77%) - Genomic: WGS sens=0.951/spec=1.000, all 4 drivers detected - Climate: F1=0.513 vs 0.333 (+54%), precision 0.833 - Cyber: recall 0.762 vs 0.375, F1=0.400 vs 0.377 - Supply chain: precision 0.890, FPR 0.007 vs 0.014 - Financial: recall 0.800, FPR -40% vs threshold - Exomoon: F1=0.261 (perturbative SNR limit) Missing dashboard components (ADR-040 spec): - MoleculeMatrix.ts: heatmap of molecule confidence for V4 Life - CausalFlow.ts: animated particles along causal edges for V1 Atlas - LODController.ts: boundary/topk/full level-of-detail for atlas - DownloadProgress.ts: tier progress bars for V5 Status ADR-040 additions: - Microlensing pipeline (M0-M3) with MRF/mincut formulation - Cross-domain graph-cut applications (6 verticals) - Measured results section with benchmark data - Rust crate structure documentation - Additional data sources (OGLE, MOA, TCGA, CICIDS2017, etc.) https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
- PlanetDashboard: add escapeHtml() for API data in innerHTML (XSS fix), extend string column set for proper sort ordering - exomoon_graphcut: 3-iteration mincut with lambda boost/decay (F1 improved 0.261 → 0.308, +18%) - planet_detection: document synthetic embedding limitation https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
- Split ADR-040 into sub-ADRs: 040a (dashboard), 040b (microlensing/cross-domain) - Clean up real_microlensing.rs documentation header https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
ADR-040: Replace extracted dashboard and microlensing sections with cross-references to ADR-040a and ADR-040b. Condense data model, adapters, and constructs. Core pipeline content preserved. real_microlensing: Add download manifest with 12 real OGLE/MOA events (8 confirmed planets), cross-survey normalization, enhanced MOA parser, simulated download from published parameters. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
…earch PlanetDashboard: semi-major axis uses a=P^(2/3) instead of P/30, orbit eccentricity/inclination derived from candidate name hash for deterministic reproducibility. planet_detection: 400 log-spaced trial periods for uniform sensitivity, 5 trial transit durations (0.01-0.035) instead of single 0.02 duty cycle. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
ADR-040: Add implementation status table covering QAOA solver, Kepler's law, log BLS grid, multi-duration search, iterative refinement, and OGLE/MOA manifest. 499 lines. ADR-040b: Add QAOA cross-domain enhancement reference. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
New example qaoa_graphcut.rs demonstrates quantum-classical hybrid graph-cut solving using ruQu's QAOA MaxCut implementation as an alternative to the classical Edmonds-Karp mincut solver. - 3 test cases: 1D chains (8, 10 nodes) and 2D grid (3x4) - Encodes graph-cut as MaxCut with source/sink auxiliary nodes - Compares QAOA vs classical: energy, quality ratio, F1 - Convergence analysis sweeping QAOA depth p=1-5 - 340 lines, self-contained https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Analyze real NASA, USGS, and NOAA data using graph-cut anomaly detection: - Exoplanets: flagged VHS J1256b (5085 Mearth direct-imaging outlier), CFHTWIR-Oph 98b (wide-orbit giant), Kepler-1704b (e=0.92 eccentric) - Earthquakes: detected Tonga deep swarm (51 events, avg depth 546km), M7.1 Malaysia deep quake (620km), M6.0 Italy deep event (382km) - Climate: 2010-2026 warming rate +0.385C/decade (2x faster than 1970-1990), 2025 is warmest year at +1.31C anomaly https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Add 4 new graph-cut examples analyzing real public datasets: - seismic_risk.rs: Gutenberg-Richter b-value anomaly detection per grid cell - climate_tipping.rs: multi-resolution cross-scale regime change detection - habitability_bias.rs: exoplanet habitability scoring + discovery-method bias - brain_training_integration.rs: feeds discoveries into π.ruv.io SONA training Fix brain MCP server: wire 7 missing AGI tool dispatches (brain_train, brain_agi_status, brain_sona_stats, brain_temporal, brain_explore, brain_midstream, brain_flags) into handle_mcp_tool_call. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Scripts to push discovery findings to the shared brain API and check status. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Adds architecture decision record for the daily discovery & brain training program and Cloud Build configuration for the trainer job container. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Live discoveries from NASA, USGS, NOAA, arXiv, OpenAlex, World Bank, CoinGecko across space, earth, academic, and economics domains. Dockerfile for the daily brain training Cloud Run job. https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
- trainer.rs: Daily Discovery Brain Training module with altruistic principles by rUv. Fetches NASA, USGS, NOAA, OpenAlex APIs and runs anomaly detection for automated brain training. - Wire trainer into mcp-brain-server lib.rs - Fix train_brain.sh: add Authorization Bearer header for brain API - Successfully trained pi.ruv.io: 897→953 memories, +25,832 graph edges, knowledge velocity activated (0→56) https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
- Add PiQ3/PiQ2 match arms in ruvllm-cli quantize memory estimation - Add main() stub to mincut-gated-transformer-wasm web_scorer example - Gate scipix OCR examples behind required-features = ["ocr"] - Fix usize/u64 type mismatch in ruvector-cnn kernel_equivalence test https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Add ADR-094 defining the architecture for π.ruv.io as a RuVector-native shared web memory platform. Implements Phase 1 (types) and Phase 2 (ingestion pipeline) using the midstream crate for attractor analysis and temporal solver integration. New modules: - web_memory.rs: WebMemory, WebPageDelta, LinkEdge, CompressionTier types - web_ingest.rs: 7-phase ingestion pipeline with dedup, chunking, novelty scoring, compression tier assignment, and midstream integration https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
…erified Review findings and fixes: - web_memory.rs: Added WebMemory::to_summary(), WebPageDelta::new(), 10 new tests (serde round-trips, boundary conditions, edge cases) - web_ingest.rs: Fixed SHA3-256 doc (was incorrectly saying SHAKE-256), fixed chunk_text byte/char inconsistency for multi-byte UTF-8, added within-batch deduplication, removed dead NEAR_DUPLICATE_THRESHOLD, fixed LyapunovResult field names, made helpers public, 18 comprehensive tests - web_store.rs: New WebMemoryStore with DashMap + Firestore write-through, content hash dedup index, domain stats, evolution queries, link edges, 4 tests - ADR-094: Updated status to Accepted (Implementing), added implementation status table, corrected SHAKE-256 → SHA3-256 throughout, updated phase descriptions to match actual implementation 106 tests passing (32 new for web memory modules). https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
Add Rust module (pubmed.rs) and shell script (pubmed_discover.sh) for fetching biomedical abstracts from NCBI E-utilities, detecting emerging topics via rare MeSH term combinations, identifying contradictions through shared MeSH + opposing sentiment signals, and optionally pushing discoveries to the π.ruv.io brain API. Tested against real PubMed data: CRISPR gene therapy (10 emerging topics) and metformin cancer treatment (5 contradiction signals detected). https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby
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.
Review fixes:
New feature:
and exomoon candidate detection using synthetic OGLE/MOA-style light curves
with Paczynski PSPL fitting, residual anomaly detection, and coherence gating
https://claude.ai/code/session_01UWE22wnsZRSHKhT4h4Axby