Repository navigation
refactor(agent): migrate Build session operations to the repository - #46221
Merged
Merged
Conversation
Contributor
Pyrefly Type Coverage
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-11-20 09:27:47.502684274 +0000
+++ /tmp/pyrefly_pr.txt 2026-11-20 09:27:21.458450445 +0000
@@ -4982,55 +4982,55 @@
ERROR Object of class `NoneType` has no attribute `agent_workspace_binding_id` [missing-attribute]
--> tests/unit_tests/services/agent/test_roster_service.py:1527:12
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `AgentIconType | SQLCoreOperations[AgentIconType | None] | None` in function `models.agent.Agent.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:2576:19
+ --> tests/unit_tests/services/agent/test_roster_service.py:2427:19
ERROR Argument `Literal['emoji']` is not assignable to parameter `icon_type` with type `AgentIconType | SQLCoreOperations[AgentIconType | None] | None` in function `models.agent.Agent.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:2732:19
+ --> tests/unit_tests/services/agent/test_roster_service.py:2583:19
ERROR Object of class `object` has no attribute `prompt` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:3152:12
+ --> tests/unit_tests/services/agent/test_roster_service.py:3003:12
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/services/agent/test_roster_service.py:3343:12
+ --> tests/unit_tests/services/agent/test_roster_service.py:3194:12
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/services/agent/test_roster_service.py:3344:12
+ --> tests/unit_tests/services/agent/test_roster_service.py:3195:12
ERROR Cannot index into `object` [bad-index]
- --> tests/unit_tests/services/agent/test_roster_service.py:3345:12
+ --> tests/unit_tests/services/agent/test_roster_service.py:3196:12
ERROR Argument `list[str | None]` is not assignable to parameter `version_ids` with type `list[str]` in function `services.agent.roster_service.AgentRosterService._load_versions_by_id` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:4416:52
+ --> tests/unit_tests/services/agent/test_roster_service.py:4267:52
ERROR Argument `Literal[0]` is not assignable to parameter `message_unit_price` with type `Decimal | SQLCoreOperations[Decimal]` in function `models.model.Message.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:4575:36
+ --> tests/unit_tests/services/agent/test_roster_service.py:4426:36
ERROR Argument `Literal[0]` is not assignable to parameter `answer_unit_price` with type `Decimal | SQLCoreOperations[Decimal]` in function `models.model.Message.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:4577:35
+ --> tests/unit_tests/services/agent/test_roster_service.py:4428:35
ERROR Argument `Literal[0]` is not assignable to parameter `total_price` with type `Decimal | SQLCoreOperations[Decimal | None] | None` in function `models.model.Message.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:4578:29
+ --> tests/unit_tests/services/agent/test_roster_service.py:4429:29
ERROR Object of class `NoneType` has no attribute `conversation_id` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5338:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5074:16
ERROR Argument `Literal['simple']` is not assignable to parameter `prompt_type` with type `PromptType | SQLCoreOperations[PromptType]` in function `models.model.AppModelConfig.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:5446:25
+ --> tests/unit_tests/services/agent/test_roster_service.py:5095:25
ERROR Unpacked keyword argument `Any | None` is not assignable to parameter `prompt_type` with type `PromptType | SQLCoreOperations[PromptType]` in function `models.model.AppModelConfig.__init__` [bad-argument-type]
- --> tests/unit_tests/services/agent/test_roster_service.py:5454:34
+ --> tests/unit_tests/services/agent/test_roster_service.py:5103:34
ERROR Object of class `object` has no attribute `name` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5560:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5209:16
ERROR Object of class `object` has no attribute `mode` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5561:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5210:16
ERROR Object of class `object` has no attribute `agent_role` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5562:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5211:16
ERROR Object of class `object` has no attribute `config_snapshot` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5572:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5221:16
ERROR Object of class `object` has no attribute `home_snapshot_id` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5574:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5223:16
ERROR Object of class `object` has no attribute `summary` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5575:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5224:16
ERROR Object of class `object` has no attribute `version_note` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5576:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5225:16
ERROR Object of class `object` has no attribute `active_config_has_model` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5577:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5226:16
ERROR Object of class `object` has no attribute `active_config_is_published` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5578:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5227:16
ERROR Object of class `object` has no attribute `updated_by` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5579:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5228:16
ERROR Object of class `object` has no attribute `id` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5580:35
+ --> tests/unit_tests/services/agent/test_roster_service.py:5229:35
ERROR Object of class `object` has no attribute `agent_role` [missing-attribute]
- --> tests/unit_tests/services/agent/test_roster_service.py:5650:16
+ --> tests/unit_tests/services/agent/test_roster_service.py:5299:16
ERROR Class member `StubResolver.resolve` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
--> tests/unit_tests/services/data_migration/test_import_service.py:256:13
ERROR Class member `CapturingImportService._import_workflows` overrides parent class `MigrationImportService` in an inconsistent manner [bad-override]
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #46221 +/- ##
==========================================
+ Coverage 90.30% 90.41% +0.10%
==========================================
Files 6463 6387 -76
Lines 408169 405693 -2476
Branches 81855 80957 -898
==========================================
- Hits 368597 366805 -1792
+ Misses 33162 32483 -679
+ Partials 6410 6405 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
hjlarry
marked this pull request as ready for review
November 13, 2026 05:47
hjlarry
requested review from
QuantumGhost,
crazywoola and
laipz8200
as code owners
November 13, 2026 05:47
hjlarry
force-pushed
the
hjlarry/agent-build-session
branch
2 times, most recently
from
November 13, 2026 09:34
d70f0e7 to
66f315e
Compare
1 task done
Resolve default model selection before the creation transaction, and persist the App, backing Agent, and Build conversation together. Share Soul configuration helpers without adding Agent service dependencies to persistence.
Use Console account admission for Build conversation refresh and draft reads and discards. Commit the draft and binding changes together before scheduling resource collection.
Report an unavailable sandbox when discarding a draft with a stale binding. Cover refresh and archived Agent compatibility, share draft metadata across readers, and register the Build routes explicitly.
hjlarry
force-pushed
the
hjlarry/agent-build-session
branch
from
November 14, 2026 06:19
66f315e to
4a32b3a
Compare
Base automatically changed from
hjlarry/agent-app-lifecycle-persistence
to
main
November 20, 2026 08:27
linw1995
approved these changes
Nov 20, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 20, 2026
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move Agent Build conversation refresh and Build draft read and discard into injected use cases backed by
AgentAppRepository. The controller admits the account, validates the request, and translates application errors.Follow-up to #46159. Part of #39993.
404 agent_build_sandbox_not_foundwhen discard encounters a retained binding from an outdated generation. Refresh can reset an owned binding from an older generation.Screenshots
Checklist