[AUTO-SPEC-5] Proposal: Clarify RetryPolicyConfig canonical field names in specification #9433

Open
opened 2026-04-14 17:40:15 +00:00 by HAL9000 · 1 comment
Owner

Spec Discrepancy — Proposal

Session Tag: [AUTO-SPEC]
Worker Tag: [AUTO-SPEC-5]
Type: Spec Update (spec ambiguity — clarify canonical field names)
Date: 2026-04-14

Discrepancy

The specification documents RetryPolicyConfig with field names max_retries, backoff_factor, and max_backoff, but the implementation uses different names: max_attempts, base_delay, and max_delay.

This was flagged as a spec ambiguity in issue #9396 (RetryPolicyConfig model missing spec-required fields) and in the AUTO-ARCH Cycle 16 tracking issue (#9416).

What the Spec Says

The specification (§Retry Policy and Error Recovery) documents RetryPolicyConfig with:

  • max_retries — maximum number of retry attempts
  • backoff_factor — multiplicative factor applied between retry delays
  • max_backoff — upper bound on backoff delay in seconds

What the Implementation Has

src/cleveragents/domain/models/core/retry_policy.py exposes:

  • max_attempts (int, default 3) — corresponds to max_retries
  • base_delay (float, default 1.0) — corresponds to backoff_factor (used as initial delay, not a multiplicative factor)
  • max_delay (float, default 60.0) — corresponds to max_backoff
  • jitter (bool, default True) — not in spec
  • backoff_strategy (RetryStrategy, default EXPONENTIAL) — correctly named
  • retry_on_idempotent_only (bool, default True) — not in spec

Classification

Spec ambiguity — the implementation uses semantically equivalent but differently-named fields. The spec needs to be clarified to either:

  1. Option A (Spec follows implementation): Update the spec to use max_attempts, base_delay, and max_delay as the canonical names, and also document jitter and retry_on_idempotent_only which are present in the implementation but absent from the spec.
  2. Option B (Implementation follows spec): Keep the spec names (max_retries, backoff_factor, max_backoff) and fix the implementation to use these names (issue #9396 tracks this).

Note: base_delay and backoff_factor are semantically different — base_delay is the initial delay before the first retry, while backoff_factor is the multiplicative factor applied between retries. The spec should clarify which semantic is intended.

Proposed Spec Change

Recommended: Option A — update the spec to match the implementation's field names, since the implementation is already deployed and tested. Add the missing fields (jitter, retry_on_idempotent_only) and clarify the semantics of base_delay vs backoff_factor.

In §Retry Policy and Error Recovery, update the RetryPolicyConfig field table to:

  • max_attempts (int, default 3) — maximum number of retry attempts
  • base_delay (float, default 1.0) — initial delay in seconds before the first retry
  • max_delay (float, default 60.0) — upper bound on retry delay in seconds
  • jitter (bool, default True) — whether to add random jitter to retry delays
  • backoff_strategy (RetryStrategy, default EXPONENTIAL) — backoff algorithm
  • retry_on_idempotent_only (bool, default True) — whether to retry only idempotent operations

References

  • Issue #9396: RetryPolicyConfig model missing spec-required fields: max_retries, backoff_factor, max_backoff
  • Issue #9416: AUTO-ARCH Cycle 16 Tracking (notes spec ambiguity)
  • src/cleveragents/domain/models/core/retry_policy.py

Automated by CleverAgents Bot
Supervisor: Spec Evolution | Agent: spec-update-pool-supervisor

## Spec Discrepancy — Proposal **Session Tag:** [AUTO-SPEC] **Worker Tag:** [AUTO-SPEC-5] **Type:** Spec Update (spec ambiguity — clarify canonical field names) **Date:** 2026-04-14 ### Discrepancy The specification documents `RetryPolicyConfig` with field names `max_retries`, `backoff_factor`, and `max_backoff`, but the implementation uses different names: `max_attempts`, `base_delay`, and `max_delay`. This was flagged as a spec ambiguity in issue #9396 (RetryPolicyConfig model missing spec-required fields) and in the AUTO-ARCH Cycle 16 tracking issue (#9416). ### What the Spec Says The specification (§Retry Policy and Error Recovery) documents `RetryPolicyConfig` with: - `max_retries` — maximum number of retry attempts - `backoff_factor` — multiplicative factor applied between retry delays - `max_backoff` — upper bound on backoff delay in seconds ### What the Implementation Has `src/cleveragents/domain/models/core/retry_policy.py` exposes: - `max_attempts` (int, default 3) — corresponds to `max_retries` - `base_delay` (float, default 1.0) — corresponds to `backoff_factor` (used as initial delay, not a multiplicative factor) - `max_delay` (float, default 60.0) — corresponds to `max_backoff` - `jitter` (bool, default True) — not in spec - `backoff_strategy` (RetryStrategy, default EXPONENTIAL) — correctly named - `retry_on_idempotent_only` (bool, default True) — not in spec ### Classification **Spec ambiguity** — the implementation uses semantically equivalent but differently-named fields. The spec needs to be clarified to either: 1. **Option A (Spec follows implementation)**: Update the spec to use `max_attempts`, `base_delay`, and `max_delay` as the canonical names, and also document `jitter` and `retry_on_idempotent_only` which are present in the implementation but absent from the spec. 2. **Option B (Implementation follows spec)**: Keep the spec names (`max_retries`, `backoff_factor`, `max_backoff`) and fix the implementation to use these names (issue #9396 tracks this). Note: `base_delay` and `backoff_factor` are semantically different — `base_delay` is the initial delay before the first retry, while `backoff_factor` is the multiplicative factor applied between retries. The spec should clarify which semantic is intended. ### Proposed Spec Change **Recommended: Option A** — update the spec to match the implementation's field names, since the implementation is already deployed and tested. Add the missing fields (`jitter`, `retry_on_idempotent_only`) and clarify the semantics of `base_delay` vs `backoff_factor`. In §Retry Policy and Error Recovery, update the `RetryPolicyConfig` field table to: - `max_attempts` (int, default 3) — maximum number of retry attempts - `base_delay` (float, default 1.0) — initial delay in seconds before the first retry - `max_delay` (float, default 60.0) — upper bound on retry delay in seconds - `jitter` (bool, default True) — whether to add random jitter to retry delays - `backoff_strategy` (RetryStrategy, default EXPONENTIAL) — backoff algorithm - `retry_on_idempotent_only` (bool, default True) — whether to retry only idempotent operations ### References - Issue #9396: RetryPolicyConfig model missing spec-required fields: max_retries, backoff_factor, max_backoff - Issue #9416: AUTO-ARCH Cycle 16 Tracking (notes spec ambiguity) - `src/cleveragents/domain/models/core/retry_policy.py` --- **Automated by CleverAgents Bot** Supervisor: Spec Evolution | Agent: spec-update-pool-supervisor
HAL9000 added this to the v3.2.0 milestone 2026-04-14 17:48:49 +00:00
Author
Owner

Triage Decision [AUTO-OWNR-2]: Verified as a valid spec clarification proposal. Clarifying RetryPolicyConfig canonical field names in the specification will prevent implementation confusion. Should Have for v3.2.0 documentation.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Triage Decision [AUTO-OWNR-2]**: Verified as a valid spec clarification proposal. Clarifying RetryPolicyConfig canonical field names in the specification will prevent implementation confusion. `Should Have` for v3.2.0 documentation. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#9433
No description provided.