Skip to content

feat(unstable): Raise the available actions limit to cover two actions per task - #594

Closed
vikramlc-cognite wants to merge 2 commits into
EDG-1037-fetch-logs-data-setfrom
EDG-1049-raise-available-actions-limit
Closed

vikramlc-cognite wants to merge 2 commits into
EDG-1037-fetch-logs-data-setfrom
EDG-1049-raise-available-actions-limit

Conversation

@vikramlc-cognite

Copy link
Copy Markdown
Contributor

Summary

Raises the client-side availableActions limit in the startup request from 100 to 250, matching Odin, so an extractor with up to 100 actionable tasks (a start and a stop action each) plus custom actions can register.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor (no functional change)
  • Documentation update
  • Chore / tooling / CI

What changed

  • unstable/core/_dto.py: new MAX_AVAILABLE_ACTIONS = 250, used by AvailableActionList (was a hard-coded 100).
  • tests/test_unstable/test_dto.py: available-actions max-length test uses the constant; the action-updates test stays at 100.
  • tests/test_unstable/test_action_registration.py: 100 tasks (200+ actions) build a valid StartupRequest; MAX_AVAILABLE_ACTIONS tasks overflow and are rejected.
  • CHANGELOG.md: Unreleased entry.

Why it changed

Each actionable task costs 2 actions, so the old cap of 100 allowed only 49 actionable tasks while Odin's task_limit is 100. A 50th task made the startup request invalid.

What to focus on during review

  • The limit must stay in sync with Odin's MAX_AVAILABLE_ACTIONS; it is a duplicated constant, not shared.
  • MAX_ACTION_UPDATES_PER_CHECKIN (100) is intentionally unchanged: excess updates carry over to the next check-in.

Test evidence

  • uv run pytest tests/test_unstable/test_dto.py tests/test_unstable/test_action_registration.py -> 71 passed
  • pre-commit run --all-files -> all hooks passed
  • The wider tests/test_unstable suite has the same live-CDF failures/errors as clean master (no COGNITE_DEV_PROJECT locally); needs CI.

Risks and unknowns

  • Must not be released before Odin Remove newlines from log message #333 is deployed: an older Odin rejects more than 100 actions with 422, which now fails the extractor at startup (EDG-1032).
  • Larger startup payload, at most 250 actions; not load-tested.

Rollout and rollback

Checklist

  • Self-reviewed the diff
  • Tests added or updated (or N/A with reason)
  • Docs updated (or N/A) - CHANGELOG only
  • No secrets, credentials, or PII committed
  • Breaking changes called out above and communicated to affected teams - none

🤖 Generated with Claude Code

vikramlc and others added 2 commits October 28, 2026 10:14
…s per task

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request increases the maximum number of available actions sent at startup from 100 to 250 in the unstable package. This is achieved by introducing a new MAX_AVAILABLE_ACTIONS constant in _dto.py and updating the validation limits and test cases accordingly. I have no feedback to provide as the implementation is clean and well-tested.

@vikramlc-cognite

Copy link
Copy Markdown
Contributor Author

Superseded by #596, which targets master directly (no dependency on the stacked PRs).

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.

2 participants