Skip to content

feat(schema): add db entity for task suite and agent#226

Merged
BobAnkh merged 13 commits into
devfrom
task-suite-entity
Jul 17, 2026
Merged

feat(schema): add db entity for task suite and agent#226
BobAnkh merged 13 commits into
devfrom
task-suite-entity

Conversation

@un-lock-able

Copy link
Copy Markdown

New entities

  • task_suites — a group-owned batch of tasks with priority, worker schedule, exec hooks, task counters, and a TaskSuiteState.
  • agents — durable identity of a registered machine instance (not deleted on offline); tracks tags/labels, heartbeat, assigned suite, and AgentState.
  • machines — physical machine code + metadata for an agent (1:1, Restrict).
  • suite_agent_jobs — one attempt of an agent running a suite; per-suite job number, task counters, SuiteJobState, failure reason.
  • hook_tasks — one provision/cleanup/background hook run in a job; has its own uuid, logs stored in shared artifacts.
  • task_suite_agent — links a suite to its candidate agents (how it was selected).
  • group_agent — group→agent ACL row with GroupAgentRole, mirroring group_worker.

New enums in state.rs / role.rs: TaskSuiteState, AgentState, SuiteJobState, HookExecState, HookType, SelectionType, GroupAgentRole.

Changes to existing rows

  • active_tasks / archived_tasks — add nullable task_suite_id (FK, SetNull), propagated through the active→archived conversion.
  • artifactstask_id now holds either a task uuid or a hook uuid.

Co-authored-by: BobAnkh <bobankhshen@gmail.com>
@un-lock-able
un-lock-able requested a review from BobAnkh July 6, 2026 08:24
Comment thread netmito/src/migration/mod.rs Outdated
Comment thread netmito/src/entity/state.rs Outdated
Comment thread netmito/src/entity/state.rs Outdated
Comment thread netmito/src/entity/state.rs
Comment thread netmito/src/entity/state.rs Outdated
Comment thread netmito/src/entity/suite_agent_jobs.rs Outdated
Comment thread netmito/src/entity/suite_agent_jobs.rs Outdated
Comment thread netmito/src/entity/suite_agent_jobs.rs
Comment thread netmito/src/entity/task_suites.rs
Comment thread netmito/src/migration/m20260703_000000_create_task_suite_tables.rs
@un-lock-able
un-lock-able requested a review from BobAnkh July 14, 2026 10:21
Comment thread netmito/src/entity/group_worker.rs
Comment thread netmito/src/entity/state.rs
Comment thread netmito/src/service/worker/mod.rs Outdated
Comment thread netmito/src/service/worker/mod.rs Outdated
Comment thread netmito/src/migration/m20260703_000001_alter_tasks_link_suites.rs Outdated
Comment thread netmito/src/migration/m20260703_000001_alter_tasks_link_suites.rs Outdated
@un-lock-able
un-lock-able requested a review from BobAnkh July 16, 2026 13:41

@BobAnkh BobAnkh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@BobAnkh BobAnkh changed the title Add DB entity for task suite and agent feat(schema): add db entity for task suite and agent Jul 17, 2026
@BobAnkh
BobAnkh merged commit 806b529 into dev Jul 17, 2026
11 checks passed
@BobAnkh
BobAnkh deleted the task-suite-entity branch July 17, 2026 10:37
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