chore(cli): delete dead shared/auth layer and inline single-caller pass-throughs - #6953
Open
kanadgupta wants to merge 5 commits into
Open
kanadgupta wants to merge 5 commits into
kanadgupta wants to merge 5 commits into
Conversation
…ss-throughs Remove the superseded auth service/layer pairs under shared/auth, the unused local-service-versions service, and the unused table/time output helpers, all of which were kept alive only by their own unit tests. Inline the single-caller wrappers found in the same audit: the db-connection alias, the tracing tag alias, the split output-format global flag, the db-bootstrap message constants, the completion analytics config layer, supabaseHome(), bold(), trimGoSpace, the inspect report runtime layer, the prepare capability list, the seed/storage flag-scanner aliases, and the duplicated region table. Refs CLI-2606 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ApiError, InvalidLocalServiceVersionsStateError, InvalidTokenError, and PlatformAuthRequiredError belonged to the dead shared/auth and local-service-versions modules removed in the previous commit and never reached production telemetry. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
kanadgupta
marked this pull request as ready for review
October 1, 2026 22:41
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ntials, and messages.ts Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…-cli.md The --usage and --skill flags, guide templates, and agent skill writer were removed with the CLI's early agents module, but this root copy of the page kept describing them. Keep the parts that still exist: the generate-docs script, the Fumadocs site layout, and how to run it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
A shallow-module audit of
apps/clifound two kinds of cleanup. Each candidate was checked with the deletion test: remove the module and paste its body into every caller. If the callers end up no longer, the module was only passing work through.Dead code. Knip did not flag these because each file's only importer was its own colocated unit test.
apps/cli/src/shared/auth/(api, crypto, credentials, platform-api, token, errors). Live replacements aresrc/auth/command-*.tsandsrc/command-internal/login-*.layer.ts.shared/config/cli-project-local-service-versions.{service,layer}.ts, plus the two matching die-placeholders inrun.tsand the mock intests/helpers/mocks.ts.shared/output/table.tsandshared/output/time.ts.Pass-throughs inlined or merged.
db-connection.layer.tswas a two-line alias; the sql-pg layer now exportsdbConnectionLayerdirectly.OutputFormatFlagmoves intocommand-internal/global-flags.tswith the other globals.command-internal/region.format.tsand shared by backups and projects.changedLinkedLocalFlagsis called directly by seed and storage instead of through per-command aliases; its coverage moves to the db-target-flags unit test.tracing.service.ts,db-bootstrap/messages.ts,standalone-analytics-config.layer.ts,supabaseHome(),output/bold.ts,go-string.ts,report.layers.ts, andprepare.options.tsare inlined at their single caller.packages/cli-test-helpersexportsharness.tsdirectly instead of through a barrel.Follow-up cleanups in later commits.
src/shared/telemetry/__fixtures__/error-tags.txt) drops the four tags that belonged to the deleted modules:ApiError,InvalidLocalServiceVersionsStateError,InvalidTokenError, andPlatformAuthRequiredError. None of them reached production telemetry.apps/cli/README.mdarchitecture list now points atsrc/auth/and describes what remains insrc/shared/auth/;apps/cli/docs/tracing-monitoring.mdno longer names aTracingservice;apps/cli/docs/code-structure.mduses live symbols in its naming examples; and thedb startside-effects note points atstart-database.tsfor the startup messages.docs/self-documenting-cli.mdwas an orphaned copy still describing the long-removed--usageand--skillflags and guide templates. It now covers only thegenerate-docs.tsscript and the Fumadocs site that exist today.No behaviour change. Span names and telemetry command paths are unchanged.
Linear: CLI-2606
🤖 Generated with Claude Code