-
Notifications
You must be signed in to change notification settings - Fork 0
Standardize error structures across presentation commands #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
- Add error structure template to error handling guide - Standardize Create command errors (add tips, convert to struct-style) - Add error grouping comments to both Create and Destroy commands - Update all error construction sites and test patterns - All tests pass and linter checks succeed Co-authored-by: josecelano <[email protected]>
Co-authored-by: josecelano <[email protected]>
Copilot
AI
changed the title
[WIP] Improve error consistency between commands
Standardize error structures across presentation commands
Oct 29, 2025
josecelano
approved these changes
Oct 29, 2025
Member
josecelano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 25826e6
Copilot AI
added a commit
that referenced
this pull request
Oct 29, 2025
Co-authored-by: josecelano <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Oct 29, 2025
Co-authored-by: josecelano <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Oct 29, 2025
Co-authored-by: josecelano <[email protected]>
josecelano
added a commit
that referenced
this pull request
Oct 29, 2025
b4092b6 fix: [#90] add SKIP_AI_ENFORCEMENT to coverage steps (copilot-swe-agent[bot]) 7653193 fix: [#90] add explicit permissions to coverage workflow (copilot-swe-agent[bot]) 5afe9f8 feat: [#90] add coverage CI workflow (copilot-swe-agent[bot]) 213b269 Initial plan (copilot-swe-agent[bot]) Pull request description: - [x] Add `SKIP_AI_ENFORCEMENT: 1` environment variable to coverage steps - [x] Applied to both `coverage-text` and `coverage-html` steps - [x] Matches pattern from `testing.yml` workflow - [x] Skips AI enforcement tests that require third-party tools (cargo machete, Ansible, OpenTofu) - [x] YAML linting passes <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Create coverage CI workflow</issue_title> > <issue_description>**Parent Epic**: #85 > > ## Overview > > Create a GitHub Actions workflow to generate code coverage reports on every push and pull request. The workflow generates coverage in two formats: a text summary for immediate viewing in the workflow output, and an HTML report uploaded as an artifact for detailed inspection. > > **Note**: This issue does NOT include Codecov or other external coverage service integration. > > ## Goals > > - [ ] Generate coverage reports automatically in CI/CD for all branches > - [ ] Display coverage summary in workflow output (text format) > - [ ] Make detailed HTML coverage reports available as artifacts > - [ ] Add `.coverage/` directory to `.gitignore` > > ## Specifications > > ### Workflow Structure > > **Trigger Events**: Push and pull_request (following `testing.yml` pattern) > > **Job**: Single `coverage` job with these steps: > > 1. Checkout code - `actions/checkout@v4` > 2. Setup Rust toolchain - `dtolnay/rust-toolchain@stable` > 3. Enable caching - `Swatinem/rust-cache@v2` > 4. Install cargo-llvm-cov - `taiki-e/install-action@v2` > 5. Generate text coverage - `cargo cov` > 6. Generate HTML report - `cargo cov-html` > 7. Upload HTML artifact - `actions/upload-artifact@v4` > > ### Example Workflow > > ```yaml > name: Coverage > > on: > push: > pull_request: > > env: > CARGO_TERM_COLOR: always > > jobs: > coverage: > name: Coverage Report > runs-on: ubuntu-latest > > steps: > - id: checkout > name: Checkout Repository > uses: actions/checkout@v4 > > - id: setup > name: Setup Toolchain > uses: dtolnay/rust-toolchain@stable > > - id: cache > name: Enable Workflow Cache > uses: Swatinem/rust-cache@v2 > > - id: install-llvm-cov > name: Install cargo-llvm-cov > uses: taiki-e/install-action@v2 > with: > tool: cargo-llvm-cov > > - id: coverage-text > name: Generate Text Coverage Summary > run: cargo cov > > - id: coverage-html > name: Generate HTML Coverage Report > run: cargo cov-html > > - id: upload-coverage > name: Upload HTML Coverage Report > uses: actions/upload-artifact@v4 > with: > name: coverage-html-report > path: target/llvm-cov/html/ > retention-days: 30 > ``` > > ## Implementation Plan > > ### Phase 1: Update .gitignore (5 minutes) > > - [ ] Add `.coverage/` directory to `.gitignore` with comment > > ### Phase 2: Create Workflow (15 minutes) > > - [ ] Create `.github/workflows/coverage.yml` > - [ ] Add trigger events and environment variables > - [ ] Set up job structure > > ### Phase 3: Configure Toolchain (10 minutes) > > - [ ] Add Rust toolchain setup, caching, and cargo-llvm-cov installation > > ### Phase 4: Generate Reports (15 minutes) > > - [ ] Add text and HTML coverage generation steps > > ### Phase 5: Upload Artifact (10 minutes) > > - [ ] Add artifact upload step with 30-day retention > > ### Phase 6: Testing (15 minutes) > > - [ ] Test workflow on a feature branch > - [ ] Verify text output and HTML artifact availability > > ## Acceptance Criteria > > - [ ] `.coverage/` directory added to `.gitignore` > - [ ] Workflow file exists at `.github/workflows/coverage.yml` > - [ ] Workflow triggers on push and pull_request > - [ ] Text coverage summary visible in workflow output > - [ ] HTML coverage artifact uploaded with 30-day retention > - [ ] Workflow does NOT block CI/CD on coverage failures > > ## Notes > > - Uses `cov` and `cov-html` aliases from `.cargo/config.toml` > - Follows patterns from existing `testing.yml` workflow > - Non-blocking by design - coverage is informational only > - Future enhancement: External coverage service integration can be added later</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> - Fixes #87 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). ACKs for top commit: josecelano: ACK b4092b6 Tree-SHA512: f5ee09387a3b4de3183ec90dcccebe771b8925722be123dd1715bfdb6fa3058fa5958548a2893ead822256cd33879e69438e59165866a50736a18123569c44d4
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.
Error types between Create and Destroy commands used inconsistent patterns: tuple vs struct wrapping, missing actionable tips, and no logical grouping.
Changes
Error Structure Template (
docs/contributing/error-handling.md).help()method implementation patternsCreate Command Errors
ConfigParsingFailed: "Validate JSON syntax with: jq . < {path}"CommandFailed: "Check logs with --log-output file-and-stderr"Destroy Command Errors
Updated Call Sites
Error(source)→Error { source }Error(_)→Error { .. }template.rs,environment.rs,config_loader.rs,tests/integration.rsResult
All errors now follow uniform patterns:
#[source]usage for error chainsOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.