Skip to content

fix(orchestration): claim sources loaded through hook reads and loader chains - #1446

Merged
chio-labs-delivery[bot] merged 2 commits into
mainfrom
fix/claim-hook-and-chain-loads
Nov 13, 2026
Merged

chio-labs-delivery[bot] merged 2 commits into
mainfrom
fix/claim-hook-and-chain-loads

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Why

A job's frozen write set missed two kinds of source a build loads: managed sources a model's hooks read, and the sources in a loaded source's loader depends_on chain. The worker refused those runs with planned writer source:… is outside the frozen run write set.

Changes

  • Snapshots record loads on a model (managed sources its hooks or audit gates read beyond deps) and on a managed source (the declared sources in its loader chain). The field is additive and absent when empty.
  • Write sets claim a selected model's loads and each loaded source's chain. A directly selected source claims only itself, as only its own loader runs; --no-load-sources claims none.
  • Known gap, for a follow-up: an intermediate loader that no source declares has no snapshot node a role can grant, so it stays unclaimed and runs that need one still fail in the worker. A test pins this.
  • Release note: models and sources that gain loads show as changed once, on the first publication after upgrading.

Verification

  • Worker tests on a tag-selected DuckShop job: a two-loader chain plus a hook read succeeds with the exact write set; without loads the hook-read source is refused; an intermediate loader is refused.
  • node_loads unit test; orchestration crate on SQLite and PostgreSQL, incl. a selected source claiming only itself.
  • Compiled-project integration suite; make check-ci.
  • DuckShop: adds edge_cases/orchestration/loaded_* and intermediate_loader_*.

…r chains

Snapshots record `loads` on models (managed sources their hooks or audit
gates read beyond `deps`) and on managed sources (the declared sources in
their loader chain), additive and absent when empty. A job's write set
claims a selected model's `loads` and each loaded source's chain, so the
worker no longer refuses those runs. A directly selected source claims only
itself, as only its own loader runs.

An intermediate loader that no source declares stays unclaimed, so runs
that need one still fail in the worker.

Models and sources that gain `loads` show as changed once, on the first
publication after upgrading.
@kvlonge kvlonge added the full-verify Run the full Verify matrix on this pull request label Nov 13, 2026
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 13, 2026
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 2b67a43 Nov 13, 2026
51 checks passed
@chio-labs-delivery
chio-labs-delivery Bot deleted the fix/claim-hook-and-chain-loads branch November 13, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-verify Run the full Verify matrix on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant