refactor: purge dead code and duplication, enforce quality guardrails - #504
Conversation
Consolidate duplicate implementations, remove unused public bindings and dependencies, and simplify control flow. First-pass audit and targeted checks recorded; final validation follows main integration. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Preserve shared governed-read, BFF client, operation gateway, and generated boundary changes. Resolve cleanup overlaps and correct symlink-based lint harness expectations. Full repository check and unit/generation/analyzer controls pass. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Publish the second cleanup pass for incremental review. Dead-code and clone reductions, strict audit enforcement, and switching regression tests are checkpointed together. Cross-generator integration and aggregate validation remain in progress; this checkpoint is not merge-ready. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedToo many files! This PR contains 617 files, which is 517 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (617)
You can disable this status message by setting the 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 |
Preserve the nested fluent slot-call fix from main before continuing cleanup integration. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9b626eab6
ℹ️ 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".
Validate mounted gateway issuer bindings and exact quality command wiring. Expose the shared build identity helper through its supported package boundary, retain precise auth catalog types, and restore historical specification references.\n\nFocused boundary and helper tests: 54 passed; workspace contract and scoped typed lint passed. Full production release remains blocked by source-revision metadata; fixture cleanup and final audit integration remain pending. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Remove six unused type declarations and collapse schema-only forwarding bindings. Preserve live schemas, action behavior, and the shared payload type with real consumers. Focused matching/correction Node tests: 19 passed; scoped typed lint passed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Return typed sequential cleanup Effects; run them only at existing managed Node test boundaries. Preserve first-failure short circuit and child-before-parent order, with three independent regression controls. Replace six preexisting manual error-tag assertions with Effect predicates. Focused cleanup tests and scoped typed lint pass; implementation root typecheck passed before concurrent generated-contract changes. Live database integration remains pending and no shared databases were used for this checkpoint. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Share exact governed write registration across four distinct action entrypoints while preserving concrete schemas, permission targets, transaction services and archive state transitions. Add registration contract assertions alongside existing lifecycle and command regressions. Validation: 36 focused tests pass; scoped lint and format pass. Generated transport and strict CLI test integration continue separately; no full-tree completion claim. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replace evaluated child-source imports with a static-import fixture while retaining the foreign working directory and all three configuration-path assertions. Keep the authentication ROOT_ENV_PATH export: the actual test consumes it, so deletion would be incorrect. Validation: all four root environment tests, scoped lint and format pass. Fresh combined analyzer verification follows remaining in-flight integration. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ntracts Share problem mapping and Effect BFF transport across 36 generated adapters, keep authorization and schema provenance fail-closed, and recognize owner-local lifecycle registrations. Move private search normalization outside the generated provider surface.\n\nCo-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Remove unreachable additional-Shell validation, preserve nested fluent-slot semantics and starter parity, repair pinned i18n and declaration defects without version changes, and enforce full audit source coverage with regression controls. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Preserve exact clean-success and nonzero violation/crash checks across formatter environments; add positive and negative summary controls. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Keep concrete owner failures while centralizing optional-cause projection and synchronous failure normalization. Preserve identity and strict fallback behavior with regression controls. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Use concrete tagged errors under the one-class-per-file rule. Preserve public contracts and fix persistence error construction's missing local runtime binding. Cover serialization, cross-schema rejection, yieldability, private causes and sanitization. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Preserve authored API enforcement while matching the live checker's generated dist-cloudflare exclusion. Prove both behaviors across all three published scaffold formats after real production builds. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Status: ready for merge review
Separate cleanup PR, independent of #501. All work committed and pushed at
1bd5d89517878c7ec6b42a734053f00eae8df30c. All required CI checks pass; the PR is non-draft and conflict-free. No PR merge or remote deployment has been performed or authorized.Main is integrated through
f2756e91; the latest fetch found no newer landed commits. Diff versus main: 618 files, +34,183 / −40,625 lines; net −6,442 lines, including regression coverage and persistent dependency patches.Cleanup delivered
ReferenceErrorcaused by a missing local runtime binding.quality:checkin CI and the rootcheckchain. No raised thresholds, fake consumers, skipped tests, or authored-source debt suppressions.Final analyzer accounting
Fresh complete audit and enforcing gate passed on the final commit (
run-JwjnhB):Units overlap and are not summed. All 276 original semantic dispositions are preserved; every current group is reconciled through exact file/source-fragment hash lineage. Scanner fingerprint suffixes are not trusted as cross-run identity. No unresolved semantic follow-up remains.
The final shared scaffolding and outbox plumbing groups are removed. The remaining route-context group is explicitly distinct declarations around the already shared constructor: 17 unique routes/operation IDs, verified by runtime and structural mutation tests. The previously rejected local wrapper remains unsupported; this is not a claim that its validation failure was fixed or bypassed.
Verification on final commit
pnpm checkpassed as one end-to-end chain: format, Effect rule implementation/tests, lint, Action tests, workspace typecheck, skills, i18n/API/database/module boundaries, generation/contract validation, performance readiness, and fresh enforcing quality audit.pnpm buildandpnpm cloudflare:buildboth passed on exact HEAD1bd5d895, including both compilers, local packaging, MF/output checks and Workerd composition proof. Tree clean before, between, and after builds. Required production discovery used reserved build-only HTTPS origins; no provenance guard bypass or remote deployment.skipLibCheck: false.Authenticated browser verification
Independent Opus 5 High and Sonnet 5 Medium reviewers used separate real
agent-browsersessions against owned isolated services. Both verified UI login, authenticated Shell, tenant switching in both directions, full-document reload/context changes, and signout/session termination. Opus additionally verified Party-module navigation, live pending → recovered state and no horizontal overflow at 375px. The earlier authenticated-session 503 did not recur.Evidence limits and nonblocking observations are retained rather than overstated:
Boundaries and cleanup
node:path.matchesGlobimport because Effect Path has no equivalent. The checked-in workspace typecheck and full required validation pass; no suppression or homemade glob replacement was added.🤖 Generated with Claude Code