From 8075de60c6969e17b4dfc9358ee6df0499e4b24b Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Mon, 2 Nov 2026 11:57:01 +0000 Subject: [PATCH] testserver: use 16-digit workspace object ids Scripts register these ids as literal replacements, which run before the harness patterns. A 4-digit id also matched inside other numbers in the output (timestamps, UUIDs, ports, resource ids) and cut them up, making default-python/classic and the bundle/dms tests flaky. Co-authored-by: Isaac --- libs/testserver/fake_workspace.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/testserver/fake_workspace.go b/libs/testserver/fake_workspace.go index dd5050f6f49..4c64a5ebbec 100644 --- a/libs/testserver/fake_workspace.go +++ b/libs/testserver/fake_workspace.go @@ -103,10 +103,12 @@ var ( workspaceID atomic.Int64 ) -// nextTreenodeID starts above common version numbers and counts, which scripts -// can otherwise mask when registering literal ID replacements. +// nextTreenodeID returns 16-digit ids, like real workspace object ids. Scripts register them as +// literal replacements, which apply before the harness's patterns; a short id would also match +// inside other numbers in the output (timestamps, UUIDs, ports) and cut them up. A 16-digit id +// starting with 4 practically never occurs inside those, and never looks like a timestamp. func nextTreenodeID() int64 { - return 1000 + workspaceID.Add(1) + return 4_000_000_000_000_000 + workspaceID.Add(1) } // IDs are prefixed with 7 and padded to avoid matching regex 1[78]\d{14}