Skip to content

sync export with dryRun: true writes files (102 files created by a preview call) #90

Closed

Description

@FabioCaffarello

Found while operating the MCP server (@dotcontext/mcp, observed on 1.x) inside a repository with a strict CI gate.

Expected: sync actions called with dryRun: true preview the export and write nothing.

Actual: a dryRun: true export call wrote 102 files across five directories it created (.agents/, .codex/, .gemini/, .windsurf/, .github/skills/). The filesCreated count in the response described what had already been written, not a projection. Our directory-contract check caught it because the new top-level directories had no README, and the working tree had to be restored by hand.

Impact: a dry-run that writes is worse than no dry-run — it invites exactly the "let me just preview this" call that produced the mess, in repositories where an unexpected write breaks the build.

Suggested fix: honour the flag in every sync code path, and treat "reported as created while dryRun" as a test assertion.

Context (public repo, incident recorded): FabioCaffarello/fdos#54

Activity

  1. vinilana commented on Nov 22, 2026

    @vinilana
    Owner

    Thanks for the report and the write-up — a dry-run that writes is definitely a bug. Most sync actions forward dryRun, but the exportSkills path in HarnessSyncActionService never passed it to SkillExportService, so it exported for real to every skill target (17 skills × 6 new targets = the 102 files you saw).

    Fix is up in #96: dryRun is now forwarded and the export only computes a preview, with regression tests on the harness, MCP and CLI paths asserting nothing is written. It'll ship in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions