Skip to content

Commit 220b8f5

Browse files
committed
fix(sandbox): use neutral bootstrap epoch and credit contributor
Address clawsweeper review on PR #76590: - [P1] Rename SANDBOX_DOCKER_CREATE_ARGS_EPOCH from "2026-05-init-tini" to a neutral "2026-05-bootstrap" value. The previous string implied --init was already part of this PR; in fact --init lands separately in #74083. Pre-bumping under that string would let containers be recreated with an "init-tini" hash while the actual create args still lack --init, and a later same-string bump in #74083 would no longer force a recreate. Add a header comment that explicitly tells future contributors to bump the epoch in the same PR (or a follow-up PR) as the actual flag change, never speculatively. Test using "2026-05-init-tini"/"2026-04-pre-init" sentinels updated to neutral "epoch-v1"/"epoch-v2" so the test asserts the mechanism without claiming any specific feature lineage. - [P3] Add "Thanks @aaajiao." attribution to the Unreleased changelog entry per repo convention. This PR now adds the mechanism only. Whichever PR ships the first real buildSandboxCreateArgs flag change (e.g. the --init rollout in
1 parent 57342d4 commit 220b8f5

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Docs: https://docs.openclaw.ai
193193
- Agents/fallback: suppress duplicate current-turn user-message transcript writes after embedded fallback retries while still sending the retry prompt to the model. (#63696) Thanks @dashhuang.
194194
- Channels/Telegram: force a fresh final message when a visible non-preview bubble (tool/block/error) was delivered after the active answer preview, so multi-step assistant replies no longer end up with the final answer above intermediate output. Fixes #76529. Thanks @jack-stormentswe.
195195
- Channels/Telegram: require an observed Telegram send, edit, or fallback before treating a forum-topic final as delivered, so final replies generated in transcript no longer disappear from Telegram topics. Fixes #76554. (#76764) Thanks @bubucilo and @obviyus.
196-
- Agents/sandbox: include a `createArgsEpoch` constant in the sandbox and browser-sandbox config hashes so existing containers recreate when `buildSandboxCreateArgs` adds, removes, or changes container flags. Without the epoch, deployments such as `scope: "agent"` with `prune.maxAgeDays: 0` keep running their previously created container indefinitely and never pick up new flags. Pairs with #74083 to make the `--init`/tini reaper rollout reach long-running sandboxes. Refs #68691.
196+
- Agents/sandbox: include a `createArgsEpoch` constant in the sandbox and browser-sandbox config hashes so future PRs that change `buildSandboxCreateArgs` container flags can recreate existing containers by bumping the epoch. Adds the mechanism only, with a neutral bootstrap value; flag-changing PRs bump the epoch in the same release as the flag itself. Refs #68691. Thanks @aaajiao.
197197

198198
## 2026.5.2
199199

‎src/agents/sandbox/config-hash.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ describe("computeSandboxBrowserConfigHash", () => {
194194
};
195195
const left = computeSandboxBrowserConfigHash({
196196
...shared,
197-
createArgsEpoch: "2026-04-pre-init",
197+
createArgsEpoch: "epoch-v1",
198198
});
199199
const right = computeSandboxBrowserConfigHash({
200200
...shared,
201-
createArgsEpoch: "2026-05-init-tini",
201+
createArgsEpoch: "epoch-v2",
202202
});
203203
expect(left).not.toBe(right);
204204
});

‎src/agents/sandbox/constants.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,14 @@ export const SANDBOX_BROWSER_SECURITY_HASH_EPOCH = "2026-04-05-cdp-source-range"
4545
// flags in a way that requires existing sandboxes to be recreated. Date-tag the
4646
// change so readers can trace which release introduced the bump.
4747
//
48+
// IMPORTANT: only bump this in the same PR (or follow-up PR) that ships the
49+
// actual create-args change. Bumping speculatively before a flag lands will
50+
// recreate containers under a hash that claims the new behaviour without it,
51+
// and a later same-string bump will then NOT recreate them again.
52+
//
4853
// History:
49-
// 2026-05-init-tini add --init so tini reaps zombie processes (#74083 / #68691)
50-
export const SANDBOX_DOCKER_CREATE_ARGS_EPOCH = "2026-05-init-tini";
54+
// 2026-05-bootstrap first value; mechanism only, no flag change yet
55+
export const SANDBOX_DOCKER_CREATE_ARGS_EPOCH = "2026-05-bootstrap";
5156

5257
export const DEFAULT_SANDBOX_BROWSER_PREFIX = "openclaw-sbx-browser-";
5358
export const DEFAULT_SANDBOX_BROWSER_NETWORK = "openclaw-sandbox-browser";

0 commit comments

Comments
 (0)