Remove unreachable helpers and keep tests on live contracts - #481
Merged
Merged
Conversation
Remove unused API and Route Ops helpers, dependent types, and their dedicated checks. Exercise active runtime factories, diagnostic parsers, token guards, and dispatch ownership instead; keep the shared push fake in test support. Constraint: Preserve exposed routes, tenant boundaries, and driver compatibility. Rejected: Delete every static candidate automatically | shorthand injection and disconnected UI intent require caller review. Confidence: high Scope-risk: moderate Tested: API lint/typecheck/build and 3020 tests; web lint/typecheck/build and 185 tests; 341 route registrations and 10 web asset hashes unchanged. Not-tested: Local disposable DB unavailable; PR CI must run the PostgreSQL profile. No production or authenticated device/browser smoke.
OziinG
marked this pull request as ready for review
October 6, 2026 04:49
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.
Private API and Route Ops modules kept unused wrappers and policies alive solely through tests. This removes those unreachable paths and their dependent types/tests, moves the shared push fake into test support, and makes the retained tests exercise the actual runtime factories, diagnostic parser, token verifier, and dispatch ownership guard.
Validation: Prisma generation; API lint/typecheck/build and 3,020 passing tests; web lint/typecheck/build and 185 passing tests; 9 workflow/structure contracts; secret/ignore/diff checks. API tests have 240 existing environment-dependent skips locally. The exact commit passed CI, including 236 disposable-PostgreSQL tests and Compose validation, plus GitGuardian. Two pre-existing DB suites (
operational-alert.repository.integration.test.tsandorder-filters-v2.integration.test.ts, 8 tests total) are outside that CI profile and remain unexecuted; their implementation is unchanged. Independent backend safety and frontend/residual reviews approved the cleanup.Remaining audit findings: keep
buildDispatchImportPreviewwhile its path overlaps #427. KeepisRouteVisibleToLinkedDriver: the existing Route Builder displays “Visible to driver” for anINVITE_PENDINGdriver assigned a published route, despite the helper returning false (SSR reproduced). That UI mismatch predates this PR and is separate from server authorization. Unused properties inside live locale objects and some source-string structural tests remain for a separate property/contract review. The two remaining static export candidates do not imply a complete semantic audit of all source files.No deployment or merge is included.