Skip to content

fix: preserve background notifications after end_turn#149

Open
Gujiassh wants to merge 4 commits intoshareAI-lab:mainfrom
Gujiassh:fix/background-task-notifications-clean
Open

fix: preserve background notifications after end_turn#149
Gujiassh wants to merge 4 commits intoshareAI-lab:mainfrom
Gujiassh:fix/background-task-notifications-clean

Conversation

@Gujiassh
Copy link
Copy Markdown
Contributor

Summary

  • keep the s08 and s_full loops alive until queued background task notifications are actually delivered after an end_turn
  • preserve the existing no-assistant-ack message ordering from current main while still injecting the background results as a user block
  • add focused regression tests for both entrypoints

End-user benefit

When a long-running background command finishes right after the model returns end_turn, the current examples can exit before the result is ever surfaced back into the conversation. This change makes the background result reliably show up in the transcript instead of silently disappearing.

Testing

  • python -m pytest tests/test_background_notifications.py -q
  • python -m py_compile agents/s08_background_tasks.py agents/s_full.py tests/test_background_notifications.py

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

@Gujiassh is attempting to deploy a commit to the crazyboym's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Gujiassh Gujiassh force-pushed the fix/background-task-notifications-clean branch from 86a75cd to f2621a4 Compare March 29, 2026 20:08
@Gujiassh
Copy link
Copy Markdown
Contributor Author

Follow-up note: this branch was rebuilt from current main around the background-notification wait logic, and the focused regression checks pass locally (python -m pytest tests/test_background_notifications.py -q, python -m py_compile agents/s08_background_tasks.py agents/s_full.py tests/test_background_notifications.py). The visible GitHub blockers remain the two Vercel team-authorization statuses; code-side failures are not currently showing on this branch.

@Gujiassh Gujiassh force-pushed the fix/background-task-notifications-clean branch from f2621a4 to 51f1157 Compare March 29, 2026 20:20
@Gujiassh
Copy link
Copy Markdown
Contributor Author

Follow-up note: I rebuilt this branch again from the latest available main snapshot, preserved the no-assistant-ack contract, and reran the focused background notification regression checks locally (python -m pytest tests/test_background_notifications.py -q, python -m py_compile agents/s08_background_tasks.py agents/s_full.py tests/test_background_notifications.py). The visible GitHub blockers remain the two Vercel team-authorization statuses.

@Gujiassh
Copy link
Copy Markdown
Contributor Author

Status update: after the latest refresh, this branch still has no visible code-side CI failures. The only remaining blockers are the two Vercel team-authorization statuses on the project account side.

@Gujiassh Gujiassh force-pushed the fix/background-task-notifications-clean branch from 51f1157 to e62d5ae Compare March 30, 2026 16:32
@Gujiassh
Copy link
Copy Markdown
Contributor Author

Follow-up note: I rebuilt this branch once more directly on top of the latest current main, so it now carries only the background-notification wait fix and its focused regression tests. The refreshed head is e62d5ae7d, and the only visible blockers should remain the Vercel team-authorization statuses.

@Gujiassh Gujiassh force-pushed the fix/background-task-notifications-clean branch from e62d5ae to 9fc952c Compare April 4, 2026 08:29
@Gujiassh
Copy link
Copy Markdown
Contributor Author

Gujiassh commented Apr 4, 2026

Status update: this branch has now been refreshed on top of the current main head (). The remaining visible blockers are still the Vercel team-authorization statuses; there is no newly surfaced code-side failure on the branch itself.

@Gujiassh
Copy link
Copy Markdown
Contributor Author

Gujiassh commented Apr 4, 2026

Correction to the previous note: this branch is now refreshed on top of the current main head. The remaining visible blockers are still only the Vercel team-authorization statuses; no new code-side failure appeared after the refresh.

@Gujiassh
Copy link
Copy Markdown
Contributor Author

Gujiassh commented Apr 6, 2026

Refreshed this branch onto the latest main and reverified the branch tip on the refreshed worktree.

Local verification after the refresh:

  • python -m unittest tests.test_background_notifications2 passed
  • cd web && npm ci && npm run build → passed

The background-task notification fix is still intact on the refreshed branch. The remaining failing PR checks appear to be the same external Vercel authorization gates, not a code regression on this branch.

…clean' into fix/background-task-notifications-clean
@Gujiassh
Copy link
Copy Markdown
Contributor Author

Gujiassh commented Apr 6, 2026

Follow-up: the refreshed branch is now pushed too, and it includes the fork branch reconciliation as well.

Re-run after that reconciliation:

  • python -m unittest tests.test_background_notifications2 passed
  • cd web && npm run build → passed

So the branch is refreshed, reconciled, and still locally green. The remaining red checks still look like the same external Vercel authorization gates rather than a regression on the branch.

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