Coverage observe baseline: FLEET_COVERAGE_OBSERVE (issue #2, clean-baseline follow-up)#10
Open
jdkajewski wants to merge 1 commit into
Open
Coverage observe baseline: FLEET_COVERAGE_OBSERVE (issue #2, clean-baseline follow-up)#10jdkajewski wants to merge 1 commit into
jdkajewski wants to merge 1 commit into
Conversation
…ssue #2) The merged coverage controller had no zero-behavior-change observe path: turning on FLEET_COVERAGE_ADAPTIVE both emitted telemetry AND changed new-probe target + placement, so it couldn't serve as a clean baseline for measuring what the brain WOULD do before trusting it. Add an explicit observe-only lever so we can run TS live and watch the brain's decisions at zero risk — the data that justifies flipping mutation (and PR3's scheduler) on. - config: FLEET_COVERAGE_OBSERVE (boolOff, default OFF). - fleet/scale.ts: extract a PURE `coverageMode()` resolver. Precedence — OBSERVE forces a pure-observe baseline: the brain runs for TELEMETRY ONLY (legacy probe buys/placement, no redeploys) even if ADAPTIVE/PRUNE are set; flip OBSERVE off + ADAPTIVE/PRUNE on to ENACT. All three off ⇒ brain never runs ⇒ byte-for-byte legacy. - telemetry: `state.coverage` gains wouldPrune (DEAD prune candidates) and wouldRedeploy (the subset with a movable probe parked + a value destination — what enacting WOULD actually move) plus an `observe` flag, alongside the existing tiers/target/probesSaved/recheckDue. Surfaced via main.ts as before. - 8 coverageMode unit tests: all-off ⇒ null telemetry + legacy target + no enactment; OBSERVE ⇒ zero enactment + populated wouldPrune/wouldRedeploy; OBSERVE precedence over ADAPTIVE+PRUNE; ADAPTIVE/PRUNE enact paths; wouldRedeploy gating on parked-probe + value-dest. 273 bot tests green, @st/shared build + @st/bot tsc --noEmit clean, eslint clean on changed files. Branched off latest ts-rewrite-plan; own small PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 & why
The merged coverage controller (PR #6) has no zero-behavior-change observe path: turning on
FLEET_COVERAGE_ADAPTIVEboth emits telemetry and changes new-probe target + placement. So a "partial observe" already deviates from legacy — it can't serve as a clean baseline for measuring what the brain would do before we trust it.This adds an explicit observe-only lever so we can run the TS bot live and watch the coverage brain's decisions (tiers, probesSaved, would-prune / would-redeploy) against real lanes at zero behavior change — the data that justifies flipping mutation on, and justifies PR3's scheduler.
Design —
FLEET_COVERAGE_OBSERVE(default OFF)Extracted a pure
coverageMode()resolver (fleet/scale.ts) that owns the lever precedence; the manager loop just reads its flags.Precedence — OBSERVE forces a pure-observe baseline: when
OBSERVEis set the brain runs for telemetry only (legacy probe buys/placement, no redeploys) even ifADAPTIVE/PRUNEare also set. FlipOBSERVEoff +ADAPTIVE/PRUNEon to enact. With all three off the brain never runs → byte-for-byte legacy.OBSERVE(± adaptive/prune)ADAPTIVE(observe off)ADAPTIVE+PRUNE(observe off)Telemetry (dry-run signal)
state.coveragegains, alongside the existingtierCounts/target/covered/probesSaved/recheckDue:wouldPrune— DEAD prune candidates the brain flags this tick.wouldRedeploy— the subset that has a movable probe parked and a value destination, i.e. what enacting would actually move.observeflag.Surfaced through
main.tsexactly as before (wholestate.coveragepassed through; no status-shape change when the brain is off).Reversibility unchanged
This PR only adds the observe gate; the merged reversible-prune semantics (vacated DEAD markets re-enter cold re-check, never forgotten) are untouched.
wouldRedeploymirrors the same parked-probe + value-dest conditions the enact path uses.Tests / verification
coverageModeunit tests: all-off ⇒ null telemetry + legacy target + no enactment; OBSERVE ⇒ zero enactment + populated wouldPrune/wouldRedeploy; OBSERVE precedence over ADAPTIVE+PRUNE; ADAPTIVE / ADAPTIVE+PRUNE enact paths;wouldRedeploygating on parked-probe + value-dest.@st/sharedbuild +@st/bot tsc --noEmitclean, eslint clean on all changed files.Scope
Small, standalone, branched off the latest
jdkajewski/ts-rewrite-plan. Lands before PR3 (#9, the global req/s scheduler) so PR3 measures against a clean observe baseline. No calibration data reachable from env → principled defaults + the metric, as agreed.