Skip to content

docs(design): the restart grace is 30 minutes on any OpenAI model - #761

Merged
amiddavid merged 1 commit into
mainfrom
docs/restart-grace-openai
Oct 28, 2026
Merged

amiddavid merged 1 commit into
mainfrom
docs/restart-grace-openai

Conversation

@amiddavid

Copy link
Copy Markdown
Collaborator

Summary

One-line docs fix after #759. docs/design.md said the restart grace is "30 minutes on OpenAI GPT-5.6+". The code gives every OpenAI model 30 minutes (apply.restartGrace). The text now says "30 minutes on any OpenAI model".

What changed

  • docs/design.md, the cached-prefix section: one phrase.

How it was tested

Docs only. I checked the sentence against apply/cachelifetime.go on main (restartGrace returns OpenAIMinimumCacheTTL when the provider is OpenAI).

Data dependence

No change.

Refs #496

🤖 Generated with Claude Code

#759 gives every OpenAI request the 30-minute restart grace, for any
model. docs/design.md still said "OpenAI GPT-5.6+". This fixes the
wording to match the code (apply.restartGrace).

Docs only. No behavior change.

Refs #496

Assisted-By: Claude Opus 5.5
Signed-off-by: DAVID AMID <[email protected]>

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.312 offload-review skill, @amiddavid's session fresh 1 of 2 1 of 2 69a6ea13dc0d approve

Verdict: approve

Findings

None.

Non-blocking

  • apply/cachelifetime.go:34 — the CacheLifetime doc comment still opens with "GPT-5.6+
    defaults to a 30-minute MINIMUM". That comment is about CacheLifetime, not the grace, and
    it stays true. No change needed.

What I checked

  • The diff: one line in docs/design.md:319. "30 minutes on OpenAI GPT-5.6+" becomes
    "30 minutes on any OpenAI model".
  • The code the sentence describes. restartGrace (apply/cachelifetime.go:62-70) returns
    OpenAIMinimumCacheTTL — 30 minutes (internal/modelinfo/cachefrac.go:11) — for any
    bschemas.OpenAI provider, whatever the model. The comment above it (lines 51-55) states
    the same rule. The old text contradicted this code; the new text matches it.
  • Both call sites pass the real provider to restartGrace: apply/apply.go:552 and
    apply/responses.go:539 (the Responses path is OpenAI-only, so its hard-coded
    bschemas.OpenAI is correct there).
  • The other numbers in the same sentence. Non-OpenAI with an exact lifetime gets that
    lifetime: 5 minutes default, 1 hour on the extended tier (extendedTTL,
    apply/cachelifetime.go:24). Unknown non-OpenAI gets 5 minutes. All match the code.
  • No other doc repeats the old "GPT-5.6+" claim about the grace. I searched docs/ for
    "grace", "restart", and "GPT-5.6".
  • The behavior itself came from the base commit (#759). This PR changes a doc line only,
    so no test is needed and no behavior-change permission applies.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.312 offload-review skill, @amiddavid's session fresh 2 of 2 1 of 2 69a6ea13dc0d approve

Verdict: approve

Findings

None.

Non-blocking

  • docs/design.md:318 still says "for that request's own cache lifetime". The grace is not
    always the request's own lifetime: for a pre-GPT-5.6 OpenAI model that lifetime reads
    Unknown, and restartGrace substitutes the 30-minute minimum
    (apply/cachelifetime.go:62-65). The new parenthetical states the substituted numbers, so
    the sentence is correct as a whole. No change needed.

What I checked

  • The full diff: one line in docs/design.md:319.
  • restartGrace in apply/cachelifetime.go:62-70. For any provider == bschemas.OpenAI it
    returns OpenAIMinimumCacheTTL (30 minutes, internal/modelinfo/cachefrac.go:11), whatever
    CacheLifetime says about the model. The old text ("GPT-5.6+") described CacheLifetime
    (modelinfo.OpenAI30MinuteCache, internal/modelinfo/cachefrac.go:28-30), not the grace.
    The new text matches the code.
  • Both callers pass the grace per request: apply/apply.go:552 and apply/responses.go:539.
  • TestAnOlderOpenAIRequestGetsTheThirtyMinuteGrace (apply/tracker_restart_test.go:239)
    pins the rule with gpt-5.5: 20 minutes after the start the whole prompt counts as cached
    (MaxCachedIdx 924), past 31 minutes it does not. So "any OpenAI model" is the tested
    behavior.
  • The other numbers in the same sentence: 5 minutes (Anthropic default TTL and the shortest
    known lifetime for unknown retention) and 1 hour (extended tier) both hold in
    apply/cachelifetime.go.
  • Other docs for conflicts: docs/data-dependence.md:225 states no model-specific lifetime;
    the GPT-5.6+ mentions in docs/how-to/cache-keepalive.md are about keep-alive, a different
    rule.
  • No code changes in this PR, so no fail-open, data-dependence, or test-coverage questions
    arise.

@amiddavid
amiddavid merged commit 9df5e6d into main Oct 28, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Oct 28, 2026
@amiddavid
amiddavid deleted the docs/restart-grace-openai branch October 28, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant