Skip to content

feat: workspace, command tree and shared types - #13

Closed
bobbyg603 wants to merge 3 commits into
mainfrom
feat/scaffold
Closed

bobbyg603 wants to merge 3 commits into
mainfrom
feat/scaffold

Conversation

@bobbyg603

Copy link
Copy Markdown
Member

The scaffold for #1 (closes #2): a Cargo workspace with one crate per work stream, the full bugsplat command tree with each command in its own file, and the shared types the streams code against (Config and Error with exit codes, access_token, the MCP client's interface, DebugInfo). Commands that aren't built yet exit with a link to their issue. Also adds bugsplat completions, a script that gets a LocalStack access token for testing, and CLAUDE.md. Build, clippy, fmt and the 14 tests pass locally; the other streams' pull requests are stacked on this branch.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 15:33

Copilot AI 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.

🟡 Changes recommended

Critical security issues expose client secrets through Debug output and allow passwords to be sent off-machine through unchecked discovered endpoints or redirects.

2 open issues
What changed in this PR

Establishes the Rust workspace and shared interfaces for BugSplat CLI, enabling the work streams in issues #1 and #2 to proceed independently. Most commands remain explicit stubs linked to their implementation issues.

Changes:

  • Adds seven crates with shared configuration, errors, authentication, MCP, and debug-info interfaces.
  • Wires the command tree, shell completions, output helpers, and scaffold tests.
  • Adds a LocalStack token helper and build/contributor documentation.
File Description
scripts/​localstack-token.py Adds the LocalStack OAuth token helper.
README.md Documents the CLI purpose and build steps.
crates/​bugsplat-upload/​src/​lib.rs Establishes the upload crate interface.
crates/​bugsplat-upload/​Cargo.toml Declares upload crate dependencies.
crates/​bugsplat-symbols/​src/​lib.rs Establishes the symbol-search crate interface.
crates/​bugsplat-symbols/​Cargo.toml Declares symbol-search dependencies.
crates/​bugsplat-mcp-client/​src/​lib.rs Defines MCP client and result interfaces.
crates/​bugsplat-mcp-client/​Cargo.toml Declares MCP client dependencies.
crates/​bugsplat-debugid/​src/​lib.rs Defines debug-info types and ID normalization.
crates/​bugsplat-debugid/​Cargo.toml Declares debug-ID crate dependencies.
crates/​bugsplat-core/​src/​lib.rs Exports shared core interfaces.
crates/​bugsplat-core/​src/​http.rs Adds shared HTTP client construction.
crates/​bugsplat-core/​src/​error.rs Defines errors and exit-code mappings.
crates/​bugsplat-core/​src/​config.rs Adds configuration and URL helpers.
crates/​bugsplat-core/​Cargo.toml Declares core dependencies.
crates/​bugsplat-cli/​tests/​cli.rs Tests help, completions, and error behavior.
crates/​bugsplat-cli/​src/​output.rs Adds JSON output and confirmation helpers.
crates/​bugsplat-cli/​src/​main.rs Adds startup and error reporting.
crates/​bugsplat-cli/​src/​context.rs Resolves flags and environment into configuration.
crates/​bugsplat-cli/​src/​commands/​versions.rs Scaffolds version listing.
crates/​bugsplat-cli/​src/​commands/​tool.rs Scaffolds generic MCP tool commands.
crates/​bugsplat-cli/​src/​commands/​symbols/​upload.rs Defines symbol-upload arguments and stub.
crates/​bugsplat-cli/​src/​commands/​symbols/​mod.rs Dispatches symbol subcommands.
crates/​bugsplat-cli/​src/​commands/​symbols/​list.rs Scaffolds uploaded-symbol listing.
crates/​bugsplat-cli/​src/​commands/​symbols/​info.rs Scaffolds local debug-info inspection.
crates/​bugsplat-cli/​src/​commands/​symbols/​find.rs Defines symbol-search arguments and stub.
crates/​bugsplat-cli/​src/​commands/​symbols/​delete.rs Defines symbol-deletion arguments and stub.
crates/​bugsplat-cli/​src/​commands/​reports.rs Scaffolds report listing and retrieval.
crates/​bugsplat-cli/​src/​commands/​mod.rs Dispatches top-level commands.
crates/​bugsplat-cli/​src/​commands/​mcp.rs Adds the future local MCP server stub.
crates/​bugsplat-cli/​src/​commands/​groups.rs Scaffolds crash-group commands.
crates/​bugsplat-cli/​src/​commands/​defects.rs Scaffolds defect creation and linking.
crates/​bugsplat-cli/​src/​commands/​databases.rs Scaffolds database listing.
crates/​bugsplat-cli/​src/​commands/​completions.rs Implements shell completion generation.
crates/​bugsplat-cli/​src/​commands/​auth.rs Connects authentication commands to auth interfaces.
crates/​bugsplat-cli/​src/​cli.rs Defines global options and command wiring.
crates/​bugsplat-cli/​Cargo.toml Declares the binary and CLI dependencies.
crates/​bugsplat-auth/​src/​lib.rs Adds environment-token access and auth stubs.
crates/​bugsplat-auth/​Cargo.toml Declares authentication dependencies.
CLAUDE.md Documents build, layout, and contributor rules.
Cargo.toml Defines workspace members and shared dependencies.
Cargo.lock Records resolved dependency versions.
.gitignore Excludes build output and macOS metadata.

Review effort: Balanced

pub command: Command,
}

#[derive(Debug, Args)]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 53d7f0b, which is in #21 (this PR was closed in its favour). GlobalArgs has a hand-written Debug that prints *** for the client secret, with a test (debug_hides_the_client_secret).

)

def request(url, data=None, as_json=False):
headers = {}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 53d7f0b, which is in #21 (this PR was closed in its favour). The helper checks that the host is this machine before every request, including discovered endpoints and redirect targets, and since 0dbee40 it also never uses a proxy from the environment.

bobbyg603 and others added 2 commits November 24, 2026 10:50
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@bobbyg603
bobbyg603 added this pull request to stack #20 November 24, 2026 16:03
@bobbyg603 bobbyg603 mentioned this pull request Nov 24, 2026
@bobbyg603

Copy link
Copy Markdown
Member Author

Closing in favor of #21, which contains this branch together with the other phase 1 streams and the fixes made when they were combined. This pull request's diff is still here for reviewing this stream on its own; the branch is not deleted.

@bobbyg603 bobbyg603 closed this Nov 24, 2026
@bobbyg603
bobbyg603 deleted the feat/scaffold branch November 25, 2026 22:19
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.

Scaffold: workspace, command tree and shared types

2 participants