Skip to content

fix(cf+dashboard): fleet claim-fairness, supplemental-merge freshness, dashboard drilldown D4 parity - #5399

Merged
jpr5 merged 145 commits into
mainfrom
fix/cf8-m1
Jun 12, 2026
Merged

jpr5 merged 145 commits into
mainfrom
fix/cf8-m1

Conversation

@jpr5

@jpr5 jpr5 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Bundles two related dashboard/harness lanes that landed together once both reached green:

  1. CF readme fixes #18 fairness / claim-fair lane — the 23-commit base (fix/fleet-claim-fairness rebased onto its CF7 integration tip 80c5c9402) carrying claim-spike, cf3/cf4/cf5/cf6/cf7 hardening waves, plus the CF8 micro-fix for the round-8 supplemental-merge finding:

    • CF8 F3 supplemental-merge freshness guard (useLiveStatus.ts): the cold-load comm-error supplemental fetch runs CONCURRENTLY with the bulk pages, so the bulk copy of an aggregate row can be NEWER than the supplemental snapshot. The previous merge replaced the bulk row unconditionally, regressing state/observed_at to stale values until the row's next SSE delta (long for slow-cadence aggregates). Added supplementalRowIsOlder — when the supplemental row is strictly older the newer bulk row stays INTACT (signal-less) rather than being grafted into a chimera (newer core + stale signal) that the reducer's signal-PRESENCE no-op check would silently swallow.

    • Procedure 3 promotions (bucket-c/d audit over the CF round-8 ledger): one functional fix (escape workerId in fleet-health's reclaim list filter — matches the JSON.stringify pattern used at orchestrator.ts:3240 for the same field; a "-bearing worker_id would otherwise break out of the literal) plus five doc reconciliations on the producer/contract surfaces flagged across slot1/slot2/slot4/slot5 (stale queue-client cross-reference, WarmHealthConfig doc vs gate.specs reality, TickResult.reclaimedIndeterminate "Of reclaimed" → "In addition to reclaimed", TickResult.skippedForBacklog poisoned-count contributor, SweepResult.commErrors equation scoping).

  2. Dashboard drilldown D4 parity — three commits making the dashboard drilldown surface the D4 rung the same way the grid does:

    • feat(showcase): add resolveD4Row + CellState.d4 so the drilldown can see the D4 rung — exposes the D4 row on CellState, modeled after resolveD3Row.
    • fix(showcase): drilldown shows the D4 row, de-crosses the e2e label, and scopes the rollup line honestly — renders D4 in the drilldown panel, fixes the crossed e2e label, scopes the rollup line to its real source set.
    • fix(showcase): unify dimension naming on the legend taxonomy across grid, legacy cells, and legend — taxonomy cleanup so legend, grid, and legacy cells use one set of labels.

Verification

  • Dashboard npx tsc --noEmit: clean (only the pre-existing missing-@/data/*.json errors that exist on main).
  • Dashboard vitest run: 59 files / 1012 tests passing, 1 skipped.
  • Harness npx tsc --noEmit: clean.
  • Harness vitest run: 121/122 files passing; 1 failed = probe-invoker times out invoker-level even when driver ignores abortSignal — the NAMED known wall-clock flake (per CF7 integration verification), re-run in isolation: 67/67 PASS.
  • Rebase of drilldown-parity onto the updated fix/cf8-m1 tip: ZERO conflicts (the two lanes touch disjoint files).

Test plan

  • CI green on the PR
  • Dashboard drilldown shows D4 rung in addition to D3/D5/D6
  • Legend taxonomy reads the same in legend, grid, drilldown
  • (post-merge, in showcase) cold-load comm-error overlay still paints; a stale supplemental no longer regresses a freshly-failed aggregate row

@vercel

vercel Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-with-your-data Ready Ready Preview, Comment Jun 12, 2026 4:03am
docs Ready Ready Preview, Comment Jun 12, 2026 4:03am
form-filling Ready Ready Preview, Comment Jun 12, 2026 4:03am
research-canvas Ready Ready Preview, Comment Jun 12, 2026 4:03am
travel Ready Ready Preview, Comment Jun 12, 2026 4:03am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

@github-actions

github-actions Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

12 of 41 service(s) not digest-pinned.

Service Source.image Status
starter-adk ghcr.io/copilotkit/starter-adk:latest mutable-tag
starter-agno ghcr.io/copilotkit/starter-agno:latest mutable-tag
starter-crewai-crews ghcr.io/copilotkit/starter-crewai-crews:latest mutable-tag
starter-langgraph-fastapi ghcr.io/copilotkit/starter-langgraph-fastapi:latest mutable-tag
starter-langgraph-js ghcr.io/copilotkit/starter-langgraph-js:latest mutable-tag
starter-langgraph-python ghcr.io/copilotkit/starter-langgraph-python:latest mutable-tag
starter-llamaindex ghcr.io/copilotkit/starter-llamaindex:latest mutable-tag
starter-mastra ghcr.io/copilotkit/starter-mastra:latest mutable-tag
starter-ms-agent-framework-dotnet ghcr.io/copilotkit/starter-ms-agent-framework-dotnet:latest mutable-tag
starter-ms-agent-framework-python ghcr.io/copilotkit/starter-ms-agent-framework-python:latest mutable-tag
starter-pydantic-ai ghcr.io/copilotkit/starter-pydantic-ai:latest mutable-tag
starter-strands-python ghcr.io/copilotkit/starter-strands-python:latest mutable-tag

Run 2026-06-11 21:00:45 PDT — 12 finding(s).

jpr5 added 13 commits June 11, 2026 20:36
…rve low-frequency jobs

claimNext listed ONE global oldest-50 pending page; with the d4+d5
producers ticking every 15min against 2 serial browser workers, a
persistent backlog permanently saturated that page and e2e-demos jobs
never entered the candidate set (prod: all 18 e2e-demos jobs pending
forever; staging: 3,734 pending, oldest 22h).

claimNext now discovers the distinct families present in pending
(oldest first, one perPage=1 query per family) and tries them in
round-robin rotation across calls, listing a per-family candidate page
for each. Every discovered family is attempted before giving up, so no
family starves while any of its jobs are claimable. The S0 CAS
exactly-one-winner semantics and the per-page anti-herd shuffle are
unchanged; only candidate SELECTION changed.
Producers enqueued a fresh batch every scheduled tick regardless of
whether the family's previous batch had even been claimed — against 2
serial browser workers the queue compounded without bound (staging:
3,734 pending), feeding the claim-page starvation.

A scheduled tick now skips its family's batch when that family already
has pending (unclaimed) jobs, bounding the per-family backlog to one
batch, with a structured fleet.producer.skipped-for-backlog log
(family, pendingCount, skippedJobs) and a skippedForBacklog count on
TickResult. The check is per family, fails OPEN on a count blip (a PB
read failure must never stop production), and is BYPASSED by
operator-triggered ticks (explicit intent wins; the trigger CLI treats
0 enqueued as failure). Backed by a new
FleetQueueClient.countPendingForFamily (server-side totalItems count of
a family's pending rows).
…ins structurally

sweepExpired only reclaimed claimed/running leases — a pending row had
no terminal path, so an accumulated backlog (staging: 3,734 pending,
oldest 22h) could only drain through 2 serial workers and effectively
never did.

The sweep now also expires pending jobs older than expiryPeriods x
their family's production period (default 3 periods; the family has
enqueued fresher batches since, so the stale job's result would be
ancient data). Each stale row is first CLAIMED via the S0 CAS under a
synthetic stale-pending-sweeper id — so the delete can never race a
worker (exactly-one-winner) — then deleted; a failed delete self-heals
via normal lease expiry + re-queue. Unparseable created timestamps are
conservatively skipped (delete is destructive). Policy is configurable
via FleetQueueClientConfig.stalePending; the control-plane wires the
real per-family cadences (FLEET_FAMILY_PERIODS_MS: d4/d5 15min, d6/
e2e-demos hourly) so 15min families expire on a 45min window. No comm
error is synthesized for expired-pending rows (they never ran); the
count surfaces as SweepResult.expiredPending and in the producer's
sweep log.
…e lease phase just re-queued

sweepExpired's lease phase re-queues an expired-lease row to pending and
emits worker-reclaimed-pending ("back in flight"), but the stale-pending
phase of the SAME call lists pending fresh and ages rows off PB's system
`created` (the ORIGINAL enqueue time) — so a long-claimed job was
re-queued then immediately claimed-and-deleted, falsifying the comm
error and nulling downstream aggregate-key resolution on the deleted
row. Track the ids re-queued in this sweep and exclude them from this
call's stale phase; a truly stale job ages out on the next sweep. The
`created` anchor is kept (re-anchoring needs a column; out of scope).
…e-sweeper rows

When the stale-pending sweep CAS-claims a row under stale-pending-sweeper
and the delete fails, the next lease sweep treated the expired sweeper
lease like a crashed worker's: it re-queued the row AND synthesized a
worker-reclaimed-pending comm error — a gray "re-queued / back in flight"
dashboard overlay for stale garbage mid-deletion, attributed to a
non-existent worker. The lease sweep now special-cases rows held by the
stale-pending sweeper: still re-queued (the self-healing delete-retry
contract is unchanged) but silently — no comm error, no reclaimed count,
just a stale-sweeper-retry-requeue debug line. The lease holder is
snapshotted before the release CAS so attribution reflects who held the
expired lease, not the post-release row.
…ses beyond the page are reclaimed

The sweepExpired lease phase listed claimed/running rows with perPage 50
and NO sort: with >50 such rows (mass worker crash), PB's unspecified
default order could return the same 50 live-lease rows every sweep,
leaving expired leases beyond the page permanently orphaned with zero
signal. Sort by lease_expires_at ascending (indexed) so the most-expired
rows always head the page, and WARN when the page is full so truncation
is observable. Single page per sweep is kept deliberately — the sort
guarantees progressive forward drain.
… one

A single 50-row page per sweep was far slower than the incident the
stale-pending drain exists for: against the 3,734-row staging backlog at
~10 sweeps/hour that is ~7.5 hours of drain. The sweep now loops candidate
pages (re-listing page 1 — deletes shift pagination) up to a cap of 10
pages / 500 rows per sweep, draining the same backlog in well under an
hour while bounding a single sweep's PB load. CAS-claim-then-delete per
row is unchanged; a pass that expires nothing terminates the loop.
filterBackloggedFamilies ran BEFORE maybeSweep, so the tick whose own
stale-pending drain cleared a family's backlog still counted the
about-to-be-expired rows and skipped that family — production resumed a
full cron period late. Reordered tick() to sweep first; the cadence gate
and fail-open semantics (maybeSweep swallows sweep failures) are
unchanged, only the order moved.
…ucers

Only the d6 producer was built with onSweepCommErrors, but all four family
producers run the same GLOBAL queue.sweepExpired on their own crons — and the
sweep's S0 CAS means whichever producer ticks first wins each expired job's
reclaim, along with its synthesized comm error. With smoke/demos/deep sweeping
far more often than d6's hourly :40, the worker-reclaimed-pending dashboard
overlay (and stale-pending telemetry) was dropped ~11 of 12 sweeps, since
job-producer's maybeSweep forwards comm errors only when the sink is wired.

Share the ONE control-plane sink (surfaceSweepCommErrors -> aggregator) across
all four producers and correct the now-false "preserves the current behavior"
comment. Sweeps remain CAS-safe across producers: the S0 CAS guarantees exactly
one producer reclaims (and forwards) each expired job, and the surfacing leg is
best-effort per error, so the shared sink introduces no double-write.

Red-green: new runControlPlane REQ-B test drives the SMOKE producer's tick and
asserts its swept overlay reaches the status row (RED against d6-only wiring,
GREEN after). The test doUnmocks/re-mocks everything it touches so it passes in
isolation despite the file's leaked doMock factories.
…ed-pending semantics

The sweep no longer synthesizes worker-crashed-mid-job (it cannot tell a
crash from a platform teardown); it re-queues the job and emits the neutral
worker-reclaimed-pending kind. Update the queue-client module header, the
contracts kind/heartbeat/SweepResult/sweepExpired docs, the job-producer
sink/tick docs, the sweep test fixtures and titles, and the dashboard's
mirrored kind description. worker-crashed-mid-job is now documented as the
worker self-observed in-driver crash only. No runtime behavior changes.
…er tick outcome

maybeSweep's catch arm returned the same shape as a clean zero-reclaim
sweep (sweptExpired: true, reclaimed: 0), so a thrown sweepExpired call
was indistinguishable from success in the TickResult and the
tick-complete log. Add sweepFailed to the sweep outcome, TickResult,
and the tick-complete log; the cadence latch is unchanged (a failed
sweep still consumes its window so a persistently-failing sweep cannot
fire on every tick).
The field was dead on the only consumer path: queue-client's enqueue()
destructures only `payload` and never reads leaseSeconds (the claim
lease comes from the WORKER side — claimNext(workerId, leaseSeconds)
with the worker-loop's DEFAULT_LEASE_SECONDS). No production call site
ever set it, so wiring it up would add a knob nothing needs; delete is
chosen over wire-it.

Call-site enumeration (all removed):
- contracts.ts EnqueueJobInput.leaseSeconds (declaration; never read by
  queue-client.ts enqueue, the sole FleetQueueClient.enqueue impl)
- job-producer.ts ServiceJobSpec.leaseSeconds (only producer thereof)
- job-producer.ts toEnqueueInput() spec.leaseSeconds -> input.leaseSeconds
  threading (only writer of the field)
- job-producer.test.ts spec fixture leaseSeconds: 600 + the
  `expect(input.leaseSeconds).toBe(600)` assertion that legitimized the
  dead plumbing

Worker-side lease plumbing (claimNext/renewLease/worker-loop
leaseSeconds) is unrelated and untouched.
…umerators' families

stalePendingFilters silently falls back to the 1h default period for
any family missing from FLEET_FAMILY_PERIODS_MS, so a typo'd key (e.g.
"d5" vs "d5-single-pill-e2e") would never throw — it would just quietly
mis-size that family's stale-pending drain window. Lock the map's keys
to the probe-key families derived by RUNNING the four real enumerator
factories against a fake discovery source, so either side drifting
breaks the test. Also document the known d6 FLEET_PRODUCER_CRON
override drift limitation on the map (an env override changes d6's real
cadence without updating the nominal period).
jpr5 and others added 21 commits June 11, 2026 20:42
…beatParseable companion surfaces corrupt timestamps (scope exception: recurring CR noise)

CR finding flagged 4x across 2 rounds (lines pre-existing on the base, f8aee59):
isWorkerStale (contracts.ts:610-618) did a bare Date.parse with NaN -> false,
making a corrupt heartbeat indistinguishable from a fresh one ("never stale
forever" = silent fleet-health blindness), and lacked the anchored PB
space->"T" normalization the queue-client treats as load-bearing for lease
timestamps (PB_DATE_SEP_RE, replicated locally - not imported, since
queue-client imports contracts).

- normalize the PB date form with the anchored regex before parsing
- keep isWorkerStale(...): boolean compat (unparseable stays not-yet-stale)
- export heartbeatParseable(lastHeartbeatAt) so fleet-health (S10) can
  warn/count unparseable heartbeats (caller wiring is a follow-up; the S10
  caller is outside this fix's file scope)
- red-green: PB space-form timestamps, corrupt timestamp, fresh/stale ISO
  boundary pins (strict > at exactly-the-window)
…ble comm-error overlay observable (REQ-B version skew)

CR finding on commErrorFromStatusSignal (contracts.ts:433-463, decode-guard
region touched on this branch): a malformed embedded value decodes to
undefined - indistinguishable from "absent" - so a REQ-B overlay written by a
NEWER producer (new PoolCommErrorKind rolled out write-side first, or a
renamed required field) is silently dropped by an older reader.

- document the version-skew hazard on the decode (return type unchanged:
  every render path branches on presence)
- export statusSignalHasCommErrorKey(signal) so consumers can count/log
  "key present but undecodable" drops; mirrors the decoder's wire-shape
  guards (null/non-object/array are never valid signals)
- pinned with tests: unknown future kind, renamed required field, well-formed,
  genuinely-absent, and array/non-object wire shapes
- the mirrored commErrorFromStatusSignal REGION is untouched: companion +
  docs live OUTSIDE the byte-identity block; verified by running the
  dashboard's commError-contract-drift.test.ts (12/12 green) - the dashboard
  mirror (shell-dashboard live-status.ts) still needs its own sibling
  companion, to be landed by the dashboard owner
…nt d6:<slug> form (scope exception: recurring CR noise)

CR finding recurring 3x; fixture lines pre-existing on the base (f8aee59 /
ef76c6d / 2a9b38b). The fleet contract (contracts.ts ServiceJobResult
.aggregateKey) forbids an e2e_d6:<slug> row on the fleet path - the dashboard
only ever reads d6:<slug> - so fixtures pinning e2e_d6:* keys mask the exact
regression class (success-path vs error-path aggregate-key drift) these
suites exist to catch. Behavior-neutral: every assertion pins the same
production logic, now over conformant keys.

- contracts.test.ts: makeResult probeKey/aggregateKey + the projection pin
  -> d6:langgraph-python; fleetSurfaceState row key/dimension -> d6
- worker-loop.test.ts: makeDriver returns d6:<slug> (was e2e_d6:<slug>),
  unified with the comm-error/driver-error paths that already pin d6:...;
  all inline driver-fake fixtures + the buildServiceJobResult /
  runClaimedJob aggregateKey assertions swept in lockstep. The
  registry-routing `<kind>:routed` tagging keys are deliberately untouched
  (they tag by DRIVER KIND to prove dispatch, symmetric across
  e2e_smoke/e2e_demos)
- orchestrator.test.ts: driverInputs.key -> the d6:tracer-slug tracer,
  slug-ALIGNED across probeKey/serviceSlug/probe_key because the d6 driver
  derives its aggregate side-row slug from input.key (deriveSlug) while the
  loop filters by d6:<serviceSlug> - a mismatched tracer would surface the
  side row as a phantom cell; pass-through proof kept (aggregateKey echoes
  the tracer) and strengthened with the "no D5 features declared" signal pin
…— supplemental signal fetch for aggregate rows (CF7-F3 #1)

decodeCellCommError (cell-model.ts) derives the REQ-B unreachable/
pending overlay from row.signal, but the bulk initial fetch projects
STATUS_LIST_FIELDS, which omits signal (useLiveStatus.ts /
live-status.ts:STATUS_LIST_FIELDS) — so on every page refresh rows
materialized with signal undefined and ACTIVE overlays vanished until
an SSE delta happened to re-deliver that row.

Fix option (a) — matching the projection's data-volume rationale (the
signal blob is ~61% of the bulk payload): useLiveStatus now issues a
SUPPLEMENTAL initial fetch, concurrent with the bulk pages, of ONLY
the comm-error candidate aggregate rows (key has no /<featureId>
segment) for the four mirror dimensions, WITH signal, and merges them
over their projected bulk twins by key. That is ~4 rows per
integration, so the bulk projection's first-paint win is preserved.
Per-cell rows under the same dimensions carry heavy parity-diff
signals and are deliberately not re-fetched (a stale per-cell comm
error is only a same/lower-severity tie-break candidate against the
aggregate mirror).

- live-status.ts: new FLEET_COMM_AGGREGATE_DIMENSIONS single source of
  truth (d6/d4/e2e-demos/d5-single-pill-e2e); STATUS_LIST_FIELDS doc
  updated to the truth (buildCellModel reads signal per cell at render;
  the old "only ever read in the drilldown" claim was false).
- cell-model.ts: decodeCellCommError derives its aggregate candidates
  from the shared constant (scan order preserved; pinned by the
  equal-timestamp tie-break tests).
- useLiveStatus.ts: fetchCommAggregateRows + by-key merge; skipped
  entirely for dimension scopes outside the aggregate set; supplemental
  failure retries through the same connect() chain (fail loud).
- useLiveStatus.test.tsx: the PB mock now honours the fields projection
  (returning full rows for the projected bulk fetch is exactly how this
  bug stayed invisible to the suite) and serves the supplemental fetch
  from a dedicated fixture; new cold-fetch red-green tests assert the
  overlay renders end-to-end with NO SSE delta, the narrow filter
  shape, the out-of-set skip, and the in-set narrowing.
- live-status.test.ts: formatter pass on the CF7-F3 #5 test added in
  the previous commit (oxfmt).
…gray, never green (CF7-F3 #2)

The D1-D4 gate fires only on d3.exists/d4.exists, so a cell with ONLY
green D5/D6 rows (no e2e/chat/tools rows at all) slipped past it and
rendered a green chip + green d6Effective at achievedDepth=0/
ceilingDepth=0 — a false top-of-ladder claim contradicting the
strictness doctrine (PRESENT-but-null D4 grays; D5-no-data grays the
ladder). A wholly absent D3/D4 family now collapses to the gray
"unverified" chip (same shape as the d4NoData collapse) with red-D5/D6
dominance preserved, and d6Effective stays blocked (null).

cell-model.ts:847-852 (gate) / :905-921 (d6Effective).

One existing fixture (amber pass-through under reclaimed-pending) built
its amber from an absent-D3/D4 map; it now carries green e2e/chat rows
so the chip is genuinely amber through an intact ladder — the test's
never-mask assertion is unchanged.
…s treated as stale, not pinned (CF7-F3 #4)

decodeCellCommError's staleness gate (cell-model.ts:697) compared only
`now - parsed > staleAfterMs`, which is never true for a future-dated
observedAt — clock skew or a corrupt producer timestamp would pin the
unreachable/pending overlay indefinitely, the same permanent-phantom
failure mode the FF7 unparseable-timestamp skip prevents. A timestamp
more than COMM_ERROR_FUTURE_SKEW_TOLERANCE_MS (5min) ahead of now is
now skipped like an unparseable one; skew within tolerance still
surfaces (pinned by a companion test so the guard can't over-correct).
…tale and the comm-error staleness gate (CF7-F3 #3)

staleness.ts isStale treats an unparseable observed_at as NOT stale
(false-stale would downgrade a live green row), while the FF7 gate in
decodeCellCommError treats unparseable as stale/skip (false-not-stale
would pin an uncleared overlay forever). isStale predates this branch
(blame: d0da6e3, pre-existing on main; untouched here), so per the
blame gate it is left as-is and the divergence is documented at the
FF7 site instead. Reported for the ledger.
…ise + comment truth (CF7-F3 #5)

- mergeRowsToMap's disjoint-key divergence warn no longer fires on a
  signal undefined⇄defined flip between row groups (live-status.ts:
  coreRowFieldsEqual split out of rowsAreNoop): the initial fetch
  projects signal away while SSE deltas deliver full rows, so the flip
  is expected provenance, not a keyspace violation. upsertByKey's
  reducer keeps treating the flip as observable (existing tests pin it).
- __tests__/cell-model.test.ts destructure comment no longer claims
  noUncheckedIndexedAccess is enabled (it is not in this package's
  tsconfig) nor that the sibling matched (it did not).
- src/lib/cell-model.test.ts row() helper aligned to the
  destructure-with-fallback shape the comment describes.
- cell-model.ts:29-31 re-export rationale now cites the actual
  importer (__tests__/cell-model.test.ts).
…unparseable heartbeats warned AND counted per cycle

The S10 caller's ad-hoc raw Date.parse check could disagree with
isWorkerStale's PB-space-form-normalized parser (engine-lenient vs
anchored), so the unparseable-heartbeat warn did not fire precisely when
the staleness check was blind. Wire the F2-exported heartbeatParseable
companion (contracts.ts documents fleet-health as its intended caller)
and surface a per-cycle unparseableHeartbeats count on the
fleet.health.cycle log — red-green pinned (the count was the new
observable; the cycle log previously never fired for a blind-but-online
corrupt row).
…n the live-status mirror

The harness contract gained statusSignalHasCommErrorKey (REQ-B
version-skew observability) with its dashboard sibling explicitly left
to the dashboard owner. Add the byte-identity-safe companion to
live-status.ts — placed OUTSIDE the commErrorFromStatusSignal region
pinned by commError-contract-drift.test.ts (only the decode function
source is mirrored; proven by the drift suite staying green) — so
dashboard consumers can distinguish a present-but-undecodable overlay
from a genuinely absent one. Unit-pinned: unknown future kind,
well-formed, absent, and array-expando wire shapes.
…ong-expired carve-out

Sibling of the queue-client prose fix (CF7 #10), which flagged this
contract doc as describing only the drain phase: despite the name, the
lease phase's long-expired carve-out also claim-deletes claimed/running
rows (stale created-age, long-expired or unparseable lease) into this
count — no re-queue, no comm error, no reclaimed increment.
… grafts older signal (CF8 F3)

The cold-load comm-error supplemental fetch runs CONCURRENTLY with the bulk
pages, so the bulk copy of an aggregate row can be NEWER than the supplemental
snapshot (the row's state changed between the two reads). The previous merge
replaced the bulk row unconditionally — regressing state/observed_at and
potentially fail_count back to the older supplemental values until the row's
next SSE delta (long for slow-cadence aggregates).

Add a freshness guard: when the supplemental row is strictly older (by
observed_at), keep the newer bulk row INTACT — signal-less rather than
chimera (newer core + stale signal). A chimera row would be silently swallowed
by the reducer's signal-PRESENCE no-op check; a signal-less bulk row lets
the next SSE delta restore the real current signal via the
undefined→defined presence flip.

Equal timestamps and unparseable timestamps both prefer the supplemental
(signal-bearing) row — only POSITIVELY-stale supplemental is suppressed,
preserving the cold-load comm-error overlay intent of CF7-F3 #1.
… tick-result doc reconciliations (Procedure 3 promotions)

PROMOTE_TO_A (defense-in-depth, exploit-class):
- fleet-health.ts reclaim list interpolated workerId raw into the PB filter
  literal. workerId is DB-sourced (read back from the workers roster row),
  not a compile-time constant, and the same field is escaped via JSON.stringify
  at orchestrator.ts:3240 — but the reclaim path was missing the same
  hardening. A double-quote in worker_id (corrupt row, buggy self-registration)
  would either throw the list (silently skipping this worker's reclaim every
  cycle) or widen the filter to claim other workers' jobs. Match the sibling
  escape pattern.

PROMOTE_TO_B (doc reconciliations exposed by the CF round-8 audit):
- queue-client.ts COUNT-NAME CAVEAT was stale — the cross-referenced
  contracts.ts doc was already updated (commit 80c5c94) but the queue-client
  side still asked a future maintainer to make the edit that had already
  landed.
- WarmHealthConfig + JobProducerOptions.warmHealth docs said the producer
  warms 'every enumerated backend' / 'each enumerated spec'; the implementation
  warms gate.specs (post-validation, post-backlog-gate). A fully-backlogged
  tick warms nothing. Updated both interface-level docs to match.
- TickResult.reclaimedIndeterminate said 'Of reclaimed, the reclaims...' —
  but the field is DISJOINT from reclaimed (sibling SweepResult contract +
  the queue-client both state a thrown release lands here exclusively).
  Rewrote to 'In addition to reclaimed, ...'.
- TickResult.skippedForBacklog doc named only the dedupe-gate contributor;
  the in-function comment correctly documents the fail-CLOSED poisoned-count
  fold-in. Expanded the field doc to name both contributors, and to clarify
  that the fail-OPEN leg lands in backlogGateFailedOpen separately.
- SweepResult.commErrors pairing equation
  (commErrors.length === reclaimed + reclaimedIndeterminate) was asserted
  unconditionally on the shared contract, but reclaimedIndeterminate is
  optional and fakes may not report the split. Scoped to 'implementations
  that report the split'.
…see the D4 rung

Mirrors cell-model resolveD4 fold semantics (worst-state-wins, 1h stale
window, rank-based missing-chat collapse, chat-wins tie-break pinned by
row-identity assertions); d4 is informational — rollup contributors
unchanged.
…and scopes the rollup line honestly

D4 row inserted with worst-state strictness; e2e relabeled "E2E (Demo)"
atomically (label-derived testids); rollup line relabeled "Service
(health + e2e)"; headline regression pins pill-red <-> visible red popup
row via buildCellModel.chipColor cross-assert; green-badge tests
FRESH-pinned.
…rid, legacy cells, and legend

Grid d3 badge API->E2E, legacy e2e badge RT->E2E, legend D6 "Parity
(PR)"->"Parity (Reference)", legend D4 chip copy 6h->1h (real window);
d4 grid "RT" and d2 "API" unchanged.
The auth-middleware-presence regex in queue-client.test.ts hook-parity
suite was anchored to the single-line `}, $apis.requireAdminAuth());`
closer. After oxfmt rewrote fleet-claim.pb.js to its multi-line form
(`},\n  $apis.requireAdminAuth(),\n);`) the regex stopped matching
and the test asserted 0 routes were guarded — a false alarm.

Broaden the regex to accept both the single-line closer and the
formatter's split form; the structural intent (each routerAdd
handler-end is followed by the requireAdminAuth middleware) is
unchanged.

This branch was successfully deployed

5 active and 1 inactive deployments
Preview – travel — b074a47c Deployed Jun 12, 2026 by vercel[bot]
Preview – research-canvas — b074a47c Deployed Jun 12, 2026 by vercel[bot]
Preview – docs — b074a47c Deployed Jun 12, 2026 by vercel[bot]
Preview – form-filling — b074a47c Deployed Jun 12, 2026 by vercel[bot]
Preview – chat-with-your-data — b074a47c Deployed Jun 12, 2026 by vercel[bot]
npm — b074a47c Deployed Jun 12, 2026 by jpr5 via build #6514
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.

1 participant