Skip to content

5.4: Filesystem watcher for incremental commit+push #41

Description

@savitharaghunathan

5.4: Filesystem watcher for incremental commit+push

Part of Stream 5: Harness → AgentPlaybookRun alignment

ADR-0001 §Git-as-persistence states: "Mitigation: incremental push during execution, not just on exit." The harness currently only pushes at pipeline step boundaries, risking data loss if the pod crashes mid-run.

Tasks

  • Add internal/watcher/ package with fsnotify-based filesystem watcher
  • Debounce window (~30s quiet period) — after the last relevant filesystem event, wait before committing
  • On quiet period expiry: git add changed/new files, commit, push
  • Exclude irrelevant paths from watch: .git/, .konveyor/, build output dirs (target/, node_modules/, graphify-out/), binary/lock files
  • Exclude irrelevant extensions: .class, .jar, .pyc, .o, .so
  • Recursively watch new subdirectories as they are created
  • Start watcher before sending the ACP prompt, stop after agent finishes
  • Final CommitAll + push in the harness covers anything the watcher missed (including .konveyor/ files written at stage end)
  • Unit tests for path filtering and debounce behavior

Acceptance Criteria

  • Agent file changes are committed and pushed incrementally during execution, not just on exit
  • Build artifacts and irrelevant files are excluded from commits
  • .konveyor/ directory is excluded from the watcher but included in the final commit
  • Watcher is resilient to rapid bursts of file changes (debounce prevents excessive commits)

References

  • ADR-0001 §Git-as-persistence ("incremental push during execution, not just on exit")
  • PR ✨ Harness init #33

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status
🏗 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions