Skip to content

OLS-3793 spec: remove verification retry mechanism, escalate on failure - #421

Merged
onmete merged 2 commits into
openshift:mainfrom
onmete:spec/OLS-3793-remove-verification-retries
Aug 12, 2026
Merged

OLS-3793 spec: remove verification retry mechanism, escalate on failure#421
onmete merged 2 commits into
openshift:mainfrom
onmete:spec/OLS-3793-remove-verification-retries

Conversation

@onmete

@onmete onmete commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Spec-only change, pre-push reviewed.

Verification failure now leads directly to escalation instead of re-executing remediation. Removes maxAttempts from ApprovalPolicy and AgenticRunApproval, removes retryIndex from result CRs, simplifies phase derivation logic. Convergence-dependent checks are handled within the verification agent prompt.

Changes:

  • run-lifecycle.md: Rewrite rules 7–8 (verification failure → escalation, no retries), simplify Verified=False derivation
  • approval.md: Remove rules 18–21 (maxAttempts), add single-execution-attempt rule, update CEL invariants and config surface
  • crd-api.md: Remove retryCount, retryIndex, maxAttempts from CRD field descriptions
  • audit-logging.md: Remove retry events section and retry_count attribute
  • sandbox-execution.md: Remove retryIndex rule, simplify execution timeout rule

Related: OLS-3781, OLS-3793

Made with Cursor

@onmete onmete added the kind/design Categorizes issue or PR as related to design. label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b5fd1877-e947-492a-bbad-77f27fffd87d

📥 Commits

Reviewing files that changed from the base of the PR and between 93c5c7f and 93ca37a.

📒 Files selected for processing (3)
  • .ai/spec/what/crd-api.md
  • .ai/spec/what/run-lifecycle.md
  • .ai/spec/what/sandbox-execution.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift/lightspeed-agentic-sandbox (manual)
🚧 Files skipped from review as they are similar to previous changes (3)
  • .ai/spec/what/crd-api.md
  • .ai/spec/what/sandbox-execution.md
  • .ai/spec/what/run-lifecycle.md

📝 Walkthrough

Summary by CodeRabbit

  • Behavior Changes

    • Analysis execution now runs once per iteration.
    • Verification failures proceed directly to escalation instead of retrying execution.
    • Escalation summaries include the relevant execution and verification results.
    • Execution timeouts now fail the run immediately.
  • Configuration

    • Retry and attempt-limit settings are no longer supported.
  • Audit Logging

    • Verification completion events are recorded whenever verification results are created, including failed verifications.
    • Retry-specific audit details have been removed.

Walkthrough

The specifications remove retry and attempt configuration. Execution runs once per analysis iteration. Verification failure enters escalation without re-execution. Audit logging records verification completion for every created VerificationResult CR.

Changes

Execution lifecycle changes

Layer / File(s) Summary
Approval and CRD contracts
.ai/spec/what/approval.md, .ai/spec/what/crd-api.md
Approval rules define execution-option trimming, single-attempt execution, escalation-stage approval, append-only validation, and agent overrides. CRD documentation removes maxAttempts, retryIndex, and execution retry counters.
Execution and escalation lifecycle
.ai/spec/what/run-lifecycle.md, .ai/spec/what/sandbox-execution.md
Execution runs once per analysis iteration. Verification failure enters escalation without re-execution. Timeout handling still causes immediate run failure.
Verification audit events
.ai/spec/what/audit-logging.md
Retry traces and retry attributes are removed. agenticrun.verification.completed is emitted when any VerificationResult CR is created.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the removal of verification retries, direct escalation, and related specification changes.
Title check ✅ Passed The title clearly summarizes the main change: removing verification retries and escalating after failure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from harche and xrajesh August 6, 2026 09:43
@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign onmete for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.ai/spec/what/audit-logging.md:
- Line 44: Update the agenticrun.verification.completed emission described in
the audit-logging table to occur only when the operator first observes
VerificationResult status Completed=True, rather than when the
VerificationResult CR is created. Include both successful and failed completed
results, and ensure the event payload contains the fully populated status and
does not represent an in-progress verification.

In @.ai/spec/what/run-lifecycle.md:
- Line 23: Update the phase-derivation rule for Verified=False to remove the
obsolete dedicated retrying-execution exception; state that it derives Failed
unless an earlier escalation or denial rule takes precedence, and update the
referenced Rule 16 wording consistently.

In @.ai/spec/what/sandbox-execution.md:
- Line 63: Align the removed retryIndex contract across both specifications: in
.ai/spec/what/sandbox-execution.md lines 63-63, remove retryIndex from Rule 7a
line 14; in .ai/spec/what/crd-api.md lines 31-39, retain its removal and update
the execution and verification result-template definitions so neither requires
retryIndex.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 50882a2b-c54d-4061-b4c0-69f42a1586cf

📥 Commits

Reviewing files that changed from the base of the PR and between dd9bf29 and 93c5c7f.

📒 Files selected for processing (5)
  • .ai/spec/what/approval.md
  • .ai/spec/what/audit-logging.md
  • .ai/spec/what/crd-api.md
  • .ai/spec/what/run-lifecycle.md
  • .ai/spec/what/sandbox-execution.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift/lightspeed-agentic-sandbox (manual)

| `agenticrun.execution.completed` | `agenticrun.execute` | ExecutionResult CR created | `result.name`, `result.uid`, `actions_taken.count` + full ExecutionResult CR serialization |
| `agenticrun.verification.completed` | `agenticrun.verify` | VerificationResult CR created, checks passed | `result.name`, `result.uid`, `checks.count` + full VerificationResult CR serialization |
| `agenticrun.verification.retry` | `agenticrun.verify` | Verification failed, retrying execution+verification | `result.name`, `retry_count`, `checks.count` + full VerificationResult CR serialization |
| `agenticrun.verification.completed` | `agenticrun.verify` | VerificationResult CR created | `result.name`, `result.uid`, `checks.count` + full VerificationResult CR serialization |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Emit verification completion after the Result CR is complete.

The rule triggers agenticrun.verification.completed when the VerificationResult CR is created. The sandbox creates the CR first and patches status in a second API call. Emit the event when the operator first observes Completed=True, including failed results, so the event contains the full status and does not label an in-progress verification as completed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.ai/spec/what/audit-logging.md at line 44, Update the
agenticrun.verification.completed emission described in the audit-logging table
to occur only when the operator first observes VerificationResult status
Completed=True, rather than when the VerificationResult CR is created. Include
both successful and failed completed results, and ensure the event payload
contains the fully populated status and does not represent an in-progress
verification.

Comment thread .ai/spec/what/run-lifecycle.md
Comment thread .ai/spec/what/sandbox-execution.md
@onmete

onmete commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

/hold

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 6, 2026
@onmete

onmete commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Aug 12, 2026
Verification failure now leads directly to escalation instead of
re-executing remediation. Removes maxAttempts from ApprovalPolicy and
AgenticRunApproval, removes retryIndex from result CRs, simplifies
phase derivation. Convergence-dependent checks are handled within
the verification agent prompt.

Related: OLS-3781, OLS-3793
Co-authored-by: Cursor <cursoragent@cursor.com>
@onmete
onmete force-pushed the spec/OLS-3793-remove-verification-retries branch from 93c5c7f to 251da38 Compare August 12, 2026 06:43
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2026
…ure rule

Co-authored-by: Cursor <cursoragent@cursor.com>
@onmete
onmete merged commit 634d6ae into openshift:main Aug 12, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/design Categorizes issue or PR as related to design.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant