<?php
require 'examples/boot.php';
require_once dirname(__DIR__).'/Support.php';
use Cognesy\Tell\Tell;
$project = TellHarnessExample::project();
try {
$tell = Tell::open($project);
$workspace = $tell->workspace();
$workspace->initialize();
$workspace->branches()->create('review', empty: true);
$config = $workspace->configuration('review');
$initial = $config->show();
$model = $config->set('model', 'deepseek-v4-flash', $initial->version);
$policy = $config->set('timeoutMs', 15_000, $model->version);
$effective = $config->effective();
echo 'Configured branch: '.$effective->branch."\n";
echo 'Model source: '.$effective->provenance['model']."\n";
echo 'Timeout: '.$effective->values['timeoutMs']."ms\n";
// Delete must use the most recently observed version as well.
$config->delete('timeoutMs', $policy->version);
assert($effective->values['model'] === 'deepseek-v4-flash');
assert($effective->provenance['timeoutMs'] === 'branch');
} finally {
TellHarnessExample::remove($project);
}