demo mode: stop synthesizing episode + phase events
Per the data-ownership scope: collect (episodes-ingested counter), hosts (per-host bars), and db (database explorer) all work fine in or out of demo mode — they read real values from the server's snapshot. Demo mode shouldn't be injecting fake `episode` records into them. Removed both dispatches from demoTick: - `episode` (was 70% per tick) — no longer clobbers collect/hosts/db - `phase` (was 50% per tick) — dead code anyway; baseline now consumes the dataset-derived `phase_mix` event, not raw `phase` demoTick is now just the model_metric jitter (5% per tick) so the sequence-model bars don't sit frozen during a long demo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
af1f7fb56d
commit
7e7fb52d32
2 changed files with 8 additions and 13 deletions
|
|
@ -224,19 +224,14 @@
|
|||
const demoBtn = document.getElementById('demo-btn');
|
||||
let demoTimer = null;
|
||||
let demoActive = false;
|
||||
const HOSTS = ['elliott-lab', 'elliott-thinkpad', 'k-gamingcom'];
|
||||
const PHASES = ['clean', 'armed', 'infecting', 'infected_running', 'dormant'];
|
||||
// Demo mode is intentionally narrow: it does NOT synthesize
|
||||
// `episode` events (those would clobber the real ingest counter,
|
||||
// host bars, and database explorer — all of which work fine in or
|
||||
// out of demo mode), and it does NOT synthesize `phase` events
|
||||
// (the baseline scene reads dataset-derived `phase_mix` instead).
|
||||
// The only periodic side-effect is occasional model_metric jitter
|
||||
// so the bars don't sit frozen during a long talk.
|
||||
function demoTick() {
|
||||
if (Math.random() < 0.7) {
|
||||
const host = HOSTS[Math.floor(Math.random() * HOSTS.length)];
|
||||
dispatch({ type: 'episode',
|
||||
episode_id: 'demo-' + Math.random().toString(36).slice(2, 12),
|
||||
host_id: host, size_bytes: 30_000 + Math.random() * 20_000 });
|
||||
}
|
||||
if (Math.random() < 0.5) {
|
||||
dispatch({ type: 'phase', phase: PHASES[Math.floor(Math.random() * PHASES.length)] });
|
||||
}
|
||||
// Occasionally tweak a model metric so the bars aren't static.
|
||||
if (Math.random() < 0.05) {
|
||||
const m = ['knn', 'rnn', 'gru', 'lstm', 'bert'][Math.floor(Math.random() * 5)];
|
||||
const base = { knn: 0.736, rnn: 0.872, gru: 0.911, lstm: 0.928, bert: 0.954 }[m];
|
||||
|
|
|
|||
|
|
@ -1314,6 +1314,6 @@
|
|||
</article>
|
||||
</div>
|
||||
|
||||
<script src="/static/dashboard.js?v=883a2c24"></script>
|
||||
<script src="/static/dashboard.js?v=7f41d957"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue