Skip to content

Changes in included files don't trigger re-execution when freeze: auto is set #6793

Open

Description

@mine-cetinkaya-rundel

Bug description

If you set freeze: auto at the project level, changes in included .qmd files don't trigger re-execution. It seems like change must happen in one of the files listed in _quarto.yml for re-execution to be triggered.

Steps to reproduce

You can see this behavior in the commit history of https://github.com/mine-cetinkaya-rundel/freeze-include.

Alternatively, steps below.

  1. Create a book project and add a .qmd file that is included in a chapter with the {{< include >}} short code, e.g. _section.qmd to be included with {{< include _section.qmd >}}.
  2. Set freeze: auto at the project level in _quarto.yml.
  3. Render the project.
  4. Then, make a change in _section.qmd. Render book. Changes aren't in the rendered output.
  5. Them, make a change in the chapter file. Render book. Changes are now reflected in the rendered output.

Expected behavior

I would have expected changes in the included file to trigger re-execution.

Actual behavior

They do not trigger re-execution.

Your environment

  • RStudio: 2023.09.0 Build 380
  • Mac OS: Ventura 13.5 (22G74)

Quarto check output

Quarto 1.4.346
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.6: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.346
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2023.08
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/mine/Library/TinyTeX/bin/universal-darwin
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.6
      Path: /Library/Developer/CommandLineTools/usr/bin/python3
      Jupyter: 5.3.0
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.3.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
      knitr: 1.43
      rmarkdown: 2.24

[✓] Checking Knitr engine render......OK

Activity

  1. added
    bug
    on Sep 10, 2023
  2. mcanouil commented on Sep 11, 2023

    @mcanouil
    Collaborator

    Thanks for the report!

    I believe this, in some aspects, to be a duplicate of:

    Note that this might get worked on with the following work:

  3. added this to the v1.5 milestone on Nov 28, 2023
  4. added
    freeze
    on Jun 17, 2024
  5. modified the milestones: v1.5, Future on Jun 17, 2024
  6. MiriamMarling commented on Jun 30, 2026

    @MiriamMarling

    This still reproduces on Quarto 1.9.37 / Pandoc 3.8.3 (macOS arm64; also in CI
    on ubuntu-latest).

    Minimal repro repo with CI:
    https://github.com/MiriamMarling/quarto-freeze-include-repro

    The failing case is especially severe for type: manuscript projects, where
    splitting an article into included section files is a natural workflow. With
    execute.freeze: auto, editing an included .qmd does not invalidate the
    article's frozen output — the build succeeds, but the rendered article can
    disagree with the source on disk (including plain Markdown changes like figure
    paths, not just code output).

    The repro shows:

    1. Manuscript project whose article does {{< include _body.qmd >}}.
    2. Change only _body.qmd: MARKER-ALPHA → MARKER-BETA.
    3. Re-render with freeze: auto.
    4. Output stays MARKER-ALPHA until _freeze is deleted (touch index.qmd does
      not help).

    Notably, the identical include + freeze: auto in a type: default project
    re-renders correctly
    (this is the control in the repo, and it passes), which
    suggests the invalidation key for the manuscript article doesn't incorporate its
    included files. This reads as a correctness/data-integrity issue rather than a
    cache inconvenience, since the failure is silent.

    The repo's CI encodes this as a regression test: the control job is green and the
    manuscript job is red while the bug is present (it turns green when fixed). Happy
    to open a failing-test PR if useful — where in the test suite would it belong?

    Miriam Marling ([email protected])

    P.S. I spent several hours debugging this with Opus 4.8 and am happy to help — a focused repro, extra environment checks, or testing a candidate fix. Could a maintainer confirm: (1) whether this is considered a current bug, (2) whether this 2023 issue is the right place to track it, and (3) whether a minimal regression-test PR would be useful?

  7. mcanouil commented on Jul 1, 2026

    @mcanouil
    Collaborator

    @MiriamMarling Your post is on the edge of being a Code of Conduct violation.

    Submitting issues or pull requests via autonomous AI agents acting without human oversight. This specifically includes autonomous agents such as OpenClaw. AI assistants are accepted only when a human contributor has reviewed and verified the submission (see CONTRIBUTING.md). Autonomous agents deciding on their own to open issues or PRs in this repository are not. We consider these account-bannable on first offense. You have been warned.

    Before posting on this repository or in other repositories on GitHub/GitLab/etc., I strongly advise you to read or ask your LLM to read the contributing guidelines before doing anything, see Quarto contributing guidelines.

  8. cscheid commented on Jul 1, 2026

    @cscheid
    Member

    Yes, this bug is still open; unfortunately, the interaction between {{< include >}} and freeze is, in a sense, structurally flawed, precisely because Quarto 1 doesn't have robust mechanisms for tracking down file changes across include boundaries. This is not different from freeze not rerendering if, for example, a CSV file changes in disk and would produce different results.

    We have access to Opus 4.8 as well, but we would have to be extremely careful about taking a fix here. I could be positively surprised, but I'm not sure that there exists a simple clean fix for the feature as it exists today.

  9. MiriamMarling commented on Jul 1, 2026

    @MiriamMarling

    @mcanouil, understood. I read the contributing guidelines after your note. To
    clarify, this was not initiated by an autonomous agent. I hit the issue in my own
    work, reproduced it, ran the repro, checked the results, and posted the report
    myself.

    That said, I can see how my wording and the repro repo history may not have made
    my review and involvement clear enough. I have updated the repro README to state
    that the test case and results were reviewed, run, and verified by me before
    posting. I will also be clearer in future reports that any AI-assisted material
    has been checked by me before I post it. Thanks for pointing me to the guidelines.

    @cscheid, your explanation makes sense. If freeze has no robust way to track
    changes across {{< include >}} boundaries, then I agree this is not something to
    patch hastily.

    A note in the freeze docs might be the most useful and conservative outcome if the
    behavior stays as is: spelling out that freeze: auto does not re-run when only an
    included file changes. That would at least make stale output easier to notice and
    fix for the next person.

    For my own work, deleting _freeze before rendering fixed the issue.

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

    bugfreeze

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions