mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
Merge pull request #387 from affaan-m/codex/fix-386-observer-max-turns
fix: raise observer analysis turn budget
This commit is contained in:
@@ -78,9 +78,20 @@ Rules:
|
|||||||
PROMPT
|
PROMPT
|
||||||
|
|
||||||
timeout_seconds="${ECC_OBSERVER_TIMEOUT_SECONDS:-120}"
|
timeout_seconds="${ECC_OBSERVER_TIMEOUT_SECONDS:-120}"
|
||||||
|
max_turns="${ECC_OBSERVER_MAX_TURNS:-10}"
|
||||||
exit_code=0
|
exit_code=0
|
||||||
|
|
||||||
claude --model haiku --max-turns 3 --print < "$prompt_file" >> "$LOG_FILE" 2>&1 &
|
case "$max_turns" in
|
||||||
|
''|*[!0-9]*)
|
||||||
|
max_turns=10
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ "$max_turns" -lt 4 ]; then
|
||||||
|
max_turns=10
|
||||||
|
fi
|
||||||
|
|
||||||
|
claude --model haiku --max-turns "$max_turns" --print < "$prompt_file" >> "$LOG_FILE" 2>&1 &
|
||||||
claude_pid=$!
|
claude_pid=$!
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -2105,6 +2105,21 @@ async function runTests() {
|
|||||||
passed++;
|
passed++;
|
||||||
else failed++;
|
else failed++;
|
||||||
|
|
||||||
|
if (
|
||||||
|
test('observer-loop uses a configurable max-turn budget with safe default', () => {
|
||||||
|
const observerLoopSource = fs.readFileSync(
|
||||||
|
path.join(__dirname, '..', '..', 'skills', 'continuous-learning-v2', 'agents', 'observer-loop.sh'),
|
||||||
|
'utf8'
|
||||||
|
);
|
||||||
|
|
||||||
|
assert.ok(observerLoopSource.includes('ECC_OBSERVER_MAX_TURNS'), 'observer-loop should allow max-turn overrides');
|
||||||
|
assert.ok(observerLoopSource.includes('max_turns="${ECC_OBSERVER_MAX_TURNS:-10}"'), 'observer-loop should default to 10 turns');
|
||||||
|
assert.ok(!observerLoopSource.includes('--max-turns 3'), 'observer-loop should not hardcode a 3-turn limit');
|
||||||
|
})
|
||||||
|
)
|
||||||
|
passed++;
|
||||||
|
else failed++;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
await asyncTest('detect-project exports the resolved Python command for downstream scripts', async () => {
|
await asyncTest('detect-project exports the resolved Python command for downstream scripts', async () => {
|
||||||
const detectProjectPath = path.join(__dirname, '..', '..', 'skills', 'continuous-learning-v2', 'scripts', 'detect-project.sh');
|
const detectProjectPath = path.join(__dirname, '..', '..', 'skills', 'continuous-learning-v2', 'scripts', 'detect-project.sh');
|
||||||
|
|||||||
Reference in New Issue
Block a user