Skip to content

Harden v1.11.2 runtime and E2E regressions#777

Merged
Y1fe1Zh0u merged 7 commits into
dataelement:v1.11.2-testfrom
Y1fe1Zh0u:fix/v1.11.2-e2e-regressions
Jul 23, 2026
Merged

Harden v1.11.2 runtime and E2E regressions#777
Y1fe1Zh0u merged 7 commits into
dataelement:v1.11.2-testfrom
Y1fe1Zh0u:fix/v1.11.2-e2e-regressions

Conversation

@Y1fe1Zh0u

Copy link
Copy Markdown
Collaborator

Summary

This PR consolidates the fixes found while running the PR #765#774 regression suite against v1.11.2-test.

  • keep saved, enabled, tenant-valid models usable regardless of tool-probe results, while excluding logically deleted models and refreshing model choices across tabs
  • harden Group workspace format validation, binary previews/downloads, cross-group isolation, download audit records, and multi-image message rendering
  • preserve safe, traceable Runtime failures and stop deterministic compact/input-budget errors from exhausting reconciliation retries
  • exclude deleted or inactive group-only sessions from background compaction and keep schedule/runtime terminal behavior idempotent
  • remove the duplicated persistent Group acknowledgement while retaining the transient running animation
  • keep simple multi-Agent greetings fast, preserve the Planning-to-entry animation, reject self-handoffs, and require planned collaboration to remain public in the group
  • normalize ambiguous multi-Agent requests into explicit Agent-to-responsibility assignments before Planning schedules work

Root cause

The merged test branch exposed several contract mismatches between persisted model state, frontend caches, Runtime eligibility, Group delivery, background scanning, and UI status rendering. Planning also relied on soft semantic interpretation without first freezing explicit mention-local responsibility assignments, which allowed roles to be reversed or routed through private A2A.

The fixes keep the existing Runtime and Group collaboration architecture, but align each boundary with the persisted source of truth and make deterministic failures terminal and observable.

User impact

  • deleted models and Agents no longer remain active candidates
  • saved enabled models remain selectable even when tool support is unverified
  • model list changes propagate to already-open Chat tabs
  • Group files and images preserve expected formats, isolation, previews, and audit behavior
  • Runtime failures show safe diagnostics instead of raw Provider payloads or reconciliation exhaustion
  • Group collaboration remains visible in the group and follows the human's explicit Agent assignments
  • Group greetings avoid unnecessary long-form Planning

Validation

  • Backend: 2064 passed
  • Frontend contracts: 85 passed
  • Frontend: TypeScript + Vite production build passed
  • Ruff on changed Backend files passed
  • git diff --check passed
  • deployed to the 3010 test environment at commit d7030db3796b8254cc805f808df9dc62f2ea7a34
  • 3010 Backend health: healthy, restart count 0
  • product manual regression passed: multi-Agent greeting, explicit sequential collaboration, Group creation/UUID isolation, Group Workspace basics, multi-image Direct Chat, model selection/cache, announcements, and Agent deletion

Not tested in the final product click-through

  • Planning failure presentation
  • Workspace rejection and cross-group isolation
  • model deletion fallback
  • Schedule automatic execution and duplicate prevention

These paths have automated or earlier E2E evidence in this branch, but were not repeated in the final product-owner click-through.

The intentionally deferred extreme boundaries remain: real giant multi-image context overflow, application-level uncaught HTTP 500 injection, one-success/one-failure Group execution, and announcement updates during an already-running Run.

The merged regression candidate exposed model lifecycle, group workspace, runtime terminal-state, logging, multimodal, scheduling, and acknowledgement failures that could not be accepted independently. Keep the fixes together as one deployable 3010 verification candidate based on upstream/v1.11.2-test.

Constraint: Tool capability probes are diagnostic only; saved enabled tenant-valid models must remain runnable.

Rejected: Keep the group ACK beside the live typing indicator | duplicates the same progress signal.

Confidence: high

Scope-risk: broad

Reversibility: clean

Directive: Do not restore supports_tool_calling as a Chat, Agent Runtime, Group planning, or context eligibility gate.

Tested: backend 2056 tests; frontend 84 tests and production build; scoped Ruff; diff check; Qwen single-image and multi-image E2E on the pre-fix deployment.

Not-tested: deployed fix candidate; controlled context overflow; deterministic provider protocol exhaustion; restart-boundary scheduling.
Exclude deleted or inactive group-only sessions from background compact scanning, preserve invalid compact-budget errors as deterministic terminal failures, and align runtime model guidance with the saved-enabled model policy.

Constraint: Tool probes are diagnostic and must not gate saved enabled models.

Rejected: Retry invalid compact budgets through reconciliation | the same capability error cannot succeed on retry

Confidence: high

Scope-risk: narrow

Directive: Keep background group compaction scoped to live groups with at least one active eligible Agent.

Tested: Backend 2057 tests; frontend 84 tests; frontend production build; Ruff and git diff check

Not-tested: Live 3010 verification occurs after deployment
Live 3010 verification showed that RuntimeModelStepService computes the request budget while loading compact inputs, before the compactor's model-specific budget helper. Convert that capability error at the outer compactor boundary so the command worker records the original deterministic code instead of exhausting reconciliation retries.

Constraint: Direct Chat compaction loads the complete business-request budget before evaluating the compact watermark.

Rejected: Catch only in RuntimeModelStepService | the compactor port should normalize capability failures from any input loader implementation

Confidence: high

Scope-risk: narrow

Tested: Backend 2058 tests; focused 66 Runtime compactor/worker tests; Ruff and git diff check

Not-tested: Live 3010 retest occurs after deployment
Planning already resolves an active primary, fallback, or tenant-default model before entry scheduling. Reuse that pinned result, and convert deterministic scheduling validation failures into idempotent terminal group deliveries so product reconciliation can settle instead of retrying the same head row forever.

Constraint: Planning checkpoints are immutable and child entry writes must remain all-or-nothing.

Rejected: Require the resolved model to equal the Agent primary model | contradicts the existing fallback/default resolution contract.

Confidence: high

Scope-risk: narrow

Directive: Retry infrastructure and delivery failures, but terminally project deterministic PlanningSchedulingError outcomes.

Tested: 2059 backend tests; 58 related runtime tests; Ruff; git diff --check

Not-tested: Live 3010 multi-Agent E2E before deployment
Multi-Agent greetings were entering the full Planning model path, producing invented analysis and public handoffs while the UI could lose its active-run poll between Planning and entry Runs. Recognize only exact greeting/check-in intents inside Planning, preserve the animation across the scheduling handoff, and reject self-targeted public handoffs before terminal delivery.

Constraint: Complex requests that merely begin with a greeting must continue through the Planning model.

Rejected: Bypass the Planning Run at message intake | would fork the multi-Agent dispatch lifecycle and its observability contract.

Confidence: high

Scope-risk: moderate

Directive: Keep the fast path exact-match and planner-owned; do not broaden it to messages containing task content.

Tested: 2064 backend tests; 85 frontend tests; Ruff; TypeScript and Vite production build

Not-tested: Live 3010 multi-Agent greeting until deployment
A planned sequential group task could still be routed through private A2A when a model ignored the existing public-handoff guidance. Strengthen both Planning and Group Runtime instructions so every assigned Agent owns a public reply, plan transitions name the next public wake, and private delegated results cannot be substituted or attributed as group completion.

Constraint: Preserve the existing group collaboration strategy and tool availability; this is a prompt-only correction.
Rejected: Remove send_message_to_agent from planned Group Runs | broader runtime policy change was explicitly deferred.
Confidence: medium
Scope-risk: narrow
Directive: Keep the prompt and runtime hard-gate questions separate; add enforcement only if prompt-only E2E still routes through private A2A.
Tested: 2064 backend tests; targeted Planning and Model Step tests; Ruff; git diff --check
Not-tested: Live 3010 sequential public-handoff E2E before deployment
Planning now normalizes vague multi-Agent requests into explicit Agent, action, output, and dependency directives before it schedules any work. Mention-local instructions remain bound to their named Agent, and repair attempts must re-check semantics against the original request instead of only repairing JSON.

Constraint: Keep this fix prompt-only; do not alter group collaboration scheduling semantics.

Rejected: Add deterministic parser enforcement | current request is to strengthen the planner prompt first.

Confidence: high

Scope-risk: narrow

Directive: Do not weaken mention-local responsibility binding without a replacement semantic validator.

Tested: 2064 backend tests; Ruff on changed files; git diff check.

Not-tested: Live Provider behavior on 3010 has not been rerun with the new prompt.
@Y1fe1Zh0u
Y1fe1Zh0u marked this pull request as ready for review July 23, 2026 13:26
@Y1fe1Zh0u
Y1fe1Zh0u merged commit 4ae3fe7 into dataelement:v1.11.2-test Jul 23, 2026
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