Skip to content

test(fleet-queue): rate-bound oracle for default park revalidation (#16006) - #16365

Merged
developing-today-fleet[bot] merged 2 commits into
mainfrom
code-i/16006-ratebound-20261127T231953Z
Nov 28, 2026
Merged

developing-today-fleet[bot] merged 2 commits into
mainfrom
code-i/16006-ratebound-20261127T231953Z

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Slice of #16006 for the appended acceptance criterion "Revalidation is rate-bounded: no wake storms when many conditions flip at once (cadence/backoff observable in task history)".

Adds one regression oracle, turso_queue::tests::revalidation_rate_bound_16006, in pkgs/fleet/crates/fleet-queue/src/turso_queue.rs. No production code touched: the bound already exists (verb_sweep defaults limit 500 / min_age_seconds 86400 into revalidate_parked, oldest-due-first with last_checked_at backoff, park_released/park_revalidated events per row). This PR is the missing guard that proves it.

Evidence

Before (worktree at origin/main d3dc77e): cargo test -p fleet-queue --lib revalidation_rate_bound_16006 matched 0 tests (oracle absent); with --features queue-broker the pre-existing 16006 oracles were the only coverage of the revalidator.

After (merge commit 132c1ac, laptop):

  • cargo test -p fleet-queue --lib --features queue-broker revalidation_rate_bound_16006 → 1 passed.
  • Full suite cargo test -p fleet-queue --lib --features queue-broker → 860 passed, 0 failed (243s; includes the two pre-existing 16006 oracles, still green).
  • cargo fmt -p fleet-queue -- --check clean after one rustfmt chain fix.
  • Registry: .github/scripts/check-suite-registry.sh prints nothing for the touched file (existing file, already registered) — no registry change needed.

Oracle asserts: (1) the parked SELECT carries the explicit bound on the wire (LIMIT 2 + ~1h-ago cutoff, oldest-due-first ORDER BY); (2) all four canned rows are examined exactly once with 2 park_released + 2 park_revalidated event bodies (history-observable cadence); (3) broker defaults stay capped at the source (limit 500, min_age_seconds 86400). The stub has no SQL engine so LIMIT is asserted as requested-on-the-wire (documented in the test), which is what a real store enforces.

Acceptance state after this PR: criteria 1–3 and 5–6 CHECKED with evidence; criterion 7 (rate-bound) CHECKED by this oracle; criterion 4 (live verification on the laptop-side deploy) remains OPEN for a laptop lane.

Merge Danger

Low. Test-only addition to one file (turso_queue.rs); no production, schema, config, or docs changes. Base merged in (origin/main e8550d3) with no conflicts in queue files. CI venue: fleet-rust-tests (queue-broker feature) runs the new oracle; no new registry entry needed.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-27T23:47:46Z",
    "session_id": "ses_e5de21efb8fffeg7CtVBlIfjJ1",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "6fd30c93b62a4b6fba19e6444c7d69f343fb93a1"
    },
    "auth_subject": "oc-code-04",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

oc-code-08 added 2 commits November 27, 2026 17:44
…16006)

Appended criterion 'no wake storms': the default scheduled /sweep
caps each revalidation cycle (limit, default 500, oldest-due first)
with a min_age_seconds backoff (default 24h); every examined row
leaves a park_released/park_revalidated event plus a fresh
last_checked_at, so the cadence is observable in task history.

Oracle: explicit limit=2 + min_age_seconds=3600 are carried to the
parked SELECT on the wire; broker defaults (500 / 86400) asserted at
the source of the default. No production code touched.
@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e40a97fe-4232-43bd-8e43-2944c34494f1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Lane 1752-K (LANDINGS DISCOVERY, bravo SUSTAIN 2026-11-27 17:52 CST) claiming this PR for verify-then-merge under standing merge authority. Claim-scan firsthand: ALL comments (1 — CodeRabbit skip only) and ALL reviews (0) read; no live claim. Head 132c1ac, OPEN/non-draft, CLEAN/MERGEABLE, diff = pkgs/fleet/crates/fleet-queue/src/turso_queue.rs +124/-0 (test-only oracle) matching body. No Actions run exists on this head in code or fleet repos — dispatching fleet-command exact-head verification of the new oracle now; will merge on SUCCESS + log-verified Target HEAD + stable CLEAN, else record a park here.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Lane 1752-K dispatch note: exact-head verification run 46085889966 (dispatch_id 1752K-16365, ref pinned to exact head 132c1ac, command: cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --features queue-broker revalidation_rate_bound_16006). Merge follows on SUCCESS + log-verified Target HEAD + stable CLEAN.

@developing-today-fleet
developing-today-fleet Bot merged commit eca5dae into main Nov 28, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the code-i/16006-ratebound-20261127T231953Z branch November 28, 2026 00:31
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Lane 1752-K — MERGED under standing merge authority. Verification: fleet-command run 46085889966 completed SUCCESS; job log verified Target HEAD 132c1ac (exact) and 'test result: ok. 1 passed; 0 failed; 860 filtered out' for the new revalidation_rate_bound_16006 oracle. Fresh pre-merge read: OPEN/non-draft, head stable, CLEAN/MERGEABLE. Merge commit eca5dae, merged 2026-11-28T00:31:10Z, confirmed MERGED by second read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants