fix: stabilize Linux release validation
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s
GoodBuddy Agents / Validate Agent source (push) Canceled after 0s
GoodBuddy Agents / Build Linux arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build Linux x64 Agent (push) Canceled after 0s

Ubuntu validation exposed a missing Unix socket test import, a platform-dependent cancellation-message assertion, and a maximum-frame test that could exceed the default timeout under shared-runner load. The tests now exercise the intended behavior consistently without changing product code.
This commit is contained in:
mesalogo
2026-08-25 21:21:58 +08:00
parent da00a850ec
commit 9c50de521e
3 changed files with 31 additions and 18 deletions
+5 -1
View File
@@ -4,7 +4,11 @@ import {
rmSync,
unlinkSync
} from 'node:fs'
import { createConnection, type Socket } from 'node:net'
import {
createConnection,
createServer,
type Socket
} from 'node:net'
import { tmpdir } from 'node:os'
import { join, resolve } from 'node:path'
import { PassThrough } from 'node:stream'
+4 -1
View File
@@ -243,7 +243,10 @@ describe('WorkspaceRegistry', () => {
abort.abort(new Error('cancelled'))
releaseInspection?.('not-a-repository')
await expect(pending).rejects.toThrow('cancelled')
await expect(pending).rejects.toMatchObject({
code: 'aborted',
message: 'Workspace operation was aborted'
})
expect(registry.activeHandleCount()).toBe(0)
expect(existsSync(storagePath)).toBe(false)
})
@@ -344,25 +344,31 @@ describe('AgentAttachTransport', () => {
expect(transport.closed).toBe(true)
})
it('writes one maximum-sized blob frame in one SSH write', async () => {
const channel = new FakeChannel()
channel.onWrite = () => {
if (channel.writes.length === 1) {
queueMicrotask(() => channel.remote(packet(welcome)))
it(
'writes one maximum-sized blob frame in one SSH write',
async () => {
const channel = new FakeChannel()
channel.onWrite = () => {
if (channel.writes.length === 1) {
queueMicrotask(() => channel.remote(packet(welcome)))
}
}
}
const transport = await connect(channel)
const blob = frame(
{ direction: 'main-to-agent', kind: 'blob' },
Buffer.alloc(AGENT_PROTOCOL_LIMITS.maximumBlobFrameBytes)
)
const transport = await connect(channel)
const blob = frame(
{ direction: 'main-to-agent', kind: 'blob' },
Buffer.alloc(AGENT_PROTOCOL_LIMITS.maximumBlobFrameBytes)
)
await transport.send(blob)
await transport.send(blob)
expect(channel.writes).toHaveLength(2)
expect(channel.writes[1]).toEqual(Buffer.from(encodeAgentFrame(blob)))
transport.dispose()
})
expect(channel.writes).toHaveLength(2)
expect(channel.writes[1]).toEqual(
Buffer.from(encodeAgentFrame(blob))
)
transport.dispose()
},
15_000
)
it('rejects an oversized blob before writing to SSH', async () => {
const channel = new FakeChannel()