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
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:
@@ -4,7 +4,11 @@ import {
|
|||||||
rmSync,
|
rmSync,
|
||||||
unlinkSync
|
unlinkSync
|
||||||
} from 'node:fs'
|
} from 'node:fs'
|
||||||
import { createConnection, type Socket } from 'node:net'
|
import {
|
||||||
|
createConnection,
|
||||||
|
createServer,
|
||||||
|
type Socket
|
||||||
|
} from 'node:net'
|
||||||
import { tmpdir } from 'node:os'
|
import { tmpdir } from 'node:os'
|
||||||
import { join, resolve } from 'node:path'
|
import { join, resolve } from 'node:path'
|
||||||
import { PassThrough } from 'node:stream'
|
import { PassThrough } from 'node:stream'
|
||||||
|
|||||||
@@ -243,7 +243,10 @@ describe('WorkspaceRegistry', () => {
|
|||||||
abort.abort(new Error('cancelled'))
|
abort.abort(new Error('cancelled'))
|
||||||
releaseInspection?.('not-a-repository')
|
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(registry.activeHandleCount()).toBe(0)
|
||||||
expect(existsSync(storagePath)).toBe(false)
|
expect(existsSync(storagePath)).toBe(false)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -344,25 +344,31 @@ describe('AgentAttachTransport', () => {
|
|||||||
expect(transport.closed).toBe(true)
|
expect(transport.closed).toBe(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('writes one maximum-sized blob frame in one SSH write', async () => {
|
it(
|
||||||
const channel = new FakeChannel()
|
'writes one maximum-sized blob frame in one SSH write',
|
||||||
channel.onWrite = () => {
|
async () => {
|
||||||
if (channel.writes.length === 1) {
|
const channel = new FakeChannel()
|
||||||
queueMicrotask(() => channel.remote(packet(welcome)))
|
channel.onWrite = () => {
|
||||||
|
if (channel.writes.length === 1) {
|
||||||
|
queueMicrotask(() => channel.remote(packet(welcome)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
const transport = await connect(channel)
|
||||||
const transport = await connect(channel)
|
const blob = frame(
|
||||||
const blob = frame(
|
{ direction: 'main-to-agent', kind: 'blob' },
|
||||||
{ direction: 'main-to-agent', kind: 'blob' },
|
Buffer.alloc(AGENT_PROTOCOL_LIMITS.maximumBlobFrameBytes)
|
||||||
Buffer.alloc(AGENT_PROTOCOL_LIMITS.maximumBlobFrameBytes)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
await transport.send(blob)
|
await transport.send(blob)
|
||||||
|
|
||||||
expect(channel.writes).toHaveLength(2)
|
expect(channel.writes).toHaveLength(2)
|
||||||
expect(channel.writes[1]).toEqual(Buffer.from(encodeAgentFrame(blob)))
|
expect(channel.writes[1]).toEqual(
|
||||||
transport.dispose()
|
Buffer.from(encodeAgentFrame(blob))
|
||||||
})
|
)
|
||||||
|
transport.dispose()
|
||||||
|
},
|
||||||
|
15_000
|
||||||
|
)
|
||||||
|
|
||||||
it('rejects an oversized blob before writing to SSH', async () => {
|
it('rejects an oversized blob before writing to SSH', async () => {
|
||||||
const channel = new FakeChannel()
|
const channel = new FakeChannel()
|
||||||
|
|||||||
Reference in New Issue
Block a user