Break SDL↔processor cycle; add ADR-015 layering + size-cap gates - #53
Merged
Brad-Edwards merged 1 commit intoMay 10, 2026
Conversation
…gates
Moves the SDL-language semantics modules (objectives.py, workflow.py) from
aces_processor/semantics/ to aces_sdl/semantics/, breaking the circular import
that ran through aces_sdl/validator.py -> aces_processor.semantics.*. planner.py
stays in aces_processor (it reconciles compiled resources — a processor
artifact). The aces.core.semantics.* compatibility wrappers retarget to the new
locations; the public aces.* surface is unchanged.
Adds ADR-015 and the policy gates that enforce it (tools/policy/repo_policy.py):
- layering rule: aces_sdl/ may not import aces_processor[...] (AST scan)
- 600-line cap on non-test source files under packages/, with a draining
allowlist (tools/policy/oversized_allowlist.yaml) that must stay a subset of
a code-anchored initial set (_ADR015_INITIAL_OVERSIZED_FILES) and that must
actually be drained by splitting the file, not just edited away
- config-wide reconciliation runs even on deletion-only diffs
- malformed policy config (incl. an unparseable/non-mapping adr_policy.yaml)
and out-of-tree changed/allowlist paths surface as structured failures
(policy-config-malformed, policy-path-unsafe) rather than tracebacks
Adds the MOD-001 ("Codebase Modularity And Layering") requirement
(modularity-initiative phase in requirement_order.yaml) as the anchor for
issue #3's modularity work, plus CHANGELOG 0.14.0 and the
docs/api/{sdl,processor}-semantics.rst split.
Refs #38, #3.
9 tasks
Brad-Edwards
deleted the
38-MOD-001-improve-modularity-break-aces_sdl-aces_processor-cycle-add-policy-gates
branch
May 10, 2026 06:05
7 tasks
Brad-Edwards
added a commit
that referenced
this pull request
Jun 15, 2026
- Convert validator.py (4,139 lines) into a package of <=600-line per-seam mixin modules (core, runtime families, relationships, content/objectives, workflows, sections) behind an API-stable SemanticValidator re-export (#42). - Pure refactor: methods moved verbatim; no validation behavior, diagnostics, pass ordering, exception type, or public-API change. The #38 cycle break (PR #53) is the satisfied ordering prerequisite. - Adapt the error-vs-advisory boundary lint (test_sdl_diagnostic_boundary) to scan the package and aggregate methods across the composed mixins; its rules and synthetic negative-path fixture are unchanged, so the IMP-3/#505 control keeps full teeth. Rationale recorded on the issue. - Remove validator.py from tools/policy/oversized_allowlist.yaml; repoint the F821 forward-ref per-file-ignore to validator/_sections.py. - Repoint stale validator.py references in the semantic-coverage matrix (-> validator/__init__.py) and specs/formal prose (-> package) to the new layout.
13 tasks
Closed
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
aces_sdl ↔ aces_processorcircular import.aces_sdl/validator.pyimportedaces_processor.semantics.{objectives,workflow}whileaces_processor.{compiler,manager,planner,models}importedaces_sdl.*. The two SDL-language semantics modules (objectives.py,workflow.py) move fromaces_processor/semantics/toaces_sdl/semantics/;planner.pystays inaces_processor(it reconciles compiled resources, a processor artifact). Theaces.core.semantics.{objectives,workflow}compatibility wrappers retarget to the new locations, so the publicaces.*surface is unchanged.tools/policy/repo_policy.py, config intools/policy/adr_policy.yaml): a layering rule (aces_sdl/may notimport aces_processor[...], AST-scanned) and a 600-line cap on non-test source files underimplementations/python/packages/, with a draining allowlist (tools/policy/oversized_allowlist.yaml) that must stay a subset of a code-anchored initial set and that can only be drained by actually splitting a file (not by editing the allowlist away). Malformed policy config (including an unparseable / non-mappingadr_policy.yaml) and out-of-tree changed/allowlist paths surface as structured failures (policy-config-malformed,policy-path-unsafe) rather than tracebacks; the config-wide reconciliation runs even on deletion-only diffs.MOD-001("Codebase Modularity And Layering") requirement (a newmodularity-initiativephase intools/policy/requirement_order.yaml) as the Ground Control anchor for issue improve-modularity #3's modularity work — this PR is the cycle-break + size-cap-gate part; the 14 file splits are improve-modularity #3's child issues, which drainoversized_allowlist.yamlone entry at a time (the tracker closes when it's empty). Also: CHANGELOG0.14.0, ADR-015 added to the index + toctree, and adocs/api/{sdl,processor}-semantics.rstsplit.Review context
The
gc_codex_reviewloop ran 4 verification passes past its cap (cycles 17–20, 5/3/3/3 findings) — every finding is dispositioned with a code fix + test or a documented design decision; all four dispositions are recorded as comments on #38. Notable: cycle-19's "movevalidate_workflow_step_resultto the processor for layering purity" fix broke a compat surface, so it was reverted in cycle-20's pass (the function is pure and doesn't violate the layering rule wherever it lives); cycle-20's "add owning-package re-export shims" was declined per ADR-009/010 (theaces.*namespace is the one stable shim layer — see ADR-015 §1).nox -s verifyis green (hygiene · policy · lint · contracts · 809 tests + 50 new policy-tool unit tests · docs).Test plan
nox -s verifypasses locallyimplementations/python/tests/test_repo_policy_tools.pycover: the layering rule (all four import shapes + prefix-boundary + out-of-scope); the size cap (over/under/allowlisted/test-excluded/non-Python); the drain rule (subset of the code constant; config cannot grow the locked set; premature drain rejected; legitimate drain passes); the stale-allowlist-entry rule (below cap / missing / replaced by an out-of-tree symlink); required ADR-015 config blocks; malformed config including a parse-broken / non-mappingadr_policy.yaml; the unsafe-path chokepoint; and config-wide checks running on an empty changed list (deletion-only PRs)aces.core.semantics.*namespace imports still resolve (no test changes needed); full pytest sweep (809 passed) exercises the moved modules viavalidator.py,compiler.py,manager.pyCloses #38. Refs #3.