feat(acms): implement DepthReductionCompressor for skeleton compression #1170

Merged
aditya merged 1 commits from feat/depth-reduction-compressor into master 2026-04-01 06:38:11 +00:00
Member

Summary

This PR closes the last missing production component in the ACMS context assembly pipeline by implementing DepthReductionCompressor for the skeleton-compression stage.

The change:

  • adds a production DepthReductionCompressor that re-renders inherited parent fragments to overview depths 0-1
  • resolves reduced detail levels through the UKO DetailLevelMap inheritance chain for code, language-specialized, document, data, infrastructure, and generic fragments
  • exports the compressor through cleveragents.application.services and makes ContextAssemblyPipeline default to it instead of the no-op skeleton compressor
  • adds BDD coverage for compressor behavior and for default pipeline wiring
  • updates CHANGELOG.md with the user-facing change entry required by the contribution guidelines

Motivation

Issue #919 identifies the skeleton-compression stage as the only remaining ACMS pipeline component that still lacked a production implementation. The repository already referenced builtin:DepthReductionCompressor in configuration, but no matching implementation existed. This PR brings the runtime behavior in line with the specification and closes that pipeline gap.

Validation

Completed locally:

  • nox -e lint
  • nox -e typecheck
  • nox -e unit_tests
  • nox -e integration_tests
  • nox -e coverage_report (97.47%)

Environment note:

  • nox -e e2e_tests is blocked locally because the real-provider E2E acceptance suites require external LLM credentials in this environment. The code changes for #919 do not touch those flows.

Closes #919

## Summary This PR closes the last missing production component in the ACMS context assembly pipeline by implementing `DepthReductionCompressor` for the skeleton-compression stage. The change: - adds a production `DepthReductionCompressor` that re-renders inherited parent fragments to overview depths 0-1 - resolves reduced detail levels through the UKO `DetailLevelMap` inheritance chain for code, language-specialized, document, data, infrastructure, and generic fragments - exports the compressor through `cleveragents.application.services` and makes `ContextAssemblyPipeline` default to it instead of the no-op skeleton compressor - adds BDD coverage for compressor behavior and for default pipeline wiring - updates `CHANGELOG.md` with the user-facing change entry required by the contribution guidelines ## Motivation Issue #919 identifies the skeleton-compression stage as the only remaining ACMS pipeline component that still lacked a production implementation. The repository already referenced `builtin:DepthReductionCompressor` in configuration, but no matching implementation existed. This PR brings the runtime behavior in line with the specification and closes that pipeline gap. ## Validation Completed locally: - `nox -e lint` - `nox -e typecheck` - `nox -e unit_tests` - `nox -e integration_tests` - `nox -e coverage_report` (`97.47%`) Environment note: - `nox -e e2e_tests` is blocked locally because the real-provider E2E acceptance suites require external LLM credentials in this environment. The code changes for #919 do not touch those flows. Closes #919
aditya added the
Type
Feature
label 2026-03-27 10:29:36 +00:00
aditya added this to the v3.5.0 milestone 2026-03-27 10:29:36 +00:00
aditya force-pushed feat/depth-reduction-compressor from 262abdf7c8 to 292f38e4ae 2026-03-27 12:25:11 +00:00 Compare
aditya force-pushed feat/depth-reduction-compressor from 292f38e4ae to 01167602a9 2026-03-27 12:40:32 +00:00 Compare
Owner

Code Review Note

Unable to review — the branch feat/depth-reduction-compressor was not found on the remote. The branch may not have been pushed or may have a different name. Please verify the branch exists and update the PR if needed.

## Code Review Note **Unable to review** — the branch `feat/depth-reduction-compressor` was not found on the remote. The branch may not have been pushed or may have a different name. Please verify the branch exists and update the PR if needed.
freemo requested review from freemo 2026-03-28 21:28:09 +00:00
freemo requested review from CoreRasurae 2026-03-28 21:28:09 +00:00
freemo approved these changes 2026-03-30 04:21:31 +00:00
Dismissed
freemo left a comment
Owner

Review: APPROVED with Comments

Strong feature implementation with good BDD coverage.

Notes

  1. acms_skeleton_compressor.py at 579 lines slightly exceeds the 500-line guideline. The 5 render visitor classes could be extracted to a separate module.
  2. Breaking metadata type change: DepthBreadthProjector metadata values changed from int/bool to str. The step assertion was loosened to match. This could break downstream consumers — ensure nothing depends on the numeric types.
  3. Mixed concerns: The metadata type changes and import refactoring in depth_breadth_projection.py are separate from the compressor feature. Ideally separate commits.
  4. builtin: import path: getattr(builtin_services, class_name) without validation could import any public name. Consider an explicit allowlist.
## Review: APPROVED with Comments Strong feature implementation with good BDD coverage. ### Notes 1. **`acms_skeleton_compressor.py` at 579 lines** slightly exceeds the 500-line guideline. The 5 render visitor classes could be extracted to a separate module. 2. **Breaking metadata type change**: `DepthBreadthProjector` metadata values changed from `int`/`bool` to `str`. The step assertion was loosened to match. This could break downstream consumers — ensure nothing depends on the numeric types. 3. **Mixed concerns**: The metadata type changes and import refactoring in `depth_breadth_projection.py` are separate from the compressor feature. Ideally separate commits. 4. **`builtin:` import path**: `getattr(builtin_services, class_name)` without validation could import any public name. Consider an explicit allowlist.
Owner

Day 50 Planning — Branch availability required.

The branch feat/depth-reduction-compressor was reported as not found on remote since Day 48 (2026-03-27). This PR implements DepthReductionCompressor for ACMS skeleton compression (v3.5.0).

@freemo — Please push the branch or confirm status. This feature is part of the ACMS pipeline critical path. Without the branch, no review can proceed.

Reviewers have been assigned: @CoreRasurae and @brent.edwards.

Day 50 Planning — **Branch availability required.** The branch `feat/depth-reduction-compressor` was reported as not found on remote since Day 48 (2026-03-27). This PR implements DepthReductionCompressor for ACMS skeleton compression (v3.5.0). @freemo — Please push the branch or confirm status. This feature is part of the ACMS pipeline critical path. Without the branch, no review can proceed. Reviewers have been assigned: @CoreRasurae and @brent.edwards.
aditya force-pushed feat/depth-reduction-compressor from 01167602a9 to 92135ec0d6 2026-03-30 10:43:20 +00:00 Compare
aditya dismissed freemo's review 2026-03-30 10:43:20 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Author
Member

@freemo addressed the review notes and force-pushed feat/depth-reduction-compressor on top of the latest master.

Updates from your comments:

  • extracted the skeleton render visitors into src/cleveragents/application/services/acms_skeleton_renderers.py so acms_skeleton_compressor.py stays under the size guideline
  • restored DepthBreadthProjector projected metadata values to native int/bool types so downstream consumers do not see the string coercion change
  • kept the depth_breadth_projection.py changes scoped to the compressor integration and child-focus prioritization, without the earlier metadata/import refactor drift
  • added an explicit builtin allowlist in ComponentResolver and covered the rejection path with the new features/component_resolver.feature scenario for builtin:ConfigService
@freemo addressed the review notes and force-pushed `feat/depth-reduction-compressor` on top of the latest `master`. Updates from your comments: - extracted the skeleton render visitors into `src/cleveragents/application/services/acms_skeleton_renderers.py` so `acms_skeleton_compressor.py` stays under the size guideline - restored `DepthBreadthProjector` projected metadata values to native `int`/`bool` types so downstream consumers do not see the string coercion change - kept the `depth_breadth_projection.py` changes scoped to the compressor integration and child-focus prioritization, without the earlier metadata/import refactor drift - added an explicit builtin allowlist in `ComponentResolver` and covered the rejection path with the new `features/component_resolver.feature` scenario for `builtin:ConfigService`
aditya force-pushed feat/depth-reduction-compressor from 92135ec0d6 to 87ef5a4bba 2026-03-30 14:20:49 +00:00 Compare
aditya force-pushed feat/depth-reduction-compressor from 87ef5a4bba to 4b973c56c5 2026-03-30 14:21:23 +00:00 Compare
aditya scheduled this pull request to auto merge when all checks succeed 2026-03-30 14:21:36 +00:00
aditya force-pushed feat/depth-reduction-compressor from 4b973c56c5 to 1923496c14 2026-03-31 06:35:05 +00:00 Compare
aditya force-pushed feat/depth-reduction-compressor from 1923496c14 to 151bc1bf99 2026-03-31 07:59:08 +00:00 Compare
aditya force-pushed feat/depth-reduction-compressor from 151bc1bf99 to cf4bee72d5 2026-03-31 08:34:27 +00:00 Compare
aditya force-pushed feat/depth-reduction-compressor from cf4bee72d5 to b30461e5be 2026-03-31 08:43:44 +00:00 Compare
aditya force-pushed feat/depth-reduction-compressor from b30461e5be to 8c5016389e 2026-03-31 11:36:29 +00:00 Compare
aditya force-pushed feat/depth-reduction-compressor from 8c5016389e to d4a5d2ebdc 2026-03-31 13:53:58 +00:00 Compare
aditya force-pushed feat/depth-reduction-compressor from d4a5d2ebdc to b0d5204567 2026-03-31 14:03:16 +00:00 Compare
aditya force-pushed feat/depth-reduction-compressor from b0d5204567 to 137d040c4d 2026-04-01 06:16:43 +00:00 Compare
aditya merged commit b579178b67 into master 2026-04-01 06:38:11 +00:00
aditya deleted branch feat/depth-reduction-compressor 2026-04-01 06:38:11 +00:00
Sign in to join this conversation.
No Reviewers
No Label
Type
Feature
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cleveragents/cleveragents-core#1170