mirror of
https://github.com/ranxianglei/billion-context.git
synced 2026-11-26 20:48:30 +08:00
fix(gate): GATE_SNAPBASE knob wrote the retired storage.snapBase key — egress plane was unreachable in the gate
Ruling 7439 (bc51c9445) removed storage.snapBase.* from the config
surface and made rollout.egressPlane the single switch for the egress
op-log plane, but the gate knob kept writing {storage: {snapBase: ...}}
— a dead key the candidate silently ignores. Net effect: a 'gate with
the egress plane on' run was actually running it OFF, with no signal.
GATE_SNAPBASE now forces rollout.features.egressPlane=true in the lane
proxies' config (the config tier is the only tier that reaches them —
cleanEnv() strips BILI_* from the spawn env by design), and the no-op
storage write is dropped (egress plane has one switch for all protocol
lanes, so any on-value turns the whole plane on). Also drop the stale
'(LOCAL-ONLY, do not commit)' comment on the committed msgid-plane
features.
This commit is contained in:
@@ -112,8 +112,10 @@ mkdir -p "$OUT_DIR"
|
||||
# ---- docker run --------------------------------------------------------------
|
||||
RUN=(docker run --rm "${SRC_ARGS[@]}")
|
||||
if [ -n "$GIT_PROXY" ]; then RUN+=(-e GATE_GIT_PROXY="$GIT_PROXY"); fi
|
||||
# GATE_SNAPBASE: run the P/R lanes with the candidate's snapBase egress plane
|
||||
# ON in the gate's bili.json (value: "all" or openai,responses,anthropic,google).
|
||||
# GATE_SNAPBASE: run the P/R lanes with the candidate's egress op-log plane
|
||||
# ON (rollout.features.egressPlane in the gate's bili.json; the retired
|
||||
# storage.snapBase key no longer exists — ruling 7439, one switch for all
|
||||
# protocol lanes). Value: "all" or a cohort list (any on-value = plane on).
|
||||
# Must be appended AFTER the RUN=(...) init above — an earlier append is wiped
|
||||
# by the reassignment.
|
||||
if [ -n "$SNAPBASE" ]; then RUN+=(-e GATE_SNAPBASE="$SNAPBASE"); fi
|
||||
|
||||
@@ -73,39 +73,37 @@ const MODEL1 = {
|
||||
// drive with the first (matches Lane A's model rotation semantics).
|
||||
const MODEL_IDS = String(MODEL1.model).split(",").map((s) => s.trim()).filter(Boolean);
|
||||
|
||||
// GATE_SNAPBASE (#6785 candidate verification): exercise the snapBase egress
|
||||
// plane. Unset/0/off = off (byte-identical gate); "all" = every protocol
|
||||
// cohort; "openai,responses,anthropic,google" subset = explicit cohorts. The
|
||||
// gate's bili.json is the only config surface the lanes' proxies read.
|
||||
export function gateStorageCfg() {
|
||||
const v = String(process.env.GATE_SNAPBASE || "");
|
||||
if (!v || v === "0" || v.toLowerCase() === "off") return {};
|
||||
const cohorts = v.toLowerCase() === "all" ? [] : v.split(",").map((x) => x.trim()).filter(Boolean);
|
||||
return { storage: cohorts.length ? { snapBase: { enabled: true, cohorts } } : { snapBase: { enabled: true } } };
|
||||
}
|
||||
|
||||
// GATE_SNAPSHOT_RENDER (#6785 verification): flip the candidate's snapshotRender
|
||||
// egress body plane LIVE through the CONFIG tier —
|
||||
// rollout.features.snapshotRender=true (a forced-on shorthand the rollout
|
||||
// resolver honors above bucketing). The env tier
|
||||
// (BILI_ROLLOUT_SNAPSHOT_RENDER) does NOT reach the lane proxies: cleanEnv()
|
||||
// strips BILI_* from the spawn env by design (2026-11-16 gate run 3 showed
|
||||
// snapshotRender=off(bucket) with the env set).
|
||||
// GATE_SNAPBASE / GATE_SNAPSHOT_RENDER (#6785 verification): flip the
|
||||
// candidate's new-plane rollouts LIVE through the CONFIG tier —
|
||||
// rollout.features.<name>=true (a forced-on shorthand the rollout resolver
|
||||
// honors above bucketing). The env tier (BILI_ROLLOUT_*) does NOT reach the
|
||||
// lane proxies: cleanEnv() strips BILI_* from the spawn env by design
|
||||
// (2026-11-16 gate run 3 showed snapshotRender=off(bucket) with the env set).
|
||||
//
|
||||
// GATE_SNAPBASE: the EGRESS op-log plane — successor of the retired snapBase
|
||||
// v2 plane (bc51c9445, ruling 7439: `storage.snapBase.*` left the config
|
||||
// surface, `rollout.egressPlane` is the one switch). Unset/0/off = off
|
||||
// (byte-identical gate); any other value ("all" or a protocol cohort list)
|
||||
// forces egressPlane=true. The egress plane has NO per-protocol cohort
|
||||
// surface (one switch for all lanes, ruling 7439), so every on-value turns
|
||||
// the whole plane on.
|
||||
// GATE_SNAPSHOT_RENDER: snapshotRender plus the msgid-plane rollouts that
|
||||
// ship with this candidate (pluginMsgIdIncremental, identityChannelHarvest).
|
||||
export function gateRolloutCfg() {
|
||||
const v = String(process.env.GATE_SNAPSHOT_RENDER || "");
|
||||
if (!v || v === "0" || v.toLowerCase() === "off") return {};
|
||||
// #6785 all-switches-on verification (LOCAL-ONLY, do not commit): also force
|
||||
// the msgid-plane rollouts that ship with this candidate. Config tier only —
|
||||
// the env tier (BILI_ROLLOUT_*) never reaches the lane proxies (cleanEnv).
|
||||
return {
|
||||
rollout: {
|
||||
features: {
|
||||
snapshotRender: true,
|
||||
pluginMsgIdIncremental: true,
|
||||
identityChannelHarvest: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
const snap = String(process.env.GATE_SNAPBASE || "");
|
||||
const render = String(process.env.GATE_SNAPSHOT_RENDER || "");
|
||||
const snapOn = !!snap && snap !== "0" && snap.toLowerCase() !== "off";
|
||||
const renderOn = !!render && render !== "0" && render.toLowerCase() !== "off";
|
||||
if (!snapOn && !renderOn) return {};
|
||||
const features = {};
|
||||
if (snapOn) features.egressPlane = true;
|
||||
if (renderOn)
|
||||
Object.assign(features, {
|
||||
snapshotRender: true,
|
||||
pluginMsgIdIncremental: true,
|
||||
identityChannelHarvest: true,
|
||||
});
|
||||
return { rollout: { features } };
|
||||
}
|
||||
const MODEL_MAIN = MODEL_IDS[0];
|
||||
const AGENTS = (process.env.GATE_AGENTS || "dsh,pi,codex,opencode,claude")
|
||||
@@ -312,7 +310,6 @@ async function runLane(agent, recipe) {
|
||||
},
|
||||
},
|
||||
compress: { preserveRecentTokens: 0 },
|
||||
...gateStorageCfg(),
|
||||
...gateRolloutCfg(),
|
||||
}, null, 2));
|
||||
writeWindow(BIG_WINDOW);
|
||||
|
||||
@@ -71,7 +71,7 @@ import { spawn, spawnSync } from "node:child_process";
|
||||
import fs from "node:fs";
|
||||
import net from "node:net";
|
||||
import path from "node:path";
|
||||
import { buildCorpus, CODEWORDS, gateStorageCfg, gateRolloutCfg } from "./plugin-lanes.mjs";
|
||||
import { buildCorpus, CODEWORDS, gateRolloutCfg } from "./plugin-lanes.mjs";
|
||||
|
||||
const HERE = path.dirname(new URL(import.meta.url).pathname);
|
||||
const WORK = process.env.RESTART_LANES_WORK || path.join(process.env.WORKDIR || process.cwd(), "restart-lanes");
|
||||
@@ -86,7 +86,7 @@ const MODEL1 = {
|
||||
};
|
||||
const MODEL_IDS = String(MODEL1.model).split(",").map((s) => s.trim()).filter(Boolean);
|
||||
|
||||
const laneCfg = (providers) => ({ providers, compress: { preserveRecentTokens: 0 }, ...gateStorageCfg(), ...gateRolloutCfg() });
|
||||
const laneCfg = (providers) => ({ providers, compress: { preserveRecentTokens: 0 }, ...gateRolloutCfg() });
|
||||
const MODEL_MAIN = MODEL_IDS[0];
|
||||
const AGENTS = (process.env.GATE_AGENTS_R || process.env.GATE_AGENTS || "dsh,pi")
|
||||
.split(",").map((s) => s.trim().toLowerCase()).filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user