Skip to content

feat(fleet-queue): shadow comparison reports row-content drift (#14987) - #16807

Merged
developing-today-fleet[bot] merged 3 commits into
mainfrom
felix/14987-shadow-dual-read
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 3 commits into
mainfrom
felix/14987-shadow-dual-read

Conversation

@developing-today-fleet

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

Copy link
Copy Markdown
Contributor

Refs #14987 (CF-2b slice — the issue stays open: the supervised live cutover remains its own pass).

The broker's /door-shadow dual-read comparison certified plane parity by task-id set only: two planes could carry identical ids while a shared row's content had drifted, and the comparison reported no divergence. The CF-2 evidence baseline was rows agreeing (8/8 terminal tasks), not just ids present — the shadow window could not check the thing the cutover decision actually rests on.

This slice adds the content layer to shadow_diff (pkgs/fleet/crates/fleet-queue/src/queue_broker.rs):

  • For ids both planes carry, compares the stable base-projection fields both rows carry — exactly the shared /list base projection (LIST_BASE_KEYS in the hosted worker, mirrored by the native rich projection since fleet queue: park verb does not retain ready_condition (parked task reads back null) #14317), minus the match key: queue, title, priority, status, dedupe_key, created_at, not_before, platform.
  • Volatile rich fields (lease_until, claimed_at, progress, …) move under live traffic by design and are never compared; a field one side does not carry is a projection gap, not row drift.
  • Reports drifted_rows, a capped drifted id sample, and per-field drift_fields counts; drift counts toward divergent. complete semantics unchanged.
  • Read-only, as before: neither plane is written and live traffic keeps using Turso. No traffic moves; the deploy + live shadow window + flip remain the supervised cutover pass.

Tests: new oracle shadow_diff_reports_row_content_drift (status drift on a shared id is reported with its field count; identical content certifies no drift; one-sided fields and volatile rich fields never count as drift). The existing shadow_diff_reports_id_set_divergence oracle still passes unchanged.

Verification (repo CI venue, fleet-rust-tests workflow_dispatch on the branch):

  • Failing-first, test-only head 4523058 (run 46266868664): the new oracle failed with the expected assertion (divergent false vs true — the old comparison missed a status drift); fleet-queue lib suite 997 passed / 2 failed.
  • Implementation head 213023e (run 46268297695): both shadow oracles pass; suite 998 passed / 1 failed.
  • The one remaining failure in both runs is turso_queue::tests::lease_renewal_guidance_names_heartbeat_only_14653, in code this diff does not touch; it fails identically on the test-only head, i.e. it reproduces on main HEAD content. Filed as fleet-queue regression: lease_renewal_guidance_names_heartbeat_only_14653 fails on main (verb_checkpoint writes lease_until) #16806.
  • Note: two earlier fleet-command dispatches of the focused test failed to build in the executor container (openssl-sys cannot find OpenSSL there — fleet-cert's openssl dep), which is why verification ran through the fleet-rust-tests venue instead.
{
  "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-29T13:43:57Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "ac3f377b7f752f50918f491d7443b79e95b5dc34"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

@coderabbitai

coderabbitai Bot commented Nov 29, 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: b5fd9732-cbb4-41a2-9c5a-14eb6a927385

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

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