feat(e4): add architecture guardrails and regression gates#229
Open
agustif wants to merge 4 commits intopeteromallet:mainfrom
Open
feat(e4): add architecture guardrails and regression gates#229agustif wants to merge 4 commits intopeteromallet:mainfrom
agustif wants to merge 4 commits intopeteromallet:mainfrom
Conversation
49007de to
0fa801b
Compare
This was referenced Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Epic #210 and sub-issues #222 #223 #224 #225.
This PR adds architecture guardrails and regression gates to prevent boundary drift, import-cycle growth, packet mode drift, and persistence safety regressions.
Scope
E4.1 Import boundary checker
.github/importlinter.ini:[importlinter:contract:base_no_upward_imports]desloppify.basemust not directly importapp|engine|intelligence|languagesignore_importsentries to lock current debt while preventing new violations.E4.2 Cycle detection gate
.github/scripts/check_import_cycles.py.github/architecture/cycle_allowlist.txtmake archinMakefileso CI fails on new scoped SCCs in:desloppify.app.commands.reviewdesloppify.engine._plandesloppify.engine._statedesloppify.engine._scoringE4.3 Packet parity golden tests
desloppify/tests/review/policy/golden/review_packet_shared_fields.jsondesloppify/tests/review/policy/test_packet_mode_parity_golden.pyE4.4 Persistence safety property tests
desloppify/tests/plan/test_persistence_safety_properties.pydesloppify/tests/state/test_persistence_safety_properties.pyCI contracts and docs
desloppify/tests/ci/test_ci_contracts.pydocs/architecture_guardrails.mdValidation
source .venv/bin/activate && make archsource .venv/bin/activate && make ci-contracts11 passedsource .venv/bin/activate && pytest -q desloppify/tests/ci/test_ci_contracts.py desloppify/tests/review/policy/test_packet_mode_parity.py desloppify/tests/review/policy/test_packet_mode_parity_golden.py desloppify/tests/plan/test_persistence_safety.py desloppify/tests/plan/test_persistence_safety_properties.py desloppify/tests/state/test_state.py desloppify/tests/state/test_persistence_safety_properties.py73 passed, 1 skippedStack Context
This branch is stacked on implementation work from #227 (E2) and #228 (E3). Guardrail tests/gates are designed to enforce those behaviors going forward.
Tracking
Parent program: #206