Skip to content

Conversation

@encodedz
Copy link
Collaborator

@encodedz encodedz commented Jan 4, 2026

Main changes

  • Implementing ATP Checkpointer layer for "repair" like LLM tool - LLM's will be able to re-utilize checkpoints from failing runs in order to optimize their next run.
  • Integrated with AST Provenance ecosystem

/**
* Default configuration values
*/
export const DEFAULT_CHECKPOINT_CONFIG: Required<Omit<CheckpointConfig, 'strategy'>> = {
Copy link
Contributor

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>");');
Copy link
Contributor

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

Copy link
Collaborator Author

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 ?

Copy link
Contributor

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 )

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got ya, sure 👍

@encodedz encodedz marked this pull request as ready for review January 12, 2026 08:48
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 () => {
Copy link
Contributor

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

Copy link
Collaborator Author

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`, {
Copy link
Contributor

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?

Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants