Repository navigation
fix: attach consistent approval error reasons #285
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -338,15 +338,19 @@ message Delta { | |
| bool done = 4; // last delta for this part | ||
| } | ||
|
|
||
| // Exec, Resume, Suspend and Fork attach google.rpc.ErrorInfo for recognized lifecycle and | ||
| // compute-start failures. The domain is "agentsessions", with no metadata: | ||
| // Recognized lifecycle and compute-start failures attach google.rpc.ErrorInfo with domain | ||
| // "agentsessions" and no metadata. Reasons follow the classified condition, not the method: | ||
| // they apply to Exec, Resume, Suspend, Fork, Approve and CloseApproval wherever that condition | ||
| // is classified. | ||
| // ABORTED: STALE_CURSOR, SESSION_BUSY, COMPUTE_BUSY, CHECKPOINT_IN_PROGRESS, FENCED, | ||
| // SNAPSHOT_SUPERSEDED (Fork only). | ||
| // FAILED_PRECONDITION: SESSION_DELETED, MEMORY_STATE_LOST, CHECKPOINT_INVALID, | ||
| // COMPUTE_CONFIG_INVALID. | ||
| // UNAVAILABLE: CHECKPOINT_PENDING, HARNESS_UNAVAILABLE (Exec/Resume/Fork), COMPUTE_UNAVAILABLE. | ||
| // UNAVAILABLE: CHECKPOINT_PENDING, HARNESS_UNAVAILABLE, COMPUTE_UNAVAILABLE. | ||
| // RESOURCE_EXHAUSTED: COMPUTE_RESOURCE_EXHAUSTED. | ||
| // DeleteSession also reports SESSION_BUSY and SESSION_DELETED for the matching conditions. | ||
| // DeleteSession reports SESSION_BUSY and SESSION_DELETED; mutation deletion-admission probes | ||
| // also report SESSION_BUSY. HarnessRegistry.RegisterHarness and HarnessRegistry.CreateHarness | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: This is the only place that documents HARNESS_UNAVAILABLE for RegisterHarness/CreateHarness. The HarnessRegistry comments in harness_registry.proto still list only ALREADY_EXISTS and FAILED_PRECONDITION. Could UNAVAILABLE (HARNESS_UNAVAILABLE) go on those RPC comments too, since registry clients will look there? |
||
| // report HARNESS_UNAVAILABLE when placement admission cannot reach the harness. | ||
| // Unknown failures and caller CANCELED/DEADLINE_EXCEEDED have no reason. Other preconditions | ||
| // retain their codes without a reason; this is not an exhaustive taxonomy of failures. | ||
| // Clients must match both domain and reason; see spec.md section 11.9 for precedence and recovery. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| category: Fixed | ||
| --- | ||
|
|
||
| - `Approve` and `CloseApproval` attach the existing `SESSION_BUSY`, `CHECKPOINT_IN_PROGRESS`, | ||
| `STALE_CURSOR` and `FENCED` error reasons for matching classified conditions. Status codes and | ||
| messages are unchanged; error details remain additive. The API reference also documents reasons | ||
| on approval methods, mutation deletion admission and harness registration. |
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.
nit: "mutation deletion-admission probes" is internal vocabulary, and every RPC that runs the probe is already named in this paragraph. Could this clause be dropped, or say "with authorization enabled, Exec, Resume, Suspend, Fork, Approve, CloseApproval and DeleteSession also report SESSION_BUSY while the session is being deleted"? The same sentence is in spec.md.