Skip to content

fix(aggregator): expose search stage timings on cache hits - #16790

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16785-board-timing
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/16785-board-timing

Conversation

@developing-today-fleet

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

Copy link
Copy Markdown
Contributor

Closes #16785

Problem

On a search-context cache hit, searchContext returned only {cache} as its timings, so the Server-Timing header lost every in-process stage (board, roadmap, registry, dns, usage, orchestration, items, search). The boot test fetches /api/search.json (a miss, which warms the cache) and then /search for the same query (a hit), so main fails the stage-timings oracle at test/boot.test.ts:81 with cache;dur=…, render;dur=…, total;dur=… and no board stage.

Fix

The stage timings recorded while a search value is computed now ride the cache entry (stored as a snapshot, so per-request render/serialize/total mutations cannot leak into the stored entry). A hit merges the stored stage timings with its own cache timing; a miss is unchanged.

Verification

Remote fleet-command run at the exact head (dispatched with this PR; run id + executed counts recorded on #16785): bun test test/boot.test.ts test/search-cache-14060.test.ts in pm-stack/aggregator plus bunx tsc --noEmit.

Oracle: the boot test named in the issue — every named stage present in the Server-Timing header for both the JSON and page fetches.

{
  "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:17:22Z",
    "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.

A search-context cache hit returned only a lone cache timing, so the
Server-Timing header lost every in-process stage (board, roadmap, ...)
and the boot test's stage-timings oracle failed on main whenever the
page fetch followed the JSON fetch for the same query. The computed
stage timings now ride the cache entry (as a snapshot, so per-request
render/serialize/total mutations cannot leak into it) and a hit merges
them with its own cache timing.
@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: a79a98d8-20e4-4113-804b-a3045fc13715

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
developing-today-fleet Bot merged commit 94d011e into main Nov 29, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/16785-board-timing branch November 29, 2026 13:36
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Executor verdict for run 46266693307 (Felix fix lane, 2026-11-29): this run's Linux job FAILED AT TARGET CHECKOUT — the verification command for this PR (aggregator boot + search-cache tests, then tsc) never executed. actions/checkout's git fetch of ref felix/16785-board-timing failed on all 3 attempts (14:03:25Z→14:04:00Z) with its stderr swallowed (the code#16766 failure shape; this run was dispatched 13:17Z, before the scripted-checkout fix in developing-today/fleet PR #13 merged at 13:37Z). So there is still NO executed verification verdict for PR #16790 from this run — the failure is executor infrastructure, not this PR's code. The queue jam itself is runner-pool saturation (see the incident issue Felix is filing in developing-today/code): the run waited ~18 min for its 4-second target-selection job and ~26 more min for a runner. Re-dispatch the same command now that the scripted checkout is on fleet main; its log will surface any fetch error verbatim.

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.

main CI failure: aggregator boot.test search-routes stage timings (board stage missing)

0 participants