Repository navigation
chore: delete audit-confirmed bureaucracy and dead code, rename provider usage report - #3653
Conversation
Both were fossilized-diff checks: topology-target.yaml's loc field is written but read by no consumer, making it churn on any line-count change anywhere in polylogue/ (46-70 commits/week); the hash-boundary registry's classification field is validated on write but consumed nowhere else, and 10 of its 11 historical commits were unrelated feature PRs appending a row. Neither has evidence of ever catching genuine drift since introduction. Deletes devtools/verify_topology.py, devtools/build_topology_projection.py, docs/plans/topology-target.yaml, devtools/verify_hash_boundary_census.py, docs/plans/hash-boundary-registry.yaml, their CommandSpec/generated-surface/ manifest-model wiring, and their dedicated test files. Splits test_topology_gates.py into test_layering_gates.py (verify_layering tests, kept) with the topology-only tests and helpers removed. Co-Authored-By: Claude <[email protected]>
The topology-only test functions/helpers in test_layering_gates.py were edited but not staged in the prior commit, leaving a reference to the deleted devtools.verify_topology module. Also regenerates docs/devtools.md (devtools render devtools-reference) now that the topology-projection and hash-boundary-census CommandSpecs are gone. Co-Authored-By: Claude <[email protected]>
polylogue/declarations/derive.py (Deriver Protocol stubs, *_inputs builders, normalized_*_bytes hashers) has zero production callers: core/evidence_value.py and mcp/declarations/registry.py both use DeclarationRegistry/DeclarationSpec (registry.py/models.py) but never call into derive.py. Its only callers were three test files exercising the module's own ordering/determinism invariants directly, not any real consumer's behavior. Trims the now-dead imports/assertions from test_synthetic_domain.py, test_registry.py, and test_evidence_value.py while keeping the real DeclarationRegistry/family/compatibility coverage those files also carry. Co-Authored-By: Claude <[email protected]>
The __init__.py re-export trim and the three test-file updates for the previous commit (deleting polylogue/declarations/derive.py) were not staged in that commit due to a failed combined git-add pathspec. This lands them. Co-Authored-By: Claude <[email protected]>
A rebase artifact (commit e71ec68, 2026-08-02) left a stale INDEX_SCHEMA_VERSION = 55 module-level assignment alongside the real INDEX_SCHEMA_VERSION = 57 further down the file. Python takes the last assignment so runtime behavior was already correct, but the dead first assignment is a merge-conflict magnet and misleads readers into thinking the schema version is ambiguous. Verified via ast.parse that exactly one INDEX_SCHEMA_VERSION assignment remains after the fix. Co-Authored-By: Claude <[email protected]>
Follow-up to the resolve_blocker deletion in the previous commit -- ruff's F822 caught the dangling __all__ entry for the now-deleted symbol. Co-Authored-By: Claude <[email protected]>
…oval Co-Authored-By: Claude <[email protected]>
The report is already origin-scoped internally (origin=origin param, report.origins) but was named with Provider vocabulary on public surfaces (API method, CLI, MCP tool, daemon HTTP handler), violating this repo's documented anti-goal (docs/provider-origin-identity.md: Provider is legitimate only at raw acquisition/parser/schema/pricing boundaries, not on public source-origin filters/payloads). Hard rename, no compat alias, per this repo's no-compat-pre-adoption policy. Renames provider_usage_report(_for_archive_root|_from_connection) to origin_usage_report(...) across api/archive.py, storage/usage.py, cli/commands/diagnostics.py (incl. the printed "Provider usage accounting" CLI header -> "Origin usage accounting"), cli/commands/status.py, daemon/http.py, mcp/server_cutover.py, and their tests (test_provider_usage_report.py -> test_origin_usage_report.py). Out of scope: the broader bare `provider_usage`/`provider-usage` vocabulary used elsewhere as a materialized insight_type value, HTTP route path (/api/provider-usage), MCP `include` filter kind, and archive-debt kind -- those are a distinct, much larger surface (including a stored DB value) that this cruft-pruning pass does not touch. Co-Authored-By: Claude <[email protected]>
The remaining call sites for the previous commit's rename (api/archive.py, storage/usage.py, cli diagnostics/status, daemon/http.py, mcp/server_cutover.py, and their tests) did not make it into that commit -- the pre-commit hook's lint failure on the test file left them staged but uncommitted. This lands them. Co-Authored-By: Claude <[email protected]>
This reverts commit e87d9c2e046935cb7c915b1e4ad17bfc4f1b2980.
This reverts commit abee4fa5b1a66cd227fa5ef3a0d7cc35295d3975.
verify doc-commands caught this one -- docs/architecture-hotspots.md's decomposition verification record still cited the now-deleted `devtools render topology-projection` command. Co-Authored-By: Claude <[email protected]>
|
Warning Review limit reached
Next review available in: 12 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (38)
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. Comment |
…gue-8a060) `devtools/verify_topology.py` enforced four topology invariants until it was deleted with the per-file placement-judgment machinery it was entangled with (3d65277, #3653). Two of the four depended on `topology-target.yaml`, which is also gone, so "declared but missing" and "declared twice" have nothing to check and are not restored. The orphan class is already covered: the fail-closed per-diff `consumer-reachability` gate refuses a newly added module with no production consumer, which is the only way an orphan enters the tree. That leaves the root-stray class with no checker. `gate root-topology` compares a flat sorted inventory of `polylogue/*.py` against an owner-tagged allowlist of the eleven kernel modules and refuses anything else, plus an allowlist entry whose module has moved away. It carries no per-file target, reason, or placement projection. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015WCh9YW3cRfsg3CZBKU7Fq
…gue-8a060) `devtools/verify_topology.py` enforced four topology invariants until it was deleted with the per-file placement-judgment machinery it was entangled with (3d65277, #3653). Two of the four depended on `topology-target.yaml`, which is also gone, so "declared but missing" and "declared twice" have nothing to check and are not restored. The orphan class is already covered: the fail-closed per-diff `consumer-reachability` gate refuses a newly added module with no production consumer, which is the only way an orphan enters the tree. That leaves the root-stray class with no checker. `gate root-topology` compares a flat sorted inventory of `polylogue/*.py` against an owner-tagged allowlist of the eleven kernel modules and refuses anything else, plus an allowlist entry whose module has moved away. It carries no per-file target, reason, or placement projection. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015WCh9YW3cRfsg3CZBKU7Fq
Summary
Executes the operator-ratified punch list from the 2026-08-03 cruft audit (8-way triage fanout + adjudication): deletes the topology-projection and hash-boundary-census verification systems wholesale, removes confirmed dead code, renames the
provider_usage_reportvocabulary leak toorigin_usage_report, and fixes a stale duplicateINDEX_SCHEMA_VERSIONassignment. One investigated deletion was reverted mid-branch under the new complete-over-delete rule (see below) — the revert pair is retained in branch history and nets to zero in this diff.Problem
The audit found verification machinery whose premise had expired and code with no production reachability:
docs/plans/topology-target.yamlwas the single largest churn outlier in the repo (~450 commits, ~70 in 14 days, merge-conflict hotspot across concurrent lanes) guarding a file-placement migration that is 98.4% settled, with the one component that ever caught real bugs (verify-cluster-cohesion) deleted long ago.hash-boundary-registry.yaml(1,258 lines) +verify_hash_boundary_census.py: a census nobody read, memorializing current shape.raw_authority.resolve_blocker(real path usesBlockerResolveActuator),get_session_commits_batch/sync_get_session_commits,benchmark_regression_detect.py(181 lines, self-referencing only),demo_shelf.py --bundle(self-labeled deprecated),evidence_dashboard.py trace(permanently-dead stub since refactor(verifiability): delete ceremonial verification infrastructure #1737).provider_usage_reportleaked the Provider wire vocabulary onto public surfaces (CLI/daemon/MCP) where Origin is the contract.archive_tiers/index.pycarried two liveINDEX_SCHEMA_VERSIONassignments (= 55stale rebase artifact at :226, real= 57at :311).Solution
verify_topology.py+build_topology_projection.py+ wiring incommand_catalog.py,generated_surfaces.py,bead_cluster.py,manifest_models.py,merge_conductor.py,lane_brief.py, CLAUDE.md, and four docs. Same for hash-boundary-census.test_topology_gates.pytrimmed totest_layering_gates.py(layering ratchet remains, untouched).origin_usage_reportrename acrossapi/archive.py,storage/usage.py,cli/commands/{diagnostics,status}.py,daemon/http.py,mcp/server_cutover.py+ tests. Broaderprovider_usagevocabulary (HTTP route, insight_type DB value, archive-debt kind) deliberately out of scope.declarations/derive.py(deleted then REVERTED — closed bead o21.1 delivered it as a kernel; open beads o21/o21.3 plan adoption),queries/session_links.pycycle functions (enium: production write path lacks the property they verify; folded into 4ts.10 scope),security/lifecycle.pyunwired half (303r.6 names it), capture-mode pair (now tracked by polylogue-y526x).Verification
devtools verify --quick— exit 0 post-rebase (21 steps, 96.6s, run20260803T125206Z-quick-2924366-1adc18c0).origin/master(30 commits); single conflict wastopology-target.yamlregenerated-on-master vs deleted-here — deletion kept by design.devtools verify --allin flight at PR time; master carries 27 known failures owned by a concurrent fix effort (operator-acknowledged) — inherited failures are not gated on here.Ref polylogue-e2uns (devtools-sprawl follow-up filed separately).
🤖 Generated with Claude Code
https://claude.ai/code/session_01X1x3Nwdn6k8UbaJZwcK4rt