Add experimental RNG-based collective coherence monitor (#3208)#3720
Add experimental RNG-based collective coherence monitor (#3208)#3720Reshi12 wants to merge 6 commits into
Conversation
|
@Reshi12 is attempting to deploy a commit to the World Monitor Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR adds an experimental RNG-based collective coherence monitoring module: a client-side
Confidence Score: 5/5Safe to merge — all previously identified regressions are resolved and no new blocking defects are introduced The infrastructure handler is untouched and the new regression test confirms it. The two core buffer bugs (missing await, premature clear) are both fixed. The remaining findings are hardening suggestions: a buffer cap for sustained server failures and broader method coverage in the regression test. src/services/rng-monitor.ts — buffer retention under repeated flush failures; tests/infrastructure-handler-export.test.mts — single-method spot-check Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser as Browser (RngMonitor)
participant Buffer as In-Memory Buffer
participant API as /api/v1/rng/submit (Edge)
loop Every collect() call
Browser->>Browser: crypto.getRandomValues() → raw
Browser->>Browser: "compute z_score = (raw - 0.5) / sqrt(1/12)"
Browser->>Buffer: push RngDataPoint
alt "buffer.length >= 50"
Browser->>Buffer: "snapshot data = [...buffer]"
Browser->>API: "POST {points: data}"
alt response.ok
API-->>Browser: "200 {success: true}"
Browser->>Buffer: slice(data.length)
else server error / network failure
API-->>Browser: 4xx / network error
Browser->>Buffer: retain (no change)
end
end
end
Reviews (2): Last reviewed commit: "Fix PR #3208 infrastructure regression a..." | Re-trigger Greptile |
|
@greptileai can u review the latest changes to ensure the infrastructure handler regressions and RNG buffer bugs are resolved. |
What this fixes
This adds an optional module to monitor random number generator (RNG) data across our nodes to explore potential links between mass consciousness and statistical anomalies.
Why it was happening
We wanted a way to test hypotheses like the Maharishi effect and collective coherence using our existing distributed network.
What changed
src/services/rng-monitor.ts: Added a service to collect and stream local entropy data.src/components/CoherenceDashboardPanel.ts: Created a new dashboard to visualize RNG variance and global coherence.server/worldmonitor/infrastructure/v1/handler.ts: Added an API endpoint to ingest the RNG data for research analysis.How this was tested
Ran the local build and verified that the
RngMonitorservice correctly collects and sends data points to the server handler.Impact
This is an experimental feature. It allows researchers to gather data on collective coherence without affecting the core functionality of the World Monitor.
Closes #3208