Repository navigation
fix(dashboard): numbers that add up: one Bayesian denominator, pure label helpers (slice 67D, first bundle) - #269
Merged
Merged
Conversation
The list subtracted attempted and discarded trials from a backend not_started that already excluded them, under-reporting the remainder. One shared pure helper now owns the subtraction so the detail screen can adopt it.
…ress and ETA Failed and interrupted runs never complete later, so leaving them out stalled the ring and inflated the ETA. The rule is one fixed string (FINISHED_RUN_RULE) beside pure functions; the clock is injected via now.
… dedup, est., scope, baseline) Plain-text labels from pure helpers so every explanation is deterministic.
…the detail screen Detail now uses bayesianNotStartedCount, passes failed and interrupted to the progress subtitle, takes the ring percent from calculateProgressPercent, and shows a fixed-template line so Bayesian Total = attempted + discarded + not started with Discarded listed apart from runs.
…violations it finds The guard now covers the status, progress, score-label and estimate-label modules and flags filter().length and / x * 100 in the list, detail and explorer screens. Inline counts move into selectableExperimentIds and countConfigsAtScore.
The regexes live in one module so a control can assert they match the exact expressions slice 67D removed and that a parse of a given date stays allowed.
… from planned trials ProgressSubtitle no longer reads the clock or builds its sentence inline (progressSentence in experimentDetailProgress, now passed by the screen), and joins the determinism guard. For Bayesian sweeps the Total tile now reads planned_trials like the totals line; it showed run_count and disagreed when the two differ. Tests assert every card against the line, forward started_at with a fixed clock, and cover the partial-Bayesian list label call site.
… line, keep date parsing to one helper Remaining runs and the ring percent are clamped so an under-reported run_count cannot give a negative ETA or more than 100 percent. The Bayesian totals line annotates in-progress runs inside attempted. countConfigsAtScore moves to an explore-scoped pure module, and the guard now forbids every clock read in pure modules and allows one counted date-parse helper.
…n detail screen The Total tile, ring percent, subtitle, totals line, Planned Bayesian Trials item and Bayesian Summary header all read detailDenominator; they showed run_count in some places and planned_trials in others when the two differ. Tests use run_count 12 / planned_trials 10 and 25 / 20.
… the finished-run rule A multi-run group filtered to one store row showed 'Only run in this group'; group size now comes from the unfiltered groups. ProgressSubtitle renders FINISHED_RUN_RULE when failed or interrupted runs exist (the vacuous self-equality test is gone), and a contract test pins the estimate constants to the server's.
…lanned-trials denominator The sweep overview (running, paused, cancelled, complete and fallback arms) and the terminal and cancellation notes used run_count while the tiles used planned_trials. The totals line now says when attempted_trials disagrees with the loaded run rows, the lone-run group size has no fallback, and the estimate wording names average dimensions.
…12, key files, progress Records the first 67D bundle: the one-denominator rule for Bayesian sweeps, the pure label helpers, the widened determinism guard and what is still open.
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.
What and why
Slice 67D, first bundle (D-1, D-2, D-3 plus Detail-screen wiring and finding F), shipped as one PR by owner decision. Several dashboard numbers disagreed with each other or were wrong; this makes them agree and says how they were reached. Tips and formula lines on every inventory row, the glossary and the Explorer planned total are not in this PR (see "Not in this PR").
bayesianNotStartedCount, is used by the list and the Detail screen.now; the fixed rule text is shown while a failed or interrupted run exists in a running sweep.stats_common.py.detailDenominator()feeds the Total tile, ring, subtitle, totals line, "Planned Bayesian Trials", theN/grid trialsheader and every arm of the sweep-overview sentence. This fixed a real divergence: the Total tile readrun_count(25) while the totals line readplanned_trials(20). The totals line reads "Total 20 = 13 attempted + 4 discarded + 3 not started" and says so when the parts disagree. Grid sweeps are unchanged (the 67A header = Total rule still holds).deterministicNumbers.patterns.tswith a positive-control test;new Datetokens are counted per pure module against a per-file allowance (one, inparseSafeTimestamp); the new pure modules andProgressSubtitleare on the lists; inline counts moved toselectableExperimentIdsandcomponents/explore/scoreCounts.ts.Verification
./scripts/ci/quality-gates.sh: all gates passed on the final commit (1295 backend tests, 570 frontend tests, coverage above the floors,npm audit0,pip-auditclean).120 configurationsequal to the Total tile; no sideways overflow.run_count, was fixed with per-arm mutation proof but was not re-reviewed by the acceptance reviewer.Notes for the reviewer
chunks × dimensionsbecamechunks × average dimensions), the intended wording change.run_countfor Bayesian rows (at creation it equals the capped planned trials, and changing it would break existing assertions);formatDurationprints a NaN-derived string for an invalid timestamp (unchanged).Not in this PR
Tips and formula lines on every inventory row, the UI glossary, the Explorer planned total from
sweep_plan(and removingobservedTotal), the backendduplicates_collapsedcount, and the Query Results breakdown (slice 67E: backend branch reviewed, frontend after this PR).Complexity
Automatically refreshed by CI for product-code changes.
Functions above the JavaScript threshold
ExperimentDetailScreen.tsx:53— CC 118SearchExplorerScreen.tsx:35— CC 38ExplorePanels.tsx:415— CC 29LoadingFeedbackPanel.tsx:41— CC 28labels.ts:36— CC 25ExperimentsScreen.tsx:64— CC 21VectorDbStatsPanel.tsx:84— CC 18ExperimentControlButtons.tsx:54— CC 14loadWalkthruResults.ts:37— CC 14ExperimentsScreen.tsx:465— CC 13Functions above the cognitive-complexity threshold
ExperimentDetailScreen.tsx:53— cognitive 60LoadingFeedbackPanel.tsx:41— cognitive 27labels.ts:36— cognitive 25ExplorePanels.tsx:415— cognitive 23markdown.ts:59— cognitive 20SearchExplorerScreen.tsx:35— cognitive 17steps.ts:63— cognitive 16