Conversation
Add runbook.schema.json (Draft 2020-12) covering all top-level properties, runner configs, step definitions, and polymorphic types. Boolean/integer fields accept strings to support env var expansion. Add schema_test.go with four validation tests: - fixture validation against all testdata/book/*.yml - reserved key coverage check against code constants - runner config field coverage via reflect - invalid runbook rejection Remove unused useAgent field from sshd_local_forward_with_openapi3.yml as it has no corresponding implementation in sshRunnerConfig.
Summary of ChangesHello @k1LoW, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive JSON Schema for the runbook YAML format, significantly improving validation and maintainability. The accompanying Go tests (schema_test.go) provide good coverage for the schema's correctness, including fixture validation, reserved key checks, and runner configuration field coverage. The removal of the unused useAgent field in sshd_local_forward_with_openapi3.yml is a positive cleanup. Overall, this is a valuable addition that enhances the robustness and clarity of runbook definitions.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive JSON Schema support for the runn runbook YAML format to enable editor validation and autocompletion. The schema covers all top-level properties, runner configurations, step definitions, and polymorphic types. Boolean and integer fields accept strings to support environment variable expansion.
Changes:
- Added
runbook.schema.yamlwith complete JSON Schema (Draft 2020-12) covering all runbook properties and runner configurations - Added comprehensive schema validation tests in
schema_test.goincluding fixture validation, reserved key coverage, runner config field coverage, and invalid runbook rejection - Removed unused
useAgentfield fromsshd_local_forward_with_openapi3.ymlas it has no implementation - Updated README.md with JSON Schema documentation and usage instructions for YAML Language Server integration
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| runbook.schema.yaml | Comprehensive JSON Schema definition for runbook YAML format with all properties, runner configs, and validation rules |
| schema_test.go | Four validation tests ensuring schema accuracy and completeness against code and fixtures |
| testdata/book/sshd_local_forward_with_openapi3.yml | Removed unused useAgent field that has no corresponding implementation |
| README.md | Added JSON Schema section with usage instructions for editor integration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment has been minimized.
This comment has been minimized.
BenchmarkManyRunbooks-4
Metadata
BenchmarkOpenAPI3-4
Metadata
BenchmarkSingleRunbook-4
Metadata
Reported by octocov |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Metrics Report
Details | | main (9a8a8e6) | #1398 (883028b) | +/- |
|---------------------|----------------|-----------------|-------|
+ | Coverage | 60.3% | 60.3% | +0.0% |
| Files | 81 | 81 | 0 |
| Lines | 9246 | 9246 | 0 |
+ | Covered | 5578 | 5579 | +1 |
+ | Code to Test Ratio | 1:0.8 | 1:0.8 | +0.0 |
| Code | 17298 | 17298 | 0 |
+ | Test | 14395 | 14453 | +58 |
- | Test Execution Time | 7m19s | 7m58s | +39s |Code coverage of files in pull request scope (65.2% → 65.9%)
Reported by octocov |
Add runbook.schema.json (Draft 2020-12) covering all top-level properties, runner configs, step definitions, and polymorphic types. Boolean/integer fields accept strings to support env var expansion.
Add schema_test.go with four validation tests:
Remove unused useAgent field from sshd_local_forward_with_openapi3.yml as it has no corresponding implementation in sshRunnerConfig.