Skip to content

Integrate final v1.11.3 Runtime protocol fixes - #797

Draft
Y1fe1Zh0u wants to merge 8 commits into
mainfrom
v1.11.3-test-final
Draft

Integrate final v1.11.3 Runtime protocol fixes#797
Y1fe1Zh0u wants to merge 8 commits into
mainfrom
v1.11.3-test-final

Conversation

@Y1fe1Zh0u

Copy link
Copy Markdown
Collaborator

Summary

Integrates the three pending v1.11.3 fixes on a fresh branch from current main:

This is the same integration commit as #796, now published from a branch inside dataelement/Clawith so Drone can fetch the PR head during clone.

The only merge conflict was in builtin_tool_definitions.py; the resolution keeps #793's removal of the finish-tool seed and #795's 6,000-character write limit.

Validation

  • Backend full suite: 2,121 passed; 2 environment-only failures because local WeasyPrint cannot load libgobject-2.0-0
  • Frontend tests: 85 passed
  • Frontend production build: passed
  • Python compileall: passed
  • Upgrade CI script syntax: passed under sh, bash, and dash
  • git diff --check: passed
  • All three PR heads are ancestors of this integration branch

Remaining verification

  • Final CI/Drone run on this same-repository PR
  • Live provider and port 3010 end-to-end verification

Supersedes #796 for CI checkout purposes.

Related: #793, #794, #795, #796

Private Runs now complete from normal Assistant content and normalized provider stop reasons. Group Runs stage structured mentions through the dedicated at tool before the existing handoff preflight, keeping public text separate from routing intent.

Constraint: Preserve one-version compatibility for legacy finish checkpoints while removing finish from new model-visible tool schemas

Rejected: Parse arbitrary final-answer text as control JSON | would corrupt legitimate user-requested JSON responses

Confidence: high

Scope-risk: broad

Reversibility: clean

Directive: Keep Assistant content, provider termination, Group mention intent, and delivery side effects as separate contracts

Tested: 164 focused backend tests; git diff --check

Not-tested: Real provider and live Group child-Run E2E
Normalize embedded reasoning and exact textual tool structures before Runtime completion can publish them. Legacy Group finish JSON is decoded through the existing validation and handoff path, while unverified textual results receive one bounded repair instead of being shown as executed output. Ordinary user-requested JSON remains untouched.

Constraint: Thinking must use the existing reasoning channel and tool activity must use real tool events.

Rejected: Strip all JSON-looking output | would corrupt legitimate JSON answers and still bypass tool execution.

Confidence: high

Scope-risk: moderate

Directive: Do not broaden JSON detection without preserving ordinary user-requested JSON responses.

Tested: 2117 backend pytest tests; focused Ruff checks; git diff --check

Not-tested: Live provider and browser E2E
The upgrade test previously special-cased v1.11.2 and let the target image migrate beyond the source image's known Alembic graph. Discover the source image heads and only use target migration code to repair to that boundary when source bootstrap fails.

Constraint: The upgrade source is selected dynamically from the previous release tag
Rejected: Pin a known revision | breaks when the previous release changes
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Never expose target-only revisions to the source image before source assertions complete
Tested: sh -n; bash -n; Alembic head and history resolution; git diff --check
Not-tested: Full Docker upgrade workflow because the local Docker daemon is unavailable
Derive source heads and their direct parents from the source image, commit the historical parent schema with source migrations, and permit target code to replace only a changed source-head migration. Verify the stored Alembic heads before starting the source app without bootstrap.

Constraint: Target Base.metadata must never bootstrap the source-version database
Rejected: Retry the target image from an empty database | fabricates target schema at a source revision
Rejected: Run every revision in a separate container | preserves boundaries but adds unnecessary CI startup overhead
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep target migrations behind a committed source-schema boundary
Tested: sh, bash, and dash syntax; 17 scoped pytest tests; v1.11.2 graph and digest resolution; git diff check
Not-tested: Full Docker upgrade workflow because the local Docker daemon is unavailable
Bound write_file payloads to 6000 characters and expose an explicit overwrite/append contract so models recover from truncated tool arguments with small sequential writes. Preserve the existing write_file-specific retry identity and optimistic workspace concurrency while appending.

Constraint: Provider tool arguments can truncate before JSON parsing or tool execution

Rejected: Retry the same oversized whole-file call | repeats the transport failure without progress

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Keep each append call independently bounded and preserve workspace version checks

Tested: 128 focused backend tests; scoped Ruff; git diff --check

Not-tested: Real Qwen 3.6 Plus provider run; full backend suite
Integrate PR #794 before Runtime protocol changes so the combined branch validates upgrades against the source image schema boundary.

Constraint: The integration must preserve source-version Alembic ownership
Confidence: high
Scope-risk: narrow
Reversibility: clean
Tested: PR #794 Drone build 395 passed
Related: #794
Integrate PR #793 so ordinary Assistant content terminates naturally, Group mentions stage through at, and protocol envelopes cannot leak into published answers.

Constraint: Preserve legacy finish checkpoint compatibility during the transition
Confidence: high
Scope-risk: broad
Reversibility: clean
Tested: PR branch recorded 2117 backend tests and 85 frontend tests
Not-tested: Final combined live provider E2E
Related: #793
Integrate PR #795 after natural completion so write_file enforces bounded chunks and safe append semantics without reintroducing model-visible finish control.

Constraint: Preserve PR #793 completion semantics and PR #771 bounded repair identity
Confidence: high
Scope-risk: moderate
Reversibility: clean
Tested: PR branch 128 focused backend tests and scoped Ruff
Not-tested: Final combined live Qwen E2E
Related: #795 #793 #771

# Conflicts:
#	backend/app/services/builtin_tool_definitions.py
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