Skip to content

feat(btw): deliver background results to the originating request - #138

Merged
BegoniaHe merged 3 commits into
split/btw-work-runtimefrom
split/btw-result-delivery
Sep 10, 2026
Merged

BegoniaHe merged 3 commits into
split/btw-work-runtimefrom
split/btw-result-delivery

Conversation

@YUZHEthefool

@YUZHEthefool YUZHEthefool commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

Wire detached work to response decoration and delivery without ending the originating WebChat request at acknowledgement. Keep per-request output/statistics identity and release events/files on completion, failure, or cancellation.

Related issue

Related: #126
Parent: #122
Design: #28

Stack

  • Base: split/btw-work-runtime. Depends on PR #137.
  • Follow-up PRs: #139.

Behavior

Deliver background results through the existing response decoration and sending stages, preserving the originating request identity. Release temporary files and event registrations after completion, failure, or cancellation.

Non-goals

A new HTTP protocol, a session-wide busy flag, or a separate response pipeline is not required.

Implementation notes

Base branch: split/btw-work-runtime. Depends on PR #137. This PR shows only this feature's changes relative to that dependency. The original prototype at 33ee103a62937db3e930c89ba47a648b75cc7772 is provenance; integration follows current master's owners and authorization contracts. The parent issue records review/integration order.

No new HTTP contract or dependency changes. Feature settings and behavior are documented in both languages.

Validation

91 focused delivery, work, scheduler, lifecycle and internal-agent tests passed initially. After integrating B1 metadata and narrowing the scheduler cleanup awaitable, 70 related tests passed; the complete CI quality Pyright project passed with the Linux platform model.

Python checks used the existing Python 3.14.1 environment with python -m pytest and task-local --basetemp directories. Local Node was 24.11.1; CI must validate the pinned toolchain. Relevant scoped formatting and Markdown checks were run. The root tracker records the final combined validation. No live model evaluation is implied by deterministic tests or documentation checks.

Compatibility and risk

Depends on B3. Real scheduler plus WebChat emitter/queue tests cover concurrent request IDs, cancellation before startup, delivery failure, and closed-loop admission. Profile work closes before transport/runtime dependencies. No real provider or live IM was used.

Checklist

  • A corresponding development Issue exists and this PR contains one feature or experiment.
  • Tests and bilingual documentation accompany the change, or missing experimental implementation is explicitly described.
  • Existing authorization, current APIs/configuration, Python 3.14+, and integrated documentation constraints are retained.
  • No dependencies, credentials, generated site output, or fork publication claims are introduced.
  • A human maintainer review and separate AI-assisted review have approved merging.

Repository references: AGENTS.md, GOVERNANCE.md, AI_POLICY.md, and the feat PR template.

Agent note

Codex prepared this PR at the user's request to split the original #28 implementation into reviewable features, with only classifier experiments marked as drafts. AI assisted extraction, current-path adaptation, tests, and English descriptions. The validation above was performed locally; remaining limitations are stated explicitly. This note is not a maintainer approval. No PR has been merged.

@xero-team-bot

xero-team-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

⚠️ This PR conflicts with its base branch and needs a rebase.

git fetch origin split/btw-work-runtime
git rebase origin/split/btw-work-runtime
# after resolving the conflicts
git push --force-with-lease

The needs-rebase label is removed automatically once the conflicts are gone.
(Xero-Team/AstrBot · detected by xero-bot)

YUZHEthefool and others added 3 commits September 10, 2026 21:23
Keep request-scoped WebChat delivery open until work completes and
reclaim profile tasks before their runtime dependencies close.

Related: #126
AI-Generated: true
Generated-At: 2026-09-10T15:51:37Z
AI-Generated: true
Generated-At: 2026-09-10T19:20:50Z
AI-Generated: true
Generated-At: 2026-09-10T19:24:44Z
@BegoniaHe
BegoniaHe force-pushed the split/btw-result-delivery branch from 76785fd to 075a270 Compare September 10, 2026 19:24
@xero-team-bot

xero-team-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

✅ Conflicts resolved; removing the needs-rebase label.

@BegoniaHe
BegoniaHe merged commit 037994e into master Sep 10, 2026
3 of 25 checks passed
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.

feat(btw): deliver background results to the originating request

2 participants