Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(control-api): r1-m1 isolate feed checkpoint range

Josué8bfc851cd5c4
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index c0d3f00d5..efe682948 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.636",
+ "version": "0.1.637",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.636",
+ "version": "0.1.637",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",
diff --git a/control-api/package.json b/control-api/package.json
index 7bab7053e..52a7ddeb8 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.636",
+ "version": "0.1.637",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/test/entityChangeFeed.realPostgres.integration.test.ts b/control-api/test/entityChangeFeed.realPostgres.integration.test.ts
index 81d2571eb..ad6b05894 100644
--- a/control-api/test/entityChangeFeed.realPostgres.integration.test.ts
+++ b/control-api/test/entityChangeFeed.realPostgres.integration.test.ts
@@ -412,6 +412,9 @@ describeRealPostgres('entity change feed real PostgreSQL contract', () => {
})
it('coalesces latest-state invalidations and keeps feed storage behind the runtime boundary', async () => {
+ const baseline = await instancePool.query<{ current_cursor: string }>(
+ 'SELECT current_cursor::text FROM entity_change_watermark WHERE singleton = true'
+ )
const inserted = await instancePool.query<{ resource_id: string }>(
`INSERT INTO gfs_resources (drive, name, kind) VALUES ($1, 'many-updates', 'file')
RETURNING resource_id`,
@@ -450,7 +453,7 @@ describeRealPostgres('entity change feed real PostgreSQL contract', () => {
await expect(restricted.query('SELECT * FROM entity_change_feed')).rejects.toThrow()
const checkpoint = await restricted.query<{ invalidated_scopes: string[] }>(
'SELECT * FROM entity_change_read_checkpoint($1::uuid, $2)',
- ['00000000-0000-0000-0000-000000000000', 10000]
+ [baseline.rows[0]?.current_cursor, 10000]
)
expect(checkpoint.rows[0]?.invalidated_scopes).toEqual(['gfs'])
expect(Object.keys(checkpoint.rows[0] ?? {}).sort()).toEqual([