feat(change): add ChangeSet models and invocation tracker #301

Closed
opened 2026-02-22 23:41:04 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit: feat(change): add ChangeSet models and invocation tracker
  • Branch: feature/m3-change-model

Subtasks

  • Add ToolInvocation model and InMemoryInvocationTracker (Protocol + impl) with plan_id/skill_name/tool_name linkage, sequence ordering, change_ids, provider metadata.
  • SpecChangeSet stores resource references, sandbox paths, tool metadata, and timestamps via ChangeEntry fields.
  • Add ChangeSet serialization helper grouped_by_resource() for plan diff output.
  • Enforce deterministic ordering via sorted_entries() (resource_id, path, timestamp).
  • Link ToolInvocation to plan_id and skill/tool names for auditability.
  • Add ChangeType alias for ChangeOperation and per-change field validators (CREATE/DELETE hash consistency).
  • Content hash fields (before_hash/after_hash) and file mode already in ChangeEntry; added has_integrity_hashes property.
  • Add normalize_change_path() for repo-relative POSIX path normalization.
  • Add docs/reference/change_tracking.md describing tool-to-change mapping.
  • Tests (Behave): Add features/change_tracking.feature with 21 scenarios for ChangeSet aggregation, invocation tracking, path normalization.
  • Tests (Robot): Add robot/change_tracking.robot with 5 tracker smoke tests.
  • Tests (ASV): Add benchmarks/change_tracking_bench.py with 4 benchmark suites.
  • Verify coverage >=97% via nox -s coverage_report. Coverage: 97.7%.
  • Run nox (all default sessions), all pass.

Section: ### Section 5: Actors, Skills & Tool Execution [WORKSTREAM C - Aditya Lead]
Status: Completed

## Metadata - **Commit**: `feat(change): add ChangeSet models and invocation tracker` - **Branch**: `feature/m3-change-model` ## Subtasks - [x] Add ToolInvocation model and InMemoryInvocationTracker (Protocol + impl) with plan_id/skill_name/tool_name linkage, sequence ordering, change_ids, provider metadata. - [x] SpecChangeSet stores resource references, sandbox paths, tool metadata, and timestamps via ChangeEntry fields. - [x] Add ChangeSet serialization helper grouped_by_resource() for plan diff output. - [x] Enforce deterministic ordering via sorted_entries() (resource_id, path, timestamp). - [x] Link ToolInvocation to plan_id and skill/tool names for auditability. - [x] Add ChangeType alias for ChangeOperation and per-change field validators (CREATE/DELETE hash consistency). - [x] Content hash fields (before_hash/after_hash) and file mode already in ChangeEntry; added has_integrity_hashes property. - [x] Add normalize_change_path() for repo-relative POSIX path normalization. - [x] Add `docs/reference/change_tracking.md` describing tool-to-change mapping. - [x] Tests (Behave): Add `features/change_tracking.feature` with 21 scenarios for ChangeSet aggregation, invocation tracking, path normalization. - [x] Tests (Robot): Add `robot/change_tracking.robot` with 5 tracker smoke tests. - [x] Tests (ASV): Add `benchmarks/change_tracking_bench.py` with 4 benchmark suites. - [x] Verify coverage >=97% via `nox -s coverage_report`. Coverage: 97.7%. - [x] Run `nox` (all default sessions), all pass. **Section**: ### Section 5: Actors, Skills & Tool Execution [WORKSTREAM C - Aditya Lead] **Status**: Completed
freemo added this to the v3.1.0 milestone 2026-02-22 23:41:04 +00:00
freemo added the
State
Completed
Type
Feature
Priority
Medium
Points
8
labels 2026-02-22 23:41:04 +00:00
CoreRasurae was assigned by freemo 2026-02-22 23:41:04 +00:00
freemo added a new dependency 2026-02-22 23:54:22 +00:00
freemo added a new dependency 2026-02-23 01:11:20 +00:00
Author
Owner

Implementation Notes — C5.model: ChangeSet Models and Invocation Tracker

2026-02-19: Stage C5.model COMMIT Complete - ChangeSet models and invocation tracker [Luis]

  • Added ToolInvocation Pydantic model, InvocationTracker Protocol and InMemoryInvocationTracker, per-change field validators, sorted_entries() and grouped_by_resource() methods, normalize_change_path() utility.
  • 21 BDD scenarios, 5 integration smoke tests, 4 ASV benchmark suites.

(Migrated from docs/implementation-notes.md)

## Implementation Notes — C5.model: ChangeSet Models and Invocation Tracker **2026-02-19**: Stage C5.model COMMIT Complete - ChangeSet models and invocation tracker [Luis] - Added `ToolInvocation` Pydantic model, `InvocationTracker` Protocol and `InMemoryInvocationTracker`, per-change field validators, `sorted_entries()` and `grouped_by_resource()` methods, `normalize_change_path()` utility. - 21 BDD scenarios, 5 integration smoke tests, 4 ASV benchmark suites. *(Migrated from `docs/implementation-notes.md`)*
freemo removed a dependency 2026-03-03 22:55:00 +00:00
freemo added a new dependency 2026-03-03 22:55:00 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Blocks
#354 Epic: Actor & Skill Schema + CLI (C0)
cleveragents/cleveragents-core
Depends on
#137 develop-luis-1
cleveragents/cleveragents-core
Reference: cleveragents/cleveragents-core#301