eb46f0ff54
CI / push-validation (push) Successful in 40s
CI / helm (push) Successful in 44s
CI / build (push) Successful in 1m14s
CI / lint (push) Successful in 1m18s
CI / quality (push) Successful in 1m36s
CI / e2e_tests (push) Successful in 1m19s
CI / typecheck (push) Successful in 2m22s
CI / security (push) Successful in 2m23s
CI / benchmark-regression (push) Failing after 41s
CI / integration_tests (push) Successful in 4m46s
CI / unit_tests (push) Failing after 20m13s
CI / benchmark-publish (push) Failing after 28m28s
CI / coverage (push) Has been cancelled
CI / docker (push) Has been cancelled
CI / status-check (push) Has been cancelled
## Summary This PR fixes issue #10878 where architecture reviews were truncated because the regex pattern for parsing file output would stop at the first ``` encountered in the Markdown report. ## Changes - Change file delimiters from ``` to >>>>>>>/<<<<<<< to avoid Markdown conflicts - Add tier hydration before strategize phase in plan_executor.py - Increase max_tokens to 16384 in llm_actors.py for longer outputs - Increase context_max_tokens_hot from 16000 to 32000 in settings.py - Fix get_hot_view → get_hot_fragments in strategy_actor.py and plan_executor.py - Add opencode to skip directories in context_tier_hydrator.py - Change sandbox output location to plan-output/ directory in plan.py - Add get_context_summary stub method to acms_service.py ## Testing Run architecture review action and verify the output report is complete with all sections. Reviewed-on: #10938
59 lines
3.8 KiB
Gherkin
59 lines
3.8 KiB
Gherkin
Feature: Plan apply correction diff rendering functions
|
|
As a developer maintaining plan_apply_service.py
|
|
I want to cover _build_correction_diff_dict, _render_correction_diff_plain, and _render_correction_diff_rich
|
|
So that all output rendering branches are exercised
|
|
|
|
@coverage
|
|
Scenario: Build correction diff dict with full data including artifacts path
|
|
Given I have a CorrectionAttemptRecord with mode="revert", original_decision_id="dec1", new_decision_id="dec2", guidance="Test fix", and archived_artifacts_path="/artifacts/zip"
|
|
When I call _build_correction_diff_dict on the record
|
|
Then the result should contain "correction_diff", "comparison", and "patch_preview" keys
|
|
And the comparison should have 1 reverted decision and 1 added decision
|
|
And the patch preview should include the artifacts path
|
|
|
|
@coverage
|
|
Scenario: Build correction diff dict without new_decision_id or archived artifacts
|
|
Given I have a CorrectionAttemptRecord with mode="append", original_decision_id="dec3", no new_decision, guidance="Review needed", and no archived artifacts
|
|
When I call _build_correction_diff_dict on the record
|
|
Then the result should contain "correction_diff", "comparison", and "patch_preview" keys
|
|
And the comparison counts are "1" reverted decisions and "0" new ones
|
|
And the patch preview should indicate correction execution is pending
|
|
|
|
@coverage
|
|
Scenario: Render correction diff dict as plain text with artifacts
|
|
Given I have a correction diff dict with mode="revert", original_decision_id="dec-100", guidance="Fix logic", completed_at present, and one added decision "dec-200"
|
|
When I call _render_correction_diff_plain on the dict
|
|
Then the output should contain "Correction Diff" heading
|
|
And the output should contain the mode value "revert"
|
|
And the output should contain "[OK] Correction diff generated" trailer
|
|
And the output should contain "Completed:" timestamp
|
|
And the output should contain the added decision line starting with "+ dec-200"
|
|
|
|
@coverage
|
|
Scenario: Render correction diff dict as plain text without completed_at or guidance
|
|
Given I have a correction diff dict with mode="append", original_decision_id="dec-300", no guidance text, and patch preview note about pending execution
|
|
When I call _render_correction_diff_plain on the dict
|
|
Then the output should contain "Correction Diff" heading
|
|
And the output should NOT contain "Completed:" line
|
|
And the output should NOT contain a "Guidance:" line
|
|
And the output should contain "[OK] Correction diff generated" trailer
|
|
And the output should contain the pending-execution note text
|
|
|
|
@coverage
|
|
Scenario: Render correction diff dict as rich text with artifacts
|
|
Given I have a correction diff dict with mode="revert", original_decision_id="dec-rc1", guidance="Patch rollback", completed_at present, and one added decision "dec-rc2"
|
|
When I call _render_correction_diff_rich on the dict
|
|
Then the output should contain "[bold]Correction Diff[/bold]" heading
|
|
And the output should contain "[cyan]revert[/cyan]" mode color markup
|
|
And the output should contain the rich green checkmark marker at end
|
|
And the output should contain a red-colored reverted decision ID
|
|
And the output should contain a green-colored added decision ID
|
|
|
|
@coverage
|
|
Scenario: Render correction diff dict as rich text without guidance or completion
|
|
Given I have a correction diff dict with mode="append", original_decision_id="dec-rc3", no guidance, and patch preview note about pending execution
|
|
When I call _render_correction_diff_rich on the dict
|
|
Then the output should contain "[bold]Correction Diff[/bold]" heading
|
|
And the output should NOT contain a "Guidance" line
|
|
And the output should contain the pending-execution note in dim markup
|