Repository navigation
refactor(campaign): move the arm-to-strategy mapping out of the proxy (2/3, #1302) - #1333
Conversation
…the proxy Add the library package `campaign`. It holds the calibrated constants, the closed-form replay, the fidelity model, the ship gate, the auto builder and the decision math that proxy/predictive.go, campaignauto.go, adaptreplay.go and adaptcache.go used to hold. The proxy reads history and files and calls it. No behaviour change. The rowFloor wait-cause gap stays as it is (#1298). Refs #1309 Closes #1302 (with the next PR in the stack) Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.331 | offload-review skill, @amiddavid's session | fresh | 1 of 2 | 1 of 2 | bc42e0f05093 |
approve |
Verdict: approve
Findings
None. The change is a faithful move. I found no behavior difference.
Non-blocking
- campaign/arms.go:273 —
DefaultWeekdaysis an exported, mutable slice.WeekdaysFromNamesreturns this one shared slice when no name is recognized. Any importer can now append to it or edit it, and change the fallback work week for every other caller. Before, the variable was unexported, so only the proxy could touch it. Suggestion: return a copy, or keep the variable unexported behind a function. - campaign/arms.go:101 — the code now uses
config.DefaultHeadTTLMinTokens, which config itself marks DEPRECATED (config/config.go:314). The value is the same 50,000 the old mirror had, andtenant.Strategy.HeadTTLMinTokensis the token-shaped column, so the use is coherent. But a future reader of config's doc will see new code told not to use this constant. Worth a one-line comment in arms.go, or nothing. - Stale names in comments.
kvcache/registry.go:340still says "proxy's campaignDefaultMaxPings"; that constant no longer exists.proxy/campaign_test.go:417,426,484,495,635still nameresolveCampaignCell,coalesceCampaignCellsandheadTTL1hHonoredModels, nowcampaign.ResolveCelletc. Comments only; no code effect. - docs/design.md package map has no
campaign/row. The row was missing since the first stacked PR (a0c73c5), not from this one. This PR only grows the package.
What I checked
- Read the full diff
a0c73c59..HEAD(one commit, 5 files) and the code around each change:campaign/arms.go,campaign/arms_test.go,proxy/campaign.go,proxy/campaign_test.go,cmd/cg-cache-campaign/run.go. - Move fidelity, function by function. I compared each moved function (
ArmFor,ResolveCell,MarkOverlaps,DuplicateCell,WeekdaysFromNames,TileHours,Coalesce,hourSetKey,StrategyForGroup,CellOutcome,ArmEnforceable,HeadTTL1hHonored) against its old copy inproxy/campaign.goat the base commit. Control flow, check order, and every skip-reason string are identical. - The mirror constants became config reads. I verified each value is equal today:
config.DefaultKeepAliveIdle= 240 (config/config.go:288) = oldcampaignKeepAlive5mIdle;DefaultKeepAliveMaxPings= 2 (config.go:290) = oldcampaignDefaultMaxPings;DefaultKeepAliveMinPrefix= 80000 (config.go:302) = oldcampaignDefaultMinPrefixTokens;DefaultHeadTTLMinTokens= 200000/4 = 50000 (config.go:313-318) = oldcampaignDefaultHeadTTLMinTokens. All four are compile-time constants, not runtime-configurable, so no behavior change today. ThelegacyMinPrefixTokens(20000) and the 280 s / 3360 s simulator cadences stay literal, as before. This de-mirroring is declared in the PR description. HonorsHeadTTL1hconsolidation. The oldtenantHonorsHeadTTL1hin proxy (err → false, empty model list → false, any unmeasured model → false) and the oldhonorsclosure inrun.go/summarise both collapse tocampaign.HonorsHeadTTL1h, which fails closed on an empty list. I traced both call sites; semantics are identical. The new function has its own test (TestHonorsHeadTTL1hFailsClosed).campaignCellOfcopies all 9 fields the oldresolveCampaignCellread fromdash.KVCacheSuggestion(User, HourUTC, Requests, BestStrategy, SavingUSD, BaselineUSD, OptimalSavingUSD, InsufficientData, UnpricedRequests). The dash type's other fields (Candidates, Valued, SavingPct...) were never read by the moved logic.- Tests. Every unit test that left
proxy/campaign_test.goreappears incampaign/arms_test.gowith only renames; every HTTP-level test stayed in proxy. The bounds test (TestCampaignArmForStaysWithinValidStrategyBounds) correctly stayed in proxy, wherevalidStrategyBoundslives. The value-pinning tests kept their pins (240/2/80000, 280/20000), andTestCtlCreateCampaignEndToEndstill pins idle 240 and the 80k floor through the real route.TestCellOutcomeAndTenantCellcovers the newTenantCellconversion. - Package rules.
campaignimports onlyconfig,kvcache,tenant— noproxyimport, so the library/proxy boundary holds. No import cycle: nothing inconfig,kvcacheortenantimportscampaign. No identifier conflicts with the campaign package's existing files (decision.go, replay.go, eval.go, adapt.go, fidelity.go). - No leftover references to the removed proxy identifiers (
campaignArmFor,resolveCampaignCell,campaignDefault*,headTTL1hHonoredModels, ...) outside comments. - The local
campaignvariable inctlCreateCampaignwas renamed tocamp, so the package import is not shadowed where"created via campaign: "+camp.Nameis built. - Live tests were not approved, so I did not build or run anything; all verification above is by reading the code.
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.331 | offload-review skill, @amiddavid's session | fresh | 2 of 2 | 1 of 2 | bc42e0f05093 |
approve |
Verdict: approve
Findings
None. The change is a code move with no behavior change. I verified this claim, not just read it.
Non-blocking
- Stale comments in files this PR does not touch. Three comments still point at the old location or a deleted constant:
tenant/keepalivestrategy.go:236says "campaign.go's tileHours". The function is nowcampaign.TileHoursincampaign/arms.go.tenant/campaign.go:73says "see proxy/campaign.go's arm-mapping table". The table is nowcampaign.ArmFor.kvcache/registry.go:340says "proxy's campaignDefaultMaxPings". That constant no longer exists anywhere. The value is nowconfig.DefaultKeepAliveMaxPings.
campaign/arms.go:107— the old explanation of the token-named field is gone. The proxy comment said 50,000 tokens is the 200,000-byte gate, becauseresolveHeadTTLreads tokens x 4 bytes.config.DefaultHeadTTLMinTokensis marked DEPRECATED inconfig/config.go:314. The new code uses it with no note. A future reader may "fix" the deprecated use and break the byte math.proxy/campaign.go:441— mangled comment. The rename left "is in honors the 1h tier (campaign.HonorsHeadTTL1h)". It should read "is in the honored set (campaign.HeadTTL1hHonored)".proxy/campaign_test.go:32— the bounds test passes the default floor for every arm.TestCampaignArmForStaysWithinValidStrategyBoundspassesconfig.DefaultKeepAliveMinPrefix(80000) as theminPrefixargument, nota.MinPrefixTokens. Arms with a 20000 floor are checked at 80000. Pre-existing: the old code passedcampaignDefaultMinPrefixTokensthe same way.TestCampaignEnforcesTheKPingArmsBudgetdoes passa.MinPrefixTokens, and other tests pin each floor, so the gap is covered.
What I checked
- Value parity, constant by constant. The old proxy-local literals versus what the new code reads:
campaignDefaultMinPrefixTokens80000 =config.DefaultKeepAliveMinPrefix(config/config.go:302).campaignKeepAlive5mIdle240 =config.DefaultKeepAliveIdle(config/config.go:288).campaignDefaultMaxPings2 =config.DefaultKeepAliveMaxPings(config/config.go:290).campaignDefaultHeadTTLMinTokens50000 =config.DefaultHeadTTLMinTokens(200000 / 4, config/config.go:313-318).campaignDefaultPredictorThreshold0.5 =defaultPredictorThreshold0.5.campaignLegacyMinPrefixTokens20000 =legacyMinPrefixTokens20000.campaignLegacyIdle5m/1h=legacyIdle5m/1h, samekvcache.DefaultPingIdle(280 s) andDefaultPingIdle1h(3360 s) expressions.
So no number changes today. The new coupling toconfigis named in the PR body and in the code.TestCampaignKeepAlive5mIsTheRecommendedPolicystill pins 240 / 2 / 80000, so a later config re-fit trips a test instead of moving an arm silently.
- Logic parity, function by function.
ResolveCell,MarkOverlaps,DuplicateCell,WeekdaysFromNames,TileHours,Coalesce,StrategyForGroupandArmForare the old bodies with field renames only. I read both versions side by side in the diff. Gate order is unchanged: hour range, arm enforceable, 1h model gate, insufficient data, unpriced rows. HonorsHeadTTL1hdedupe. The proxy'stenantHonorsHeadTTL1h(proxy/campaign.go:444-452) andcmd/cg-cache-campaign's old inline loop both become calls tocampaign.HonorsHeadTTL1h. The new function returns false for no models and false on any unmeasured model. Both old copies did the same. The error path intenantHonorsHeadTTL1hstill fails closed.- Callers kept working.
proxy.CampaignCellOutcome,CampaignArmEnforceableandHeadTTL1hHonoredstay as one-line wrappers.cmd/cg-cache-campaign/run.goandproxy/campaignoutcome_test.gostill call them.campaignCellOfcopies every field ofdash.KVCacheSuggestionthatCelldeclares. - No leftover references. I grepped the repo for every deleted identifier (
campaignArmFor,resolveCampaignCell,tileHours,coalesceCampaignCells,campaignDefault*,headTTL1hHonoredModels, and the rest). Only the stale comments listed above remain. - Package hygiene.
campaignimportsconfig,kvcache,tenantonly. It imports nothing fromproxy, so the CLAUDE.md library boundary holds. Thecampaignpackage already existed and already importedconfig(decision.go, from commit a0c73c5), andproxynon-test files already importedconfigdirectly at base (adaptctl.go, control.go and others), so no new dependency edge is created. No symbol conflicts with the existingcampaignfiles. The local variable renamecampaigntocampinctlCreateCampaignavoids shadowing the new package import. - Tests. Every test removed from
proxy/campaign_test.goreappears incampaign/arms_test.gowith renames only. Two tests are new (TestCellOutcomeAndTenantCell,TestHonorsHeadTTL1hFailsClosed); both add coverage. The proxy keeps the HTTP-route, bounds, rollback and K-ping tests.tenant.CampaignCellis all scalar fields, so the newgot != wantcomparison is valid. - Commit and PR body. DCO sign-off present,
Assisted-By:attribution per repo convention. The PR body names the mirror-constant removal and claims no behavior change; my constant-by-constant check confirms the claim. Data dependence is unchanged, and nodocs/data-dependencerow is affected.
- Document that Eval and BuildSpec need facts when segBy is set. - Drop the dead `if ss := ...; true` wrapper in Rows. - Drop the idle loop in the Apply test: Apply takes no idle. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
Move the mapping of a suggest arm to a live keep-alive strategy, the cell resolution, the overlap and duplicate checks, the weekday and hour tiling and the grouping of cells into strategies into the `campaign` library package. - The mirror constants of config.Default* are gone. The library reads config.DefaultKeepAliveIdle, DefaultKeepAliveMaxPings, DefaultKeepAliveMinPrefix and DefaultHeadTTLMinTokens. The values do not change. - `campaign.HonorsHeadTTL1h` replaces two copies of the "every model honors the 1h tier" rule: the proxy's and cmd/cg-cache-campaign's. - The proxy keeps the HTTP routes, the views and validateGroupStrategy. No behaviour change. Refs #1309 Closes #1302 Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
- DefaultWeekdays is a function that returns a copy; a test pins it. - Explain the 50,000-token head-TTL gate and why the deprecated config constant is the right value there. - Fix stale comments that named the old proxy functions. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
bc42e0f to
f27cf87
Compare
|
Round-1 notes, fixed in f27cf87 (macOS, Go 1.27.4; build, vet, gofmt clean;
|
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.331 | offload-review skill, @amiddavid's session | resumed | 1 of 2 | 2 of 2 | f27cf87f9092 |
approve |
Verdict: approve
Findings
None. The fix commit f27cf87 addresses the round-1 notes correctly. I found no new defect in it.
Earlier findings, status
Mine (round 1, all non-blocking):
DefaultWeekdaysexported mutable slice — fixed.defaultWeekdaysis now unexported (campaign/arms.go:278).DefaultWeekdays()returnsslices.Clone(defaultWeekdays)(arms.go:286).WeekdaysFromNamesreturns that copy in the fallback case (arms.go:314), so a caller's edit cannot reach the next call.TestWeekdaysFallbackIsACopypins both paths: it mutates the result ofWeekdaysFromNames(nil)and ofDefaultWeekdays()and checks the next call is unchanged.- Deprecated
config.DefaultHeadTTLMinTokensused with no note — fixed. A named constantheadTTLMinTokens(arms.go:41) carries the explanation: the stored strategy field is token-shaped, the gate reads tokens x 4 bytes, so 50,000 tokens is the 200,000-byte gate, and the deprecated constant is the right value here. Both 1h arms now use the named constant. Value unchanged:config.DefaultHeadTTLMinTokens= 200000/4 = 50000. - Stale comments — fixed. All five places I named, plus the two tenant files and the mangled sentence reviewer 2 named. I grepped the new head for
campaignDefaultMaxPings,resolveCampaignCell,coalesceCampaignCells,campaign.go's tileHoursandarm-mapping table: no hit outside.review-in-*files. The replacement texts are accurate (campaign.ArmFor,campaign.TileHours (campaign/arms.go),campaign.ResolveCell,campaign.Coalesce). - docs/design.md package map has no
campaign/row — not addressed. No reply and no change. I keep it non-blocking: the row was missing since the first stacked PR (a0c73c5), and this PR only grows the package. It can land with the series' last PR.
Reviewer 2's (round 1):
- Stale comments in
tenant/keepalivestrategy.go:236,tenant/campaign.go:73,kvcache/registry.go:340— agree with reviewer 2, and fixed in f27cf87. I verified each replacement myself. - The token-field explanation gone from the 1h arms — agree, fixed by the same
headTTLMinTokensconstant as my item 2. - Mangled sentence in
proxy/campaign.go— fixed; it now reads "honors the 1h tier (campaign.HonorsHeadTTL1h)". - The bounds test passing the default floor for every arm — not addressed by the author. Reviewer 2 themselves marked it pre-existing and covered (
TestCampaignEnforcesTheKPingArmsBudgetpassesa.MinPrefixTokens, and each floor is pinned elsewhere). I checked both tests at the new head; I agree it needs no change in this PR.
Non-blocking
- None new. Item 4 above stays open as non-blocking.
What I checked
- Last review: round 1, bc42e0f, 2026-11-24T09:17:36Z.
- New commits read: 3.
beb1292d"address round-1 notes on the replay move" — the new base, entered the range through the rebase. Read in full: doc lines onEval/BuildSpecfacts, a deadif ss := ...; truewrapper dropped inRows, a redundant idle loop dropped in a test. Base-branch changes, not part of this PR's diff; no issue found.ba18d136"move the arm-to-strategy mapping out of the proxy" — the reviewed move commit rebased. I diffed it against the round-1 headbc42e0f0: the only differences are the three filesbeb1292dtouches. The move content is unchanged from what I verified in round 1.f27cf87f"address round-1 notes on the arm mapping move" — read the full diff and the code around each hunk.
- Read in full: 2 reviews, 1 comment, 0 inline comments (from
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt). - New items since my last review, and what I did:
- Reviewer 2's round-1 review (posted 22 s after mine, so unread in round 1): read in full; checked each of their notes against the fix commit (statuses above).
- The author's comment (2026-11-24T09:30:38Z) listing the fixes: checked every claim against f27cf87. All three claims hold.
- Fix-commit detail checks:
slicesimport added and used; no caller anywhere still treatsDefaultWeekdaysas a variable (grep at the new head); the fallback inWeekdaysFromNamesreturns a fresh copy per call, so the old shared-slice identity is gone with no caller depending on it;headTTLMinTokensis used in bothkeepalive-1harms and equals the old 50,000. - Re-verified the round-1 conclusions still hold at the new head: the PR diff
beb1292d..f27cf87fis the move I already verified plus f27cf87's fixes; nothing else changed. - Live tests were not approved, so I did not build or run anything; all verification is by reading the code.
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.331 | offload-review skill, @amiddavid's session | resumed | 2 of 2 | 2 of 2 | f27cf87f9092 |
approve |
Verdict: approve
Findings
None. The new commits fix the round-1 notes correctly. I found no new defect.
Round-1 items
Mine:
- Stale comments (
tenant/keepalivestrategy.go:236,tenant/campaign.go:73,kvcache/registry.go:340): fixed. All three now namecampaign.TileHours,campaign.ArmForandconfig.DefaultKeepAliveMaxPings. - Lost explanation of the token-named
HeadTTLMinTokens: fixed.campaign/arms.go:41-45has the named constantheadTTLMinTokenswith the old explanation: 50,000 tokens is the 200,000-byte gate, tokens x 4 bytes, and why the deprecated config constant is the right one here. Value unchanged. - Mangled comment in
proxy/campaign.go: fixed. Now reads "honors the 1h tier (campaign.HonorsHeadTTL1h)". - Bounds test passes the default floor for every arm: not fixed, no reply. I keep it out of findings: it is pre-existing test weakness, and
TestCampaignEnforcesTheKPingArmsBudgetplus the floor-pinning tests cover the gap.
Reviewer 1's:
DefaultWeekdaysexported mutable slice: fixed. The variable is now unexported.DefaultWeekdays()returnsslices.Clone(defaultWeekdays), andWeekdaysFromNamesreturns that copy.TestWeekdaysFallbackIsACopypins both: an edit to one result does not reach the next call. The only caller ofWeekdaysFromNamesoutside the package isproxy/campaign.go:307, which only reads the slice, so the copy is safe. The variable was born in this PR stack, so turning it into a function breaks no released caller.- Deprecated-constant note: fixed, same as my item 2.
- Stale names in
proxy/campaign_test.go: 4 of 5 fixed. One remains, see Non-blocking. docs/design.mdhas nocampaign/row: not fixed, no reply. Reviewer 1 dated it to the first stacked PR (a0c73c5), not this one. Still non-blocking.
Non-blocking
proxy/campaign_test.go:426— one stale name left. The comment says "(see headTTL1hHonoredModels)". That identifier no longer exists; the set is unexported incampaign/arms.gobehindcampaign.HeadTTL1hHonored. Reviewer 1 listed five places; the fix commit covered four. Comment only, no code effect.campaign/arms.go:295— the doc says "this returns DefaultWeekdays". It now returns the function's copy. The sentence still reads correctly; no change needed.
What I checked
- Last review: round 1, bc42e0f, 2026-11-24T09:17:58Z
- New commits read: 3:
beb1292d— address round-1 notes on the replay move. This is the PR's new base, from the stacked sibling PR. Doc comments onEval/BuildSpec(facts nil only when segBy is empty), removal of the deadif ss := ...; truewrapper inRows, and a simplifiedApplytest. I read the whole diff: the wrapper removal keeps the samesort.Searchlogic and the test keeps the same assertion. No behavior change.ba18d136— the reviewed arm-mapping move, rebased ontobeb1292d. I diffeda0c73c59..bc42e0f0againstbeb1292d..ba18d136: the patches are byte-identical. The rebase changed nothing I reviewed in round 1.f27cf87f— the round-1 fixes. Read in full, checked line by line as described above.
- Read in full: 2 reviews, 1 comment, 0 inline comments (from
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt; the inline file is empty). - New items since my last review, and what I did about each:
- The author's comment at 2026-11-24T09:30:38Z, claiming items fixed in f27cf87. I verified each claim against the code; all hold except the one leftover comment above.
- The rebase (base moved a0c73c5 → beb1292, head bc42e0f → ba18d13). Verified patch identity, so my round-1 verification still stands.
- The two new commits, reviewed as above.
- Repo-wide grep for every old identifier (
campaignArmFor,resolveCampaignCell,tileHours,coalesceCampaignCells,campaignDefault*,headTTL1hHonoredModels, and the rest): one hit remains, the comment atproxy/campaign_test.go:426. DefaultWeekdaysusages: all incampaign/arms.goandcampaign/arms_test.go; no other package referenced the round-1 variable, so the var-to-function change breaks nothing.headTTLMinTokens = config.DefaultHeadTTLMinTokens: value check repeated, 200000 / 4 = 50000, equal to the old mirror.- Live tests were not approved, so I did not build or run anything. The author's comment reports
go test -race ./campaignand the proxy campaign tests passing on macOS, Go 1.27.4; I could not independently confirm, but nothing in the diff risks them.
Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
|
Output of |
Assisted-By: Claude Opus 5.5 <[email protected]>
|
Output of |
|
Output of Why CHANGED: the old patch contained the #1332 commits too. #1332 is now in main as a squash, so the patch against the new base is smaller. All 5 commits in the range-diff are equal. The head is a plain merge of origin/main with no conflict: |
|
Approval check by hand: the approvals of
This PR's own diff did not change:
|
Summary
Second of 3 stacked PRs for #1302. Based on
feat/mv-1302-campaign-replay. Moves the arm-to-strategy mapping out ofproxy/campaign.gointocampaign. Part of #1309.What changed
ArmFor,ResolveCell,MarkOverlaps,DuplicateCell,WeekdaysFromNames,TileHours,Coalesce,StrategyForGroup,CellOutcomemoved tocampaign/arms.go.dash.KVCacheSuggestiontocampaign.Cell.config.DefaultKeepAliveIdle(240),DefaultKeepAliveMaxPings(2),DefaultKeepAliveMinPrefix(80000) andDefaultHeadTTLMinTokens(50000). Values are equal to the old copies. The pre-Workstream B: cache keep-alive and lifecycle prediction #435 floor (20000) stays a named local constant.cmd/cg-cache-campaign: itssummariserepeated the rule "every model honors the 1h tier, and at least one model" (it is also intenantHonorsHeadTTL1h). Both now callcampaign.HonorsHeadTTL1h.proxy.CampaignCellOutcome,CampaignArmEnforceableandHeadTTL1hHonoredstay as one-line wrappers, socmd/cg-cache-campaignand its tests need no change.validateGroupStrategy. That function callsvalidStrategyBounds,validWindowsandvalidPredictorRef. refactor(keepalive): move keep-alive policy resolution out of the proxy #1301 owns those, so it moves after refactor(keepalive): move keep-alive policy resolution out of the proxy #1301.Behaviour
None.
campaign.HonorsHeadTTL1hreturns false for no models, as both old copies did.Data dependence
Same as before. The mapping reads suggest cells (counts, dollars, arm names). No stored text.
How it was tested
macOS, Go 1.27.4. Build, vet and gofmt clean.
go test ./campaign ./proxy ./cmd/cg-cache-campaignpass. Moved tests run unchanged incampaign/arms_test.goapart from renames. Mutation: dropping the "no models" check failsTestHonorsHeadTTL1hFailsClosed. Changing thekeepalive-5mfloor failsTestCampaignNonRecommendedArmsKeepTheirOldFloor.Refs #1302, #1309.