Skip to content

fix(schedule): preserve workspace search attrs on update#2459

Open
daryllimyt wants to merge 1 commit intomainfrom
fix/schedule-update-preserve-workspace-search-attrs
Open

fix(schedule): preserve workspace search attrs on update#2459
daryllimyt wants to merge 1 commit intomainfrom
fix/schedule-update-preserve-workspace-search-attrs

Conversation

@daryllimyt
Copy link
Copy Markdown
Contributor

@daryllimyt daryllimyt commented Apr 2, 2026

Summary

  • thread the caller role into schedule updates so search attributes can be rebuilt with workspace scope intact
  • fall back to the caller role when decoding existing schedule args fails during update_schedule
  • add a regression test covering the decode-failure path

Testing

  • uv run ruff check tracecat/workflow/schedules/bridge.py tracecat/workflow/schedules/service.py tests/unit/test_schedule_update_search_attributes.py
  • uv run pyright tracecat/workflow/schedules/bridge.py tracecat/workflow/schedules/service.py tests/unit/test_schedule_update_search_attributes.py
  • TRACECAT__SERVICE_KEY=dummy uv run pytest tests/unit/test_schedule_update_search_attributes.py

Summary by cubic

Preserves workspace-scoped Temporal search attributes when updating schedules. Prevents WORKSPACE_ID loss so schedule queries and filters continue to work after updates.

  • Bug Fixes
    • Thread caller Role into update_schedule and rebuild search attributes with the provided role; otherwise use the decoded role, and finally tracecat-schedule-runner as a fallback.
    • Pass the requester’s role from the service layer to the bridge.
    • Add a regression test for decode-failure; verifies WORKSPACE_ID, TRIGGER_TYPE, EXECUTION_TYPE, and paused state when setting status to offline.

Written for commit ee9acb6. Summary will update on new commits.

@daryllimyt daryllimyt temporarily deployed to internal-registry-ci April 2, 2026 14:26 — with GitHub Actions Inactive
@daryllimyt daryllimyt temporarily deployed to internal-registry-ci April 2, 2026 14:26 — with GitHub Actions Inactive
@zeropath-ai
Copy link
Copy Markdown

zeropath-ai bot commented Apr 2, 2026

No security or compliance issues detected. Reviewed everything up to ee9acb6.

Security Overview
Detected Code Changes
Change Type Relevant files
Bug Fix ► tracecat/workflow/schedules/bridge.py
    Preserve workspace search attributes when decoding fails
    Use caller role when rebuilding search attributes after decode failure
Enhancement ► tracecat/workflow/schedules/bridge.py
    Allow passing role to update_schedule function
► tracecat/workflow/schedules/service.py
    Pass the service role to bridge.update_schedule
Configuration changes ► tests/unit/test_schedule_update_search_attributes.py
    Add tests for schedule update search attributes
    Test preservation of workspace search attributes on decode failure
    Test update_schedule preserves workspace search attributes when decode fails

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@blacksmith-sh
Copy link
Copy Markdown
Contributor

blacksmith-sh bot commented Apr 2, 2026

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_large_collection_regressions/test_scatter_gather_massive_payload_50x2mb_e2e View Logs

Fix in Cursor

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