Skip to content

refactor(structex): delete dead shadowed duplicate modules aragora/types.py and aragora/receipts.py#8633

Merged
scarmani merged 1 commit into
mainfrom
structex/p4a-dead-files
Jun 25, 2026
Merged

refactor(structex): delete dead shadowed duplicate modules aragora/types.py and aragora/receipts.py#8633
scarmani merged 1 commit into
mainfrom
structex/p4a-dead-files

Conversation

@scarmani

Copy link
Copy Markdown
Collaborator

Summary

Delete the two dead, shadowed duplicate modules aragora/types.py and aragora/receipts.py (P4a layering foundation; architecture §6 module consolidation map; feature p4a-dead-files).

Both .py files are unreachable because same-named packages shadow them and take import precedence:

  • import aragora.types resolves to aragora/types/__init__.py (not the .py)
  • import aragora.receipts resolves to aragora/receipts/__init__.py (not the .py)

So deleting the .py files is semantically inert and needs no shim (the packages already take over). Specifically:

  • aragora/receipts.py only re-exported DecisionReceipt (from aragora.gauntlet.receipt) and LegacyDecisionReceipt (from aragora.export.decision_receipt). The aragora/receipts/ package already re-exports both (strict superset, plus LaneCompletionReceipt/emit_lane_receipt/etc.).
  • aragora/types.py's aliases (AgentName/DebateId/Score) were unreachable behind the aragora/types/ package (which exports the event protocols). No external module imported those aliases (only the deleted file's own docstring referenced them).

ODR conflict check (MANDATORY FIRST STEP) — CLEAN

Re-ran gh pr diff --name-only across all 233 open PRs and explicitly on the 3 open ODR PRs:

Validation (fulfills VAL-P4A-007)

$ git ls-files aragora/types.py aragora/receipts.py
(empty)
$ test -z "$(git ls-files aragora/types.py aragora/receipts.py)" && echo PASS
PASS
$ python3 -c "import aragora.types, aragora.receipts; print(aragora.types.__file__); print(aragora.receipts.__file__)"
.../aragora/types/__init__.py
.../aragora/receipts/__init__.py     # exit 0; both resolve to the packages

Local gates (all green): make lint ✓ · ruff format --check ✓ · differential typecheck (new=64 ≤ env-drift 66) ✓ · pytest tests/types tests/receipts tests/export 671 passed ✓ · make test-smoke import canary ✓ · smoke tier 138 passed ✓.

Notes for reviewers

  • No shim is intentional and correct here: this is a deletion of dead duplicates, not a move/rename. The old import paths (aragora.types, aragora.receipts) keep working because the packages shadow the deleted files (verified above).
  • aragora/module_tiers.yaml is intentionally NOT regenerated in this PR. Deleting types.py recomputes the types module tier (integratedexperimental), but aragora/module_tiers.yaml is path-frozen by open PRs chore(deps): update audit-vulnerable Python locks #8460/fix(ci): clear base security and smoke blockers #8461/feat(tier4): settle_tier4_pr.py — one-command --settle-apply + receipt-backed preapproval gate #8382. The Module Tier Drift workflow is non-required and is already red on main for an unrelated ambient reason (NEW module: missions). Per the documented docs/METRICS.md path-freeze precedent, this drift is left for an orchestrator-coordinated regen that absorbs both items (does not affect the 6 required checks; docs/METRICS.md itself stays within the 0.5% drift tolerance, so it is unchanged).
  • Stale .github/CODEOWNERS glob /aragora/types.py @an0mium is left untouched: CODEOWNERS is a @scarmani-pinned Tier-4 merge-authority surface; a dangling glob is harmless (GitHub ignores entries for non-existent paths). Flagged for an operator-owned follow-up.

Risk

Minimal. Deletion of unreachable dead code; import behavior is unchanged (proven by the companion import check + import canary + 671 consumer tests).

…pes.py and aragora/receipts.py

Both modules are dead/unreachable: same-named packages aragora/types/ and
aragora/receipts/ shadow them and take import precedence, so
`import aragora.types`/`import aragora.receipts` already resolve to the
packages (types/__init__.py, receipts/__init__.py). receipts.py was only a
re-export of aragora.gauntlet.receipt + aragora.export.decision_receipt, both
of which the receipts/ package already re-exports (strict superset); types.py's
aliases were unreachable behind the package. No shim is needed (the packages
take over). ODR conflict check clean: zero open PRs touch either file (the 3
open ODR PRs #8608/#8389/#8289 are aragora/gauntlet/-only).

Fulfills VAL-P4A-007.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@scarmani scarmani marked this pull request as ready for review June 25, 2026 21:34
@scarmani scarmani requested a review from an0mium as a code owner June 25, 2026 21:34
@github-actions

Copy link
Copy Markdown
Contributor

Aragora Code Review

Advisory-only review. No issues found.

@scarmani

Copy link
Copy Markdown
Collaborator Author

Claude independent model review

Reviewer: claude (anthropic) — independent adversarial model review via the Aragora Claude reviewer, grounded on the exact PR head.
Head: 30801fb (30801fb), committed 2026-06-25T21:30:25Z.
PR: #8633.
Model family: claude

Verdict: PASS

No findings.

dogfood: yes

@scarmani

Copy link
Copy Markdown
Collaborator Author

Grok independent model review

Reviewer: grok (xai) — independent adversarial model review via Grok Build CLI harness, grounded on the exact PR head.
Head: 30801fb (30801fb), committed 2026-06-25T21:30:25Z.
PR: #8633.
Model family: grok

Verdict: PASS

No findings.

Review notes (non-blocking): Both deleted modules were shadowed by existing packages (aragora/receipts/__init__.py, aragora/types/__init__.py); Python resolves aragora.receipts and aragora.types to those packages, so the .py files were unreachable dead code. DecisionReceipt / LegacyDecisionReceipt re-exports remain intact via the receipts package; no in-repo imports of the removed types.py NewTypes (AgentName, DebateId, etc.); tests/export/test_receipt_contract.py and tests/types/test_protocols.py pass. No security surface change.

dogfood: yes

@scarmani scarmani merged commit e6ed35f into main Jun 25, 2026
125 of 128 checks passed
@scarmani scarmani deleted the structex/p4a-dead-files branch June 25, 2026 21:41
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