Skip to content

fix: scope Codex enrich prompts to active triage clusters#645

Draft
ApexWorm wants to merge 1 commit into
peteromallet:mainfrom
ApexWorm:fix/triage-enrich-active-scope
Draft

fix: scope Codex enrich prompts to active triage clusters#645
ApexWorm wants to merge 1 commit into
peteromallet:mainfrom
ApexWorm:fix/triage-enrich-active-scope

Conversation

@ApexWorm

Copy link
Copy Markdown

Problem

The generic Codex enrich runner received the full plan and its prompt encouraged a global cluster listing. During a frozen/recovered triage session, that could lead the runner to enrich historical clusters unrelated to the active review issues.

Fix

  • Render an explicit Active Enrich Scope from the frozen session using scoped_manual_clusters_with_issues(plan, state).
  • Instruct enrich workers to mutate only the named active clusters and treat the global cluster list as historical context.
  • Keep a fully stale frozen session from falling back to every manual cluster.

Validation

  • python3 -m pytest desloppify/tests/commands/plan/test_triage_runner.py -q (54 passed)
  • ruff check desloppify/app/commands/plan/triage/runner/stage_prompts.py desloppify/app/commands/plan/triage/runner/stage_prompts_instruction_blocks.py desloppify/tests/commands/plan/test_triage_runner.py

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