Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"@tangle-network/agent-eval": "^0.83.0",
"@tangle-network/agent-runtime": "file:..",
"@tangle-network/sandbox": "^0.4.0"
"@tangle-network/sandbox": "^0.4.3"
},
"devDependencies": {
"tsx": "^4.19.0",
Expand Down
26 changes: 13 additions & 13 deletions bench/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions bench/src/experiment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ export async function runExperiment(cfg: ExperimentConfig): Promise<ExperimentRe
})
const iter0 = result.iterations[0]
const infraError = iter0?.error !== undefined && iter0.output === undefined
if (infraError)
console.error(
` [infra-cause] ${label} ${task.id}: ${(iter0?.error instanceof Error ? (iter0.error.stack ?? iter0.error.message) : String(iter0?.error)).slice(0, 700)}`,
)
const resolved = result.winner?.verdict?.valid === true
if (cfg.corpusPath) {
// Fail-loud on a dropped row: a silent drop would leave the corpus with
Expand Down
11 changes: 8 additions & 3 deletions src/runtime/sandbox-lineage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ async function* pollPromptEvents(
signal: AbortSignal,
): AsyncIterable<SandboxEvent> {
if (signal.aborted) throwAbort()
await box.dispatchPrompt(prompt, { sessionId, signal })
const result = await box.session(sessionId).result()
// dispatchPrompt returns the session id the platform actually assigned, which
// may be one it MINTED rather than the supplied `sessionId`. Polling the
// supplied id when the platform minted a different one 404s the session-events
// endpoint ("Resource not found"). Always follow the assigned id.
const dispatched = await box.dispatchPrompt(prompt, { sessionId, signal })
const activeSessionId = dispatched.sessionId
const result = await box.session(activeSessionId).result()
if (signal.aborted) throwAbort()
yield {
type: 'result',
id: sessionId,
id: activeSessionId,
data: {
finalText: result.response ?? '',
success: result.success,
Expand Down
Loading