Repository navigation
Conversation
Step 4 of the organization teardown: the organization's chats, ahead of the threads they sat on, which Threads removes in the same step. The teardown deletes the rows outright rather than reusing DeleteChat's soft delete. A deleted_at exists so a chat a user removed can still be read; an organization being torn down has nothing left to read it, and a row holding an organization_id that resolves to nothing is the thing being fixed. Internal RPC, so no permission check and no caller identity -- the Istio policy settles that Organizations is the only caller. The delete is unconditional and therefore idempotent, which is what lets the cascade retry a step it is unsure finished.
vitramir
added a commit
that referenced
this pull request
Oct 31, 2026
* test: stub DeleteOrganizationResources on the Threads fakes threads.proto gained DeleteOrganizationResources, and CI generates the Threads bindings from the module's main on every run, so the fakes no longer satisfy ThreadsServiceClient and internal/server stops compiling its tests. A CI run on main today fails the same way. The stubs are #37's, byte for byte and in the same place, so whichever of the two lands second merges without a conflict. * feat: activity for hibernating, hibernated and waking workloads A workload can now sleep between turns and come back on the same record: running -> hibernating -> hibernated, then hibernated -> waking -> running on the next message. Chat rejected the three statuses as unsupported, so an instance whose workload slept was logged as a Runners failure and shown as finished, with its workload dropped from active_workload_ids -- and a waking one read the same, where the chat should show the agent coming back. waking now contributes pending. hibernating and hibernated contribute finished: the agent is asleep between turns, and the next message wakes it. All three are listed in active_workload_ids, a hibernated workload because it is the one that moves next -- the chat-app has to be in its room already to see the waking -> running that follows the user's message. The running case and how agent_state is read are unchanged. The committed protos were regenerated from buf.build/agynio/api main: they predated the three statuses. They pick up what else landed there since, and protoc-gen-go v1.36.12, which builds against the pinned v1.36.11 runtime. See agynio/architecture: changes/2026-10-27-workload-hibernation.md
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.
Step 4 of the organization teardown: the organization's chats, ahead of the threads they sat on, which Threads removes in the same step.
The teardown deletes the rows outright rather than reusing
DeleteChat's soft delete.deleted_atexists so a chat a user removed can still be read; an organization being torn down has nothing left to read it, and a row holding anorganization_idthat resolves to nothing is exactly what this change set is fixing.Internal RPC — no OpenFGA check and no caller identity, gated by a new Istio
AuthorizationPolicyadmitting only theorganizationsServiceAccount. The delete is unconditional and therefore idempotent, which is what lets the cascade retry a step it is unsure finished.The
threadstest fakes gained aDeleteOrganizationResourcesstub, sincethreads.protogained the same RPC.Chart bumped to 0.2.0 for the new template.
Part of organization settings and deletion.