Skip to content

fix(director): ignore empty source ids in live source tracking - #1056

Merged
TheGreatAxios merged 2 commits into
cl-7918-chat-director-resolve-getproviderid-and-getlivefleetcountfrom
cl-7973-pin-source-tracking-edge-cases-with-regression-tests
Sep 15, 2026
Merged

TheGreatAxios merged 2 commits into
cl-7918-chat-director-resolve-getproviderid-and-getlivefleetcountfrom
cl-7973-pin-source-tracking-edge-cases-with-regression-tests

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

Guards the ChatDirector live source-id tracking so an empty-string source id on a completion or cycle source never clobbers the learned id, and pins four tracking edge cases with regression tests: sourceless-completion-no-wipe, cycle-source-only remap on a non-inference event, drained-fleet terminal-wait pin, and contradictory event-vs-cycle-source precedence (cycle source wins).

Verification

  • New pins fail pre-fix on the empty-string case (confirmed red), pass post-fix.
  • Full suite: 7393 pass, 0 fail across 511 files (seeded).
  • bun run lint, typecheck, build, and the projects-dir guard all pass.

Fixes CL-7973

An empty-string source id on a completion or cycle source no longer clobbers the learned source id used to stamp retry decisions.
@linear-code

linear-code Bot commented Sep 14, 2026

Copy link
Copy Markdown

CL-7973

@TheGreatAxios
TheGreatAxios merged commit ed1fd79 into cl-7918-chat-director-resolve-getproviderid-and-getlivefleetcount Sep 15, 2026
13 checks passed
TheGreatAxios added a commit that referenced this pull request Sep 15, 2026
…sures (#1044)

* feat(director): resolve getProviderId and getLiveFleetCount without host closures (CL-7918)

Decision record:
- getProviderId -> reactor-supplied. Retry stamping needs the live source
  id so mid-session /model switches remap (xAI bare-429 retry vs abort).
  Neither static config (loses remap liveness) nor BaseEnv.sources
  (carries definitions, not the live selected id) suffice. The director
  now seeds from options.provider.providerName and refreshes the stamped
  id from each inference completion's source.sourceId; BaseEnv.sources
  remains the fallback only until the first completion stamps it.
- getLiveFleetCount -> static config allowIdleWithFleet (default false).
  Live counts only ever gated one boolean (non-zero allows terminal
  wait/reply with open tasks); the exact count was never consumed.
  Rejected: BaseEnv-derived (no fleet state there) and reactor-supplied
  (the reactor owns no fleet-lane registry; a live count closure just
  re-adds the host hook this lane removes). TUI chat sets
  allowIdleWithFleet: true (fleet lanes may appear mid-session); exec and
  the default keep the historical nudge-while-open behavior. Static true
  is strictly more permissive than the old count>0 gate once a fleet
  lane drains, which is the safe direction for terminal wait.

Both closures removed from ChatDirectorOptions. No new env key.
Mid-session /model remap and idle-with-fleet behavior covered by
src/director.test.ts (remap abort->retry across a source switch;
idle-with-fleet terminal wait without nudge spend).

* fix(director): ignore empty source ids in live source tracking (#1056)

* fix(director): ignore empty source ids in live source tracking

An empty-string source id on a completion or cycle source no longer clobbers the learned source id used to stamp retry decisions.

* docs(director): align cycle-source comment with override precedence (#1057)

* feat(director): liven idle-with-fleet flag and decouple host from workflow seam typing (#1048)

* feat(director): liven idle-with-fleet flag and decouple host from workflow seam typing

Summary: optionalize the host-to-runtime workflow seam so the host degrades gracefully against directors without workflow support; replace the static idle-with-fleet seed with a live narrow setter driven by fleet-wake publisher transitions. Verification: bun run check passes (7393 tests, 0 fail).

* fix(tui): re-sync idle-with-fleet flag on director rebuilds (#1058)
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