Skip to content

feat(e1): fix subjective metadata ownership and layer cycles#226

Open
agustif wants to merge 1 commit intopeteromallet:mainfrom
agustif:feat/e1-metadata-ownership-cycles
Open

feat(e1): fix subjective metadata ownership and layer cycles#226
agustif wants to merge 1 commit intopeteromallet:mainfrom
agustif:feat/e1-metadata-ownership-cycles

Conversation

@agustif
Copy link

@agustif agustif commented Mar 4, 2026

Summary

Implements Epic #207 and sub-issues #211 #212 #213 #214.

This PR removes metadata ownership drift and scoring metadata cycles, and enforces base-layer isolation for subjective metadata definitions.

What Changed

1) Canonical subjective metadata catalog

  • Added desloppify/base/subjective_dimension_catalog.py as single source for:
    • DISPLAY_NAMES
    • WEIGHT_BY_DIMENSION
    • RESET_ON_SCAN_DIMENSIONS

2) Removed metadata/scoring cycle

  • intelligence/review/dimensions/metadata_legacy.py no longer imports scoring core constants.
  • Legacy defaults now come directly from canonical base catalog.

3) Removed runtime cycle-break imports

  • engine/_scoring/subjective/core.py now uses explicit metadata wiring via imports from intelligence.review.dimensions.metadata.
  • Removed runtime import try/fallback cycle-break pattern.
  • Preserved DISPLAY_NAMES compatibility export by wiring it to canonical catalog.

4) Removed upward imports from base subjective module

  • Replaced base/subjective_dimensions.py with a base-only compatibility shim.
  • The shim no longer imports from intelligence or languages.

5) Architecture verification snapshot

  • Re-ran static SCC analysis: metadata/scoring cycle is removed from current import SCC set.

Test Evidence

Executed with local venv (.venv):

  1. python -m pytest desloppify/tests/review/policy/test_review_dimensions_direct.py desloppify/tests/commands/test_lifecycle_transitions.py desloppify/tests/commands/test_direct_coverage_priority_modules.py desloppify/tests/scoring/test_scoring.py -q
  • Result: 116 passed
  1. python -m pytest desloppify/tests/commands/test_cli.py -q
  • Result: 97 passed

Tracking

Parent program: #206

@agustif agustif force-pushed the feat/e1-metadata-ownership-cycles branch from ab1db5d to e6e4469 Compare March 4, 2026 22:39
@agustif agustif marked this pull request as ready for review March 4, 2026 22:51
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