Skip to content

fix: scope reloaded sense-check prompts#649

Draft
ApexWorm wants to merge 1 commit into
peteromallet:mainfrom
ApexWorm:fix/sense-check-scope
Draft

fix: scope reloaded sense-check prompts#649
ApexWorm wants to merge 1 commit into
peteromallet:mainfrom
ApexWorm:fix/sense-check-scope

Conversation

@ApexWorm

Copy link
Copy Markdown

Problem

When sense-check runs with content updates enabled, it reloads the full plan before its structure and value passes. That reintroduces historical clusters excluded from the frozen triage scope, producing prompts over Codex's 1 MiB input limit (observed 1,482,619 characters for 570 clusters).

Fix

Reapply the frozen triage scope after each reload before building structure and value prompts. Add a regression test proving that both reloaded prompts include only the active cluster.

Validation

  • python3 -m pytest -q desloppify/tests/commands/plan/test_triage_split_modules_direct.py
  • python3 -m pytest -q desloppify/tests/commands/plan/test_triage_split_modules_direct.py -k 'orchestrator_sense'
  • python3 -m py_compile desloppify/app/commands/plan/triage/runner/orchestrator_codex_sense.py
  • python3 -m ruff check desloppify/tests/commands/plan/test_triage_split_modules_direct.py

Note: Ruff reports a pre-existing import-order violation in the untouched runner module.

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.

1 participant