6 Commits

Author SHA1 Message Date
HAL9000 03d2df26ce fix(tests): align CI tests with A2A boundary refactor
CI / lint (pull_request) Successful in 56s
CI / quality (pull_request) Successful in 56s
CI / build (pull_request) Successful in 54s
CI / typecheck (pull_request) Successful in 1m21s
CI / security (pull_request) Successful in 1m21s
CI / push-validation (pull_request) Successful in 30s
CI / helm (pull_request) Successful in 49s
CI / integration_tests (pull_request) Successful in 10m11s
CI / unit_tests (pull_request) Successful in 11m31s
CI / docker (pull_request) Successful in 2m54s
CI / coverage (pull_request) Successful in 12m17s
CI / status-check (pull_request) Successful in 3s
The shared `format_data` serializer introduced for the CLI→Application
A2A boundary returns raw payloads without the `{"data": ...}` envelope
that the legacy CLI `format_output` wraps around. Two test-step
definitions (`step_artifacts_json_validation`,
`step_artifacts_json_apply_summary`) still unwrapped that envelope and
crashed with `KeyError: 'data'`, errrring the Behave scenarios
`Plan artifacts shows validation results when available` and
`Artifacts include apply summary from metadata`.

Also remove the stale `@tdd_expected_fail` tag from the Robot scenario
`WF02 Mocked Generation Produces Test Artifacts Only`: the scenario
exercises the `_cleveragents/plan/artifacts` A2A dispatch path that this
PR added and now passes naturally; the `tdd_expected_fail_listener`
inverts the passing result to a failure with "Bug appears to be fixed.
Remove the tdd_expected_fail tag".

Adds a CHANGELOG entry covering both the boundary refactor and these
test alignments.

Refs: #9962
Refs: #4253
2026-06-06 19:15:12 -04:00
HAL9000 c957cf8cb1 fix(plan): unwrap format_output envelope in artifact JSON step assertions
The artifacts() method routes JSON through format_output() which wraps
the payload in a spec-required envelope {"data": ..., "status": ...}.
The two @tdd_issue_4253 step assertions were checking parsed["key"]
directly, but the actual fields live at parsed["data"]["key"].

Update step_artifacts_json_validation and step_artifacts_json_apply_summary
to extract parsed["data"] before asserting on validation_summary and
apply_summary respectively.

ISSUES CLOSED: #9084
2026-06-03 05:00:01 -04:00
brent.edwards eb46f0ff54 fix(plan): add tier hydration and improve architecture review output (#10938)
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
2026-05-19 12:43:34 +00:00
Luis Mendes ab911dbdc4 fix(cli): write machine-readable formats directly to stdout bypassing Rich line-wrapping
The format_output() function returned a string that callers passed to
Rich console.print(), which wraps long lines at terminal width.  This
injected literal newline characters into JSON string values (e.g. in
definition_of_done fields), producing invalid JSON that downstream
parsers could not decode (JSONDecodeError: Invalid control character).

For machine-readable formats (json, yaml, plain), format_output() now
writes the rendered output directly to sys.stdout and returns an empty
string.  This preserves the exact serialization from json.dumps/
yaml.dump without Rich text processing artifacts.

Refs: #746
2026-03-17 09:53:57 +00:00
freemo 2881b0cf7a fix(test): resolve ambiguous behave step in combined branch merge 2026-02-21 10:23:33 -05:00
freemo 9f2e7e88b0 feat(plan): add diff review and apply integration
Add PlanApplyService with diff(), artifacts(), persist_apply_summary(),
handle_merge_failure(), and guard_empty_changeset() methods.

- plan diff: renders changeset in rich/plain/json/yaml formats
- plan artifacts: shows plan metadata, changeset summary, sandbox refs
- persist_apply_summary: stores files_changed/validations_run in plan metadata
- handle_merge_failure: transitions plan to error state with conflict details
- guard_empty_changeset: blocks apply on empty changeset (--allow-empty override)

CLI: plan diff and plan artifacts commands with --format flag.
Tests: 20 Behave scenarios, 8 Robot integration tests, 4 ASV benchmarks.
Docs: docs/reference/plan_apply.md with CLI reference.

Implements D0b.apply from the implementation plan.
2026-02-21 10:22:18 -05:00