




























@@ -156,6 +156,11 @@ const legacyConfigMigrationForTest = vi.hoisted(() => {
156156}
157157158158migrateThreadBinding(next.session, changes, "session");
159+const sessionMaintenance = asRecord(asRecord(next.session)?.maintenance);
160+if (sessionMaintenance && "rotateBytes" in sessionMaintenance) {
161+delete sessionMaintenance.rotateBytes;
162+changes.push("Removed deprecated session.maintenance.rotateBytes.");
163+}
159164const channels = asRecord(next.channels);
160165for (const [channelId, channelRaw] of Object.entries(channels ?? {})) {
161166if (channelId === "defaults") {
@@ -333,6 +338,14 @@ vi.mock("../config/legacy.js", () => {
333338'session.threadBindings.ttlHours is legacy; use session.threadBindings.idleHours. Run "openclaw doctor --fix".',
334339);
335340}
341+const sessionMaintenance = asRecord(asRecord(root.session)?.maintenance);
342+if (sessionMaintenance && "rotateBytes" in sessionMaintenance) {
343+addIssue(
344+issues,
345+["session", "maintenance"],
346+'session.maintenance.rotateBytes is deprecated and ignored; run "openclaw doctor --fix" to remove it.',
347+);
348+}
336349const xSearch = asRecord(asRecord(asRecord(root.tools)?.web)?.x_search);
337350if (xSearch && "apiKey" in xSearch) {
338351addIssue(
@@ -1563,6 +1576,11 @@ describe("doctor config flow", () => {
15631576bridge: { bind: "auto" },
15641577gateway: { auth: { mode: "token", token: "ok", extra: true } },
15651578agents: { list: [{ id: "pi" }] },
1579+session: {
1580+maintenance: {
1581+rotateBytes: "10mb",
1582+},
1583+},
15661584browser: {
15671585relayBindHost: "0.0.0.0",
15681586profiles: {
@@ -2304,6 +2322,9 @@ describe("doctor config flow", () => {
23042322bind?: string;
23052323};
23062324session?: {
2325+maintenance?: {
2326+rotateBytes?: unknown;
2327+};
23072328threadBindings?: {
23082329idleHours?: number;
23092330ttlHours?: number;
@@ -2348,6 +2369,7 @@ describe("doctor config flow", () => {
23482369every: "30m",
23492370});
23502371expect(cfg.gateway?.bind).toBe("lan");
2372+expect(cfg.session?.maintenance?.rotateBytes).toBeUndefined();
23512373expect(cfg.session?.threadBindings).toMatchObject({
23522374idleHours: 24,
23532375});
@@ -2414,6 +2436,9 @@ describe("doctor config flow", () => {
24142436},
24152437},
24162438session: {
2439+maintenance: {
2440+rotateBytes: "10mb",
2441+},
24172442threadBindings: {
24182443ttlHours: 24,
24192444},
@@ -2454,6 +2479,8 @@ describe("doctor config flow", () => {
24542479expect(legacyMessages).toContain("does not rewrite this shape automatically");
24552480expect(legacyMessages).toContain("session.threadBindings.ttlHours");
24562481expect(legacyMessages).toContain("session.threadBindings.idleHours");
2482+expect(legacyMessages).toContain("session.maintenance.rotateBytes");
2483+expect(legacyMessages).toContain("deprecated and ignored");
24572484expect(legacyMessages).toContain("channels.<id>.threadBindings.ttlHours");
24582485expect(legacyMessages).toContain("channels.<id>.threadBindings.idleHours");
24592486expect(legacyMessages).toContain("talk:");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。