Skip to content

fix(server): a newer run no longer drops a queued model alert - #105

Closed
nullStack65 wants to merge 1 commit into
release/native-0.1.10from
fix/delegated-model-substitution-alert
Closed

nullStack65 wants to merge 1 commit into
release/native-0.1.10from
fix/delegated-model-substitution-alert

Conversation

@nullStack65

Copy link
Copy Markdown
Owner

Why

release/native-0.1.10 at c77129892d (the squash merge of #100, one Lead alert per usage-limit incident) fails "T3 fork ARC CI" › "Voice + founder inbox (Linux ARC)", so the fleet drift check does not qualify it (failing job). One test fails: DelegatedCompletionDelivery.test.ts › "alerts the watcher and the parent once when a child ran another model". The watcher gets no model alert.

This is a real regression, not a flaky test. It fails 3 of 3 runs locally at c77129892d, and the parent c251f5c105 was green on the same job.

Cause

#100 added a check at delivery time (currentAlert → alertIsStale) that drops an alert once its thread has a newer run that is running or finished. Model alerts (model-degraded) went through it too. A later run with the same problem is kept quiet on purpose: recordModelAlert sends one alert per signature, and the message says "That thread sends no further alert until the problem changes". In the test the child's second run is on the same fallback model and completes. That second run made the first run's alert stale, and the second run itself raised nothing, so the alert was lost.

Neither #100's description nor its tests say that a newer run should cancel a model alert. Its stated goals are usage-limit incidents and threads that come back after a reset. The only model-alert staleness #100 tests covers settled threads and threads that changed provider. So I changed the code, not the test.

Change

In currentAlert, a model alert skips only the newer-run check. It is still dropped when its thread is gone, archived, settled, on another provider, or replaced by its parent. Usage-limit incident members and thread-event alerts keep the newer-run check unchanged.

Verification (r720)

  • The failing test now passes 3 of 3 runs.
  • DelegatedCompletionDelivery, ModelAlertReactor and ThreadLaunchService tests: 167 pass.
  • All 10 apps/server test files in the ARC job's list: 425 pass.
  • vp run --filter t3 typecheck: exit 0. vp fmt --check on the changed file passes.
  • Not run locally: the web and contracts test files in the ARC job, because the root-level multi-project vitest config fails to load on r720 (ERR_UNKNOWN_FILE_EXTENSION for packages/shared/src/devProxy.ts). That is a local environment problem, and this diff does not touch those packages. ARC CI on this PR covers them.

🤖 Generated with Claude Code

PR #100 added a delivery-time staleness check that drops an alert once its
thread has a newer run that runs or finished. Model alerts went through it
too. A later run with the same problem is kept quiet on purpose (one alert per
signature), so the first run's model-substitution alert was dropped and the
watcher never heard it. Model alerts still drop when the thread is gone,
archived, settled, on another provider or replaced by its parent; only the
newer-run check is skipped for them. Usage-limit incidents and thread events
keep it.

Fixes DelegatedCompletionDelivery "alerts the watcher and the parent once
when a child ran another model", failing in T3 fork ARC CI since #100.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nullStack65

Copy link
Copy Markdown
Owner Author

Closing as superseded by #104 (merged 17:42Z as 0c36304), which fixes the same regression from #100. #104 makes model alerts skip the newer-run staleness check, as this PR does, and also drops the alert once a healthy run clears the degraded mark, with a unit test. This PR was opened after #104 had merged, so it is a duplicate and would conflict.

@nullStack65
nullStack65 deleted the fix/delegated-model-substitution-alert branch November 19, 2026 17:47
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