Skip to content

fix: create the first persistent artifact on the incremental path#1163

Open
mvanhorn wants to merge 2 commits into
DeusData:mainfrom
mvanhorn:fix/434-persistence-incremental-first-artifact
Open

fix: create the first persistent artifact on the incremental path#1163
mvanhorn wants to merge 2 commits into
DeusData:mainfrom
mvanhorn:fix/434-persistence-incremental-first-artifact

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #434: enabling persistence=true did not create the first persistent artifact on the incremental indexing path. dump_and_persist in pipeline_incremental.c only refreshed an artifact that already existed and never created one on first run, so a persistence=true request was silently a no-op until an artifact happened to exist. git ai stats-style consumers saw the index reported as successful with no persistent artifact written.

This threads a new cbm_pipeline_persistence() accessor into the incremental path (mirroring the existing cbm_pipeline_repo_path / cbm_pipeline_project_name accessors) so it exports the first artifact with CBM_ARTIFACT_BEST when persistence is requested and none exists, matching the full pipeline. Existing artifacts keep refreshing with CBM_ARTIFACT_FAST. It covers changed-file, deleted-file, and no-op incremental runs, and it now propagates a failed cbm_artifact_export as a run error instead of reporting a successful index when the artifact could not be written.

Checklist

  • Every commit is signed off (git commit -s) — required, CI rejects unsigned commits (DCO, see CONTRIBUTING.md)
  • Tests pass locally (make -f Makefile.cbm test)
  • Lint passes (make -f Makefile.cbm lint-ci)
  • New behavior is covered by a test (reproduce-first for bug fixes)

mvanhorn added 2 commits July 18, 2026 01:42
…is created

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
@mvanhorn
mvanhorn requested a review from DeusData as a code owner July 18, 2026 08:47
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.

cursor | vscode : persistence= true is silently ignored on first artifact creation

1 participant