Skip to content

docs(api): define error/panic behavior#25

Merged
siphonite merged 1 commit intomainfrom
issue-17-error-behavior-docs
Feb 6, 2026
Merged

docs(api): define error/panic behavior#25
siphonite merged 1 commit intomainfrom
issue-17-error-behavior-docs

Conversation

@siphonite
Copy link
Owner

Summary

Explicitly documents error/panic behavior for the FIRST API.

Changes

Add explicit documentation to test.rs for:

  • .run(): Panics fail the test, normal completion = schedule exhausted
  • .verify(): Panics indicate invariant violation
  • .execute(): Error behavior table for all phases/outcomes

Verification

  • cargo fmt -- --check
  • cargo clippy -- -D warnings
  • cargo test --doc

Closes #17

Add explicit documentation for run(), verify(), and execute():
- run(): panics fail test, normal exit = schedule exhausted
- verify(): panics indicate invariant violation
- execute(): error behavior table for all phases

Closes #17
@gemini-code-assist
Copy link

Summary of Changes

Hello @siphonite, 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 enhances the documentation for the FIRST API by explicitly defining the error and panic handling semantics within its testing framework. It provides clear guidelines on how the orchestrator interprets various outcomes during the run, verify, and execute phases, ensuring developers have a precise understanding of test failures, invariant violations, and successful completions.

Highlights

  • .run() method behavior: Clarified panic behavior for the .run() method, stating that panics lead to test failure and normal completion signifies schedule exhaustion.
  • .verify() method behavior: Documented that panics within the .verify() method indicate an invariant violation, serving as the intended mechanism for signaling failed crash recovery.
  • .execute() error table: Introduced a comprehensive error behavior table for the .execute() method, detailing outcomes across different phases (Execution, Verify) and scenarios (Panic, Normal Exit, SIGKILL).
Changelog
  • src/test.rs
    • Added documentation to the run method explaining that panics cause the EXECUTION phase to fail and are reported as errors, while normal completion means the schedule is exhausted.
    • Updated the verify method's documentation to clarify that panics within this closure indicate an invariant violation and are the expected way to signal failed crash recovery.
    • Included a new "Error Behavior" table in the execute method's documentation, detailing how different phases (Execution, Verify) react to panics, normal exits, and SIGKILL events.
Activity
  • No human activity (comments, reviews, etc.) has been provided for this pull request.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@siphonite siphonite merged commit 2cc2a46 into main Feb 6, 2026
1 check passed
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds valuable documentation explaining the error and panic behavior of the run, verify, and execute functions. The explanations are clear and will be very helpful for users of the API. I have one minor suggestion to improve the formatting of the markdown table for better readability.

Comment on lines +102 to +105
/// | Phase | Panic | Normal Exit | SIGKILL |
/// |-------------|---------------|--------------------|----------------- |
/// | Execution | Test fails | Schedule exhausted | Crash (expected) |
/// | Verify | Test fails | Verification OK | Test fails |

Choose a reason for hiding this comment

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

medium

The markdown table has some formatting inconsistencies, particularly in the separator line and column alignment. Reformatting it would improve readability in the source code.

Suggested change
/// | Phase | Panic | Normal Exit | SIGKILL |
/// |-------------|---------------|--------------------|----------------- |
/// | Execution | Test fails | Schedule exhausted | Crash (expected) |
/// | Verify | Test fails | Verification OK | Test fails |
/// | Phase | Panic | Normal Exit | SIGKILL |
/// |-------------|---------------|--------------------|--------------------|
/// | Execution | Test fails | Schedule exhausted | Crash (expected) |
/// | Verify | Test fails | Verification OK | Test fails |

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.

Define Error/Panic Behavior

1 participant