Skip to content

fix: preserve file operation history across native fallbacks - #1

Open
MDGChamomile wants to merge 1 commit into
JMHSV:mainfrom
MDGChamomile:fix/preserve-file-ops-fallback
Open

MDGChamomile wants to merge 1 commit into
JMHSV:mainfrom
MDGChamomile:fix/preserve-file-ops-fallback

Conversation

@MDGChamomile

Copy link
Copy Markdown

Summary

  • restore file operations from the previous hook-provided compaction before any routing checks
  • preserve cumulative compaction context when this extension declines and Pi uses its native fallback
  • add regression coverage for excluded reasons, missing models, authentication failures, dedicated-model success/failure, and path deduplication

Why

Pi intentionally does not treat arbitrary extension compaction details as native file-operation metadata. This extension restores Pi-shaped readFiles and modifiedFiles, but previously did so only after configuration, model lookup, and authentication checks.

When one of those checks returned early, native fallback reused the same preparation without the earlier cumulative file history. That could truncate the <read-files> and <modified-files> context carried into later compactions. This affects compressed working context only; it does not revert, delete, or corrupt files.

Testing

  • bun run check

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.

1 participant