Skip to content

chore: identify candidates for generic versioning infrastructure #1113

@Aureliolo

Description

@Aureliolo

Context

Follow-up to #1076 (agent identity versioning). The implementation of #1076 introduces a generic VersionSnapshot[T] model, VersionRepository[T] protocol, and SQLiteVersionRepository[T] that can version any frozen Pydantic model with content-addressable hashing and monotonic version numbering.

This issue tracks identifying other domain entities that should be versioned using the same infrastructure.

Known Candidates

Existing (migrate to generic infra)

  • WorkflowDefinitionVersion (engine/workflow/version.py): Currently uses a bespoke snapshot model + repo. Could be migrated to VersionSnapshot[WorkflowDefinition] with entity-specific diff logic preserved. The existing WorkflowVersionRepository and SQLiteWorkflowVersionRepository would be replaced by parameterized instances of the generic repo.

Potential Future Candidates

  • Organization/company config: Company-level settings (budget policies, autonomy defaults, quality scoring weights) evolve over time. Versioning would provide audit trail for policy changes.
  • Role catalog entries: Custom roles defined via config could be versioned to track how role definitions evolve.
  • Hiring templates: Template definitions used for agent onboarding could be versioned for reproducibility.
  • Tool permission policies: Access level definitions and sub-constraint configurations could be versioned for security audit.
  • Prompt profiles: Capability-aware prompt profiles that evolve as the system learns.

Acceptance Criteria

  • Evaluate each candidate for versioning value (audit trail, reproducibility, rollback)
  • Migrate WorkflowDefinitionVersion to use generic VersionSnapshot[T] infra (if cost/benefit is favorable)
  • Identify any new candidates not listed above
  • Create follow-up issues for approved candidates

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowNice to have, can deferscope:medium1-3 days of worktype:choreMaintenance, cleanup, dependency updatesv0.7Minor version v0.7

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions