-
Notifications
You must be signed in to change notification settings - Fork 8
feat/odedgo/atp-checkpointer #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| /** | ||
| * Default configuration values | ||
| */ | ||
| export const DEFAULT_CHECKPOINT_CONFIG: Required<Omit<CheckpointConfig, 'strategy'>> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move from types to consts file
| lines.push('In your next code iteration, you can:'); | ||
| lines.push('1. Directly use data returned from saved checkpoints (full_snapshot)'); | ||
| lines.push('2. Restore a checkpoint value programmatically using:'); | ||
| lines.push(' const value = await __restore.checkpoint("<checkpoint_id>");'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe define '__restore' and 'checkpoint' as consts, and reuse them when adding it to the runtime global at packages/server/src/executor/sandbox-injector.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tho its up to the LLM to choose from, ur suggestion always "injecting" them ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just ment that '__restore' and 'checkpoint' won't be hardcoded in the prompt, since it will break stuff.
You can do something like
const RESTORE_OPERATION = '__restore';
lines.push(`...${RESTORE_OPERATIPN}`)
and in sandbox-injector.js
checkpointSetup += `
globalThis.${RESTORE_OPERATION} = {
...
}
};`;
( same for checkpointer )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got ya, sure 👍
| console.log('\n[TEST] Verified: Sensitive data not exposed in checkpoint'); | ||
| }); | ||
|
|
||
| test('should block if LLM tries to use checkpoint data directly (without restore)', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I get this test - It doesn't test anything. Regardless, I would remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me neither 😓 removing
| return { user, orders, result }; | ||
| `; | ||
|
|
||
| const executeResponse = await fetch(`${BASE_URL}/api/execute`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be simpler to create atp client and use client.execute rather then implementing the API calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MAybe, i just followed existing conventions
Main changes