Skip to content

chore: delete one orphan re-export shim - #452

Merged
Sinity merged 1 commit into
masterfrom
feature/chore/delete-orphan-modules
Apr 26, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/chore/delete-orphan-modules

Conversation

@Sinity

@Sinity Sinity commented Apr 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #449. Deletes one unused re-export shim. Audit reality-check found three of the four flagged modules don't survive verification.

Problem

The orphan-module audit (.agent/scratch/swarm-2026-04-26/orphan-module-audit.md) flagged 4 production modules as deletion candidates. On verification against master, only one is genuinely orphan and deletable:

Audit candidate Reality
polylogue/cli/embed.py already absent from tree
polylogue/lib/markdown.py already absent from tree
polylogue/schemas/semantic_inference_scoring.py truly orphan — to delete
polylogue/cli/products_workflow.py NOT orphan — imported by tests/unit/cli/test_products_helper_runtime.py. The audit grep excluded tests/.

Solution

Delete polylogue/schemas/semantic_inference_scoring.py (13 LOC) — re-export shim split out by #321 (closed) with zero importers in production or tests.

Regenerate docs/plans/topology-target.yaml to drop the deleted row.

Net deletion: one file. The audit's hit rate was 1/4 once tested against the realized tree.

Verification

$ devtools verify --quick
verify: all checks passed (incl. all 8 lints)

$ pytest tests/unit/cli/test_products_helper_runtime.py
3 passed  # confirms products_workflow.py is required by tests

Pattern observation

The structural-cohesion lints (#429/#435/#437) catch what manual audits miss: test importers, namespace packages, factory-loaded modules. Future orphan-deletion sweeps should run verify-test-ownership first to cross-check.

Related

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Apr 26, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This pull request removes an unused module, polylogue/schemas/semantic_inference_scoring.py, which acted as a re-export aggregator for semantic scoring functions. The topology projection definition is updated to reflect this deletion.

Changes

Cohort / File(s) Summary
Configuration & Documentation
docs/plans/topology-target.yaml
Removed the topology target entry for the deleted semantic_inference_scoring module.
Module Deletion
polylogue/schemas/semantic_inference_scoring.py
Deleted unused re-export aggregator module. Previously exported score_body, score_container, score_role, score_timestamp, and score_title by importing and re-exporting from sibling modules.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Out goes the orphan, no more in the way,
Re-exports and shims? They had their day!
The topology breathes, the codebase runs clean—
One less unused module in the schema machine! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR partially addresses #449's objectives by deleting one of four flagged modules (#449), with proper verification that the deleted file had zero importers. The PR deletes only 1 of 4 targeted modules from #449. Clarify whether this partial completion is intentional or if the other deletions will follow in a separate commit.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: deletion of a single orphan re-export shim module.
Out of Scope Changes check ✅ Passed All changes align with the stated objectives: one module deleted, topology projection updated to reflect that deletion, and verification commands executed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description comprehensively covers the template structure with clear Summary, Problem, Solution, and Verification sections. It exceeds the template by including Pattern observation and Related references.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/chore/delete-orphan-modules

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5fcee109cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread polylogue/cli/products_workflow.py Resolved
Closes #449.

Per the orphan-module audit (.agent/scratch/swarm-2026-04-26/orphan-module-audit.md),
`polylogue/schemas/semantic_inference_scoring.py` (13 LOC) is a re-export
shim split out by #321 (closed) with zero importers in production or tests.
Deleting it.

The audit also flagged three other modules that did not survive verification:

- `polylogue/cli/embed.py` (audit claimed 12 LOC) — already absent from
  the tree at master.
- `polylogue/lib/markdown.py` (audit claimed 56 LOC) — already absent.
- `polylogue/cli/products_workflow.py` (audit claimed orphan) — actually
  imported by `tests/unit/cli/test_products_helper_runtime.py`. The
  audit excluded tests/ from its grep; the module is a real test
  importer. Restored.

The audit reality-check pattern: structural-cohesion lints catch what
manual audits miss (test imports, namespace packages, factory loaders).

Topology projection regenerated to drop the deleted row. devtools
verify --quick passes; tests/unit/cli/test_products_helper_runtime.py
passes (was failing before products_workflow.py was restored).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@Sinity
Sinity force-pushed the feature/chore/delete-orphan-modules branch from 5fcee10 to 8b15249 Compare April 26, 2026 11:47
@Sinity Sinity changed the title chore: delete two orphan re-export shims chore: delete one orphan re-export shim Apr 26, 2026
@Sinity
Sinity merged commit 4aaa5ce into master Apr 26, 2026
14 of 16 checks passed
@Sinity
Sinity deleted the feature/chore/delete-orphan-modules branch April 26, 2026 12:08
@Sinity
Sinity requested review from Copilot and removed request for Copilot May 1, 2026 00:44
Sinity added a commit that referenced this pull request May 7, 2026
## Summary

Closes #449. Deletes one unused re-export shim. Audit reality-check
found three of the four flagged modules don't survive verification.

## Problem

The orphan-module audit
(`.agent/scratch/swarm-2026-04-26/orphan-module-audit.md`) flagged 4
production modules as deletion candidates. On verification against
master, only one is genuinely orphan and deletable:

| Audit candidate | Reality |
|---|---|
| `polylogue/cli/embed.py` | already absent from tree |
| `polylogue/lib/markdown.py` | already absent from tree |
| `polylogue/schemas/semantic_inference_scoring.py` | truly orphan — to
delete |
| `polylogue/cli/products_workflow.py` | NOT orphan — imported by
`tests/unit/cli/test_products_helper_runtime.py`. The audit grep
excluded `tests/`. |

## Solution

Delete `polylogue/schemas/semantic_inference_scoring.py` (13 LOC) —
re-export shim split out by #321 (closed) with zero importers in
production or tests.

Regenerate `docs/plans/topology-target.yaml` to drop the deleted row.

Net deletion: **one** file. The audit's hit rate was 1/4 once tested
against the realized tree.

## Verification

```
$ devtools verify --quick
verify: all checks passed (incl. all 8 lints)

$ pytest tests/unit/cli/test_products_helper_runtime.py
3 passed  # confirms products_workflow.py is required by tests
```

## Pattern observation

The structural-cohesion lints (#429/#435/#437) catch what manual audits
miss: test importers, namespace packages, factory-loaded modules. Future
orphan-deletion sweeps should run `verify-test-ownership` first to
cross-check.

## Related

- #321 — refactor that obsoleted `semantic_inference_scoring.py`.
- #437 — test-ownership manifest.
- #401 — post-renewal consolidation umbrella.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

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.

chore: delete four orphan modules

1 participant