mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 04:02:25 +00:00
Rename Foundry handoffs to tasks (#239)
* Restore foundry onboarding stack * Consolidate foundry rename * Create foundry tasks without prompts * Rename Foundry handoffs to tasks
This commit is contained in:
parent
d30cc0bcc8
commit
d75e8c31d1
281 changed files with 9242 additions and 4356 deletions
|
|
@ -0,0 +1,21 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { resolveEventListOffset } from "../src/actors/sandbox-instance/persist.js";
|
||||
|
||||
describe("sandbox-instance persist event offset", () => {
|
||||
it("returns newest tail when cursor is omitted", () => {
|
||||
expect(resolveEventListOffset({ total: 180, limit: 50 })).toBe(130);
|
||||
});
|
||||
|
||||
it("returns zero when total rows are below page size", () => {
|
||||
expect(resolveEventListOffset({ total: 20, limit: 50 })).toBe(0);
|
||||
});
|
||||
|
||||
it("uses explicit cursor when provided", () => {
|
||||
expect(resolveEventListOffset({ cursor: "7", total: 180, limit: 50 })).toBe(7);
|
||||
});
|
||||
|
||||
it("normalizes invalid cursors to zero", () => {
|
||||
expect(resolveEventListOffset({ cursor: "-3", total: 180, limit: 50 })).toBe(0);
|
||||
expect(resolveEventListOffset({ cursor: "not-a-number", total: 180, limit: 50 })).toBe(0);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue