Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions backend/druks/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
from druks.durable.engine import _step_engine, step_session
from druks.durable.enums import AgentCallStatus
from druks.durable.exceptions import WorkflowError
from druks.durable.models import AgentCall, Artifact, Run
from druks.events.models import Event
from druks.durable.models import AgentCall, Artifact
from druks.extensions.registry import agents
from druks.harnesses.models import HarnessConnection
from druks.harnesses.registry import get_harness_for_model
Expand Down Expand Up @@ -180,15 +179,6 @@ async def _run(self, *, workflow_id: str, **context: Any) -> Any:
connection = HarnessConnection.lookup(harness.name, workflow.account_id)
# Plain snapshots: the commits below expire the ORM row mid-flight.
connection_id, charged_account_id = connection.id, connection.account_id
if charged_account_id != workflow.account_id:
# The visible nudge: this call charged the fallback account.
Event.emit(
type="credential.fallback",
subject=workflow._subject,
label=Run.get(workflow_id).subject_label,
payload={"run_id": workflow_id, "harness": harness.name},
extension=type(workflow).extension,
)
# An agent call is a durability boundary — its effects don't roll back —
# so commit here rather than hold the step's connection idle through the
# minutes of provisioning and the run.
Expand Down
8 changes: 0 additions & 8 deletions frontend/src/lib/feed.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,4 @@ describe('eventLine', () => {
expect(line.subject).toBe('note 7')
expect(line.path).toBeUndefined()
})

it('reads a core event with no subject at all', () => {
const line = eventLine(event({ kind: 'credential.fallback' }))

expect(line.label).toBe('credential.fallback')
expect(line.subject).toBe('')
expect(line.source).toBe('druks')
})
})