Skip to content

fix(test): give the contended restore its real production wait budget - #1129

Merged
lidge-jun merged 1 commit into
devfrom
codex/260806-restore-watchdog-margin
Aug 6, 2026
Merged

fix(test): give the contended restore its real production wait budget#1129
lidge-jun merged 1 commit into
devfrom
codex/260806-restore-watchdog-margin

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Restores dev to green. The composed-acceptance "Restore truth" case failed on the macOS shard of the post-merge dev run (31105071651) after #1106 landed.

It is a watchdog-margin bug in the test, not a product regression. The case holds state_5.sqlite with BEGIN IMMEDIATE and then runs a real ocx restore --json child, which deliberately waits out production's retry budget before it may report busy: a 5 s SQLite busy timeout per attempt, two attempts (HISTORY_RETRY_ATTEMPTS), plus HISTORY_RETRY_DELAY_MS between them — roughly 11 s of intentional waiting. The CLI watchdog was set to 15 s, leaving under 4 s of headroom, which a loaded CI runner consumed. The watchdog now gets 30 s; the case's own 45 s test timeout still bounds it, and no production timing changed.

Verification

  • bun test ./tests/codex-composed-acceptance.test.ts — 6 pass / 0 fail (14.94 s locally; the contended case alone accounts for ~11 s of that by design).
  • bun x tsc --noEmit — clean.
  • Single-file change, tests only; no src/ diff.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed (not applicable — test-only timing margin).
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults (no auth, credential, or workflow surface touched).

Summary by CodeRabbit

  • Tests
    • Increased the timeout for the restore contention acceptance test to accommodate production retry delays.
    • Kept the test within its overall execution limit.

The case waits out a 5s SQLite busy timeout twice plus the retry delay --
about 11s of deliberate waiting -- so a 15s CLI watchdog had almost no
margin and fired on a loaded macOS runner (dev run 31105071651). The 45s
test timeout still bounds the case.
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f84b7748-0417-4f0b-8825-4cd828aeb583

📥 Commits

Reviewing files that changed from the base of the PR and between 43a1fdc and eb0923e.

📒 Files selected for processing (1)
  • tests/codex-composed-acceptance.test.ts

📝 Walkthrough

Walkthrough

The restore contention acceptance test increases the blocked restore --json watchdog timeout from 15 to 30 seconds. Comments document the expected SQLite retry duration and added headroom. The overall test limit remains 45 seconds.

Changes

Restore contention acceptance test

Layer / File(s) Summary
Restore retry timeout
tests/codex-composed-acceptance.test.ts:480-486
The contended restore --json invocation now allows 30 seconds for SQLite retry delays instead of 15 seconds. Comments document the timeout rationale.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested labels: chore

Suggested reviewers: wibias, ingwannu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the test timeout change for the contended restore and matches the pull request objective.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/260806-restore-watchdog-margin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@lidge-jun
lidge-jun merged commit e9d957b into dev Aug 6, 2026
33 of 35 checks passed
theQuert pushed a commit to theQuert/opencodex that referenced this pull request Aug 7, 2026
Audit returned FAIL with 3 blockers. Corrections:
- PR count was 34, actual live count is 32 (lidge-jun#1129 merged mid-triage and is
  recorded separately rather than counted).
- Phases 080 and 100 cited line numbers from the contributors' patched trees,
  not dev. Both defects re-verified against dev=e9d957bf6 and rewritten with
  real anchors: the vision rawbody sync function does not exist on dev, and
  openai-chat has no response_format handling at all.
- Phase 050 narrowed so the client-facing selector is set only on the Anthropic
  rewrite branch, with a regression test pinning that other providers are
  unchanged.
- Phase 060 now adopts lidge-jun#1111's real module and test paths instead of inventing
  names; phase 160 gained the disposition-matrix schema it was missing.
- Citation drift corrected in 001 and 070 (relay buffer, selectEagerPath).
@lidge-jun
lidge-jun deleted the codex/260806-restore-watchdog-margin branch August 8, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant