Repository navigation
census: the call row carries the demanded set, so served != lane means what it says again (#969) - #1796
Open
7vignesh wants to merge 3 commits into
Open
census: the call row carries the demanded set, so served != lane means what it says again (#969)#17967vignesh wants to merge 3 commits into
7vignesh wants to merge 3 commits into
Conversation
…s what it says again (Agent-Field#969) Since the chooser demands the whole admitted set (provider.only with fallbacks off), the router may serve any member of it, so Record.Lane (the ranked head) stopped being the only machine the request would accept. The census read served != lane as the router going somewhere we did not choose, which after the set-demand is often the router choosing a different member of the set we did choose. Add Record.Lanes []string, filled from laneChoice.Only when the demand is still being sent, carrying the whole set when it has two or more members (a one-machine demand is left to Lane alone). The census counts asked != served only when served fell OUTSIDE the admitted set. callrows.Row embeds calllog.Record, so the census reads the new field the day it lands.
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 changed
Since #937 the chooser demands the SET it admitted -
provider.onlywithallow_fallbacks: falseover every machine that survived the gate, the prune, the ceiling and the quality floor - and the router must stay inside that set while being free to pick which member serves. But the call log'sRecord.Laneis one machine (the ranked head), so a row whereserved != lanecan no longer tell "the router chose a different member of the set we admitted" from "the router went somewhere we never named". The census family built on it (asked ≠ served) quietly changed what it measures (#969).internal/calllog: addRecord.Lanes []string(json:"lanes,omitempty"), the whole demanded set.callrows.Rowembedscalllog.Record, so the census reads it the day it lands.internal/provider/calllog.go:demandedLanes(knobs)fillsrecord.Lanesfromknobs.laneChoice.Onlywhererecord.Laneis filled, under the same discipline assoleDemandedLane(only while the demand is still being sent, never off knobs the widen relaxed). Empty when the request demanded nothing or demanded exactly one - the single caseLanealone already answers, and the state of every pre-Lanes: the chooser demands the set it admitted, instead of suggesting it #937 row.cmd/codeaf-census/report.go:servedWasAdmitted- a row with a set agrees when served is a MEMBER of it; a row without one agrees when served matches the single ranked name. Only served landing outside counts as asked ≠ served.Scoped to the first half of the issue. The
cmd/*-replay/Policy.Demandwidening the issue names as the second half is deliberately left out - it is only worth doing once the log can say whether the served machine was inside a set, which this change is.How it was checked
go test ./internal/provider/ -run 'TestADemandedSetLeavesEveryAdmittedMachineOnTheRow|TestASingleMachineDemandLeavesNoSetOnTheRow'- end-to-end throughpacedPair(two believed-in machines behind one model, from the issue's named rig): one real demanded call writes a row carrying both admitted machines inlanes, the ranked head inlane, and served inside the set. Single-machine and no-demand calls write no set.go test ./cmd/codeaf-census/ -run TestServedInsideTheDemandedSetIsNotAskedNotServed- a log with three rows (served inside the set, served outside a lone name, served outside the set) reports asked ≠ served = 2 of 3, counting the in-set row as agreement.go test ./internal/calllog/ -short,go test ./cmd/codeaf-census/- green.go vetandgofmtclean on all touched files;go build ./internal/calllog/ ./internal/provider/ ./cmd/codeaf-census/succeeds.Note: the full
internal/calllogsuite and the fullinternal/providersuite each have one failure on this Windows box that reproduces on cleandevwith my changes stashed -TestNoTestInTheTreeWritesIntoTheLedgerOfWhoeverRanIt(a canary that runs other packages as children, several of which don't build on Windows:internal/sessionis//go:build !windows, others hit SQLiteout of memory) andTestAFiredHedgeAndARefusedHedgeAreBothDecisions(aTempDircleanup race on a trace file still held open). Both are pre-existing and unrelated to this change.Checklist
docs/changes/unreleased/1796-demanded-lanes-on-the-row.md.docs/design/recovery/census-20260910.mdis a captured record and left as written..github/known-red.txt.Closes #969.