Skip to content

feat: add versioning to EvaluationConfig, BudgetConfig, CompanyStructure #1132

@Aureliolo

Description

@Aureliolo

Context

Follow-up from #1113 (versioning infrastructure evaluation). These configuration entities were identified as high-value candidates for versioning via the generic VersionSnapshot[T] infrastructure from #1076.

Candidates

EvaluationConfig (HIGH value, TRIVIAL migration)

  • Location: src/synthorg/hr/evaluation/config.py
  • Why: Scoring framework changes affect all agent evaluations. Audit trail needed for "which config was active when this agent was evaluated?"
  • Rollback value: HIGH -- revert to prior scoring methodology
  • Change frequency: Low (quarterly/annually)

BudgetConfig (HIGH value, TRIVIAL migration)

  • Location: src/synthorg/budget/config.py
  • Why: Cost policy changes affect spending behavior. Trace cost spikes to policy changes.
  • Rollback value: MEDIUM -- revert quota policies
  • Change frequency: Low (every few weeks)

CompanyStructure (HIGH value, MEDIUM migration)

  • Location: src/synthorg/core/company.py (ReportingLine, Department, Company)
  • Why: Org chart changes are major events. Compliance-critical for approval chain audits ("who was authorized to approve this task?")
  • Rollback value: HIGH -- revert org restructuring
  • Change frequency: Very low (2-4 times/year)

Implementation

For each candidate:

  1. Create <entity>_versions table via SQLiteVersionRepository[T]
  2. Wire into persistence backend
  3. Use VersioningService[T].snapshot_if_changed() at mutation points
  4. Add API endpoint for listing historical configs
  5. Tests

Depends on #1131 (WorkflowDefinitionVersion migration validates the pattern).

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowNice to have, can deferscope:large3+ days of worktype:featureNew feature implementationv0.6.5Patch release v0.6.5

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions