Skip to content

feat: Add entity type verification to status automation processing and…#1041

Open
mxatmx wants to merge 2 commits intocgwire:mainfrom
mxatmx:feat-new-entity-types-automation
Open

feat: Add entity type verification to status automation processing and…#1041
mxatmx wants to merge 2 commits intocgwire:mainfrom
mxatmx:feat-new-entity-types-automation

Conversation

@mxatmx
Copy link
Copy Markdown

@mxatmx mxatmx commented Mar 22, 2026

…corresponding tests for sequence, episode, and mismatch scenarios.

I PRed a sister commit to the Kitsu repo.

mxatmx added 2 commits March 22, 2026 18:10
…d corresponding tests for sequence, episode, and mismatch scenarios.
…ntify asset types and update test object reloading methods.
@frankrousseau
Copy link
Copy Markdown
Contributor

I have a few remarks following an AI analysis:

  • Normalize automation["entity_type"] for comparisons — e.g. lower-case once and use that for both the "asset" branch (wanted == "asset") and the name check (entity_type["name"].lower() != wanted), so values like "Sequence" vs "sequence" don’t skip or mis-apply automations.
  • Drop unused imports in tests — remove Entity from tests/services/test_status_automation_service.py if it isn’t referenced.

Snippet for the normalization:

    entity = entities_service.get_entity(task["entity_id"])
    entity_type = entities_service.get_entity_type(entity["entity_type_id"])
    wanted = (automation.get("entity_type") or "").lower()
    if wanted == "asset":
        if not assets_service.is_asset_type(entity_type):
            return
    elif entity_type["name"].lower() != wanted:
        return

frankrousseau added a commit to cgwire/gazu that referenced this pull request Apr 15, 2026
Mirror the new project template API exposed by zou (cgwire/zou#1041)
in gazu, so pipeline scripts can manage templates and apply them at
project creation time.

New gazu.project_template module covering CRUD, snapshot from project,
apply to project, link management for task types / task statuses /
asset types / status automations, and the metadata-descriptor JSONB
snapshot endpoint. gazu.project.new_project gains an optional
project_template= parameter that forwards project_template_id; explicit
fields the caller passes still win over the template's defaults
(precedence is enforced server-side by zou).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
frankrousseau added a commit to cgwire/gazu that referenced this pull request Apr 16, 2026
Mirror the new project template API exposed by zou (cgwire/zou#1041)
in gazu, so pipeline scripts can manage templates and apply them at
project creation time.

New gazu.project_template module covering CRUD, snapshot from project,
apply to project, link management for task types / task statuses /
asset types / status automations, and the metadata-descriptor JSONB
snapshot endpoint. gazu.project.new_project gains an optional
project_template= parameter that forwards project_template_id; explicit
fields the caller passes still win over the template's defaults
(precedence is enforced server-side by zou).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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