Repository navigation
Conversation
A source now publishes manifest_v1.json, manifest_v2.json, … instead of one manifest.json. A published manifest and the files it lists never change: a change is a new file and a new manifest that points the same ID at it. A flow records the current version when it starts and resolves every artifact through that version, so a deploy never changes the templates of a running flow. - LoadSet probes manifest_v1.json upward until the loader reports one missing and keeps one Registry per version. The highest version is current unless WithPinnedVersion names an older one; with a pin only manifests up to it are read, so a broken newer manifest cannot block a rollback. Any load error other than not-found fails, so a transient fault cannot hide newer manifests. - Set.Registry loads a version above the highest it has on demand, so a flow pinned by a replica that started later still runs on one that started earlier. It fetches only up to the version asked for, holds no lock lookups wait on while fetching, and backs off for 10s after a probe that fails or finds nothing. - RegisterFromConfig rejects two rows with the same id, kind and version. LoadSet rejects an explicitly versioned row whose path differs between manifests; GetExplicit fetches such a row outside any flow, from whichever loaded manifest lists it. Latest returns a manifest's unversioned row even when it also lists explicit versions. - Set.Validate fetches every artifact a manifest lists, runs the Check for its kind and reports every missing file, malformed artifact and dangling reference at once. The core adapters gain a Check each, collected in corechecks.Checks(): a task template must name its workflow and render config, a workflow's TASK nodes a listed task or step template, and a split that runs one template for every branch a listed workflow. The core kinds move to adapter/kinds so adapters share them. - WithManifestVersion / ManifestVersionFrom carry a version across a boundary that knows nothing of artifacts. - cmd/manifestcheck checks bundles on disk for an artifacts repo's CI, reading and checking each file once across manifests, and with -base that no published manifest or artifact was changed. BREAKING CHANGE: ManifestFilename is replaced by ManifestPath(v) and LoadManifest takes a version; sources must rename manifest.json to manifest_v1.json. workflowdef.LoadVersion is removed: a manifest version replaces per-row versions for everything except explicitly versioned artifacts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
13 of 17 tasks
GetExplicit looked only in the manifests a replica had loaded. A form in a flow that a newer replica started can ask for a static data version only a newer manifest lists, and the replica serving the request may not have loaded that manifest yet. On a miss GetExplicit probes for newer manifests first, with the same back-off as Registry, whose probe is shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A render config's sections each name the template the renderer fetches for them, so a manifest that lists the render config without one of those templates fails the task's view at run time. generictemplate.Check recognises a render config by its top-level "sections" object and returns each section's templateId as a reference, and rejects a section without one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
Draft
checkImmutable read the files a base manifest lists by joining their paths onto the bundle directory, so a row naming "../x" read outside it (gosec G304). It reads through os.Root instead, which refuses such a path, and reports a deleted bundle as one problem. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An artifact source publishes
manifest_v1.json,manifest_v2.json, … andartifact.Setkeeps oneRegistryper version. A published manifest and the files it lists never change: a change is a new file plus a new manifest that points the same ID at it. A flow recordsSet.Current()when it starts and resolves every artifact throughSet.Registry(ctx, version), so a deploy never changes the templates of a running flow.This is the first of two PRs. The second threads the version through the workflow engine and taskflow, and is stacked on this branch.
Type of Change
Changes Made
LoadSetprobesmanifest_v1.jsonupward until the loader reports one missing. Any other load error fails the call, so a transient fault cannot hide newer manifests. The highest version is current unlessWithPinnedVersionnames an older one. With a pin, only manifests up to it are read, so a broken newer manifest cannot block a rollback.Set.Registryloads a version above the highest it has on demand. Replicas load their sets at different times, and a flow pinned by a newer replica must still run on an older one. A probe fetches only up to the version asked for and holds no lock that lookups wait on. After a probe that fails or finds nothing, it waits 10s before probing again.RegisterFromConfigrejects two rows with the same id, kind and version.LoadSetrejects an explicitly versioned row whose path differs between manifests.GetExplicitserves such a row outside any flow, which static data needs. On a miss it probes for newer manifests with the same back-off, because a form in a flow a newer replica started can ask for a version only a newer manifest lists.Latestreturns a manifest's unversioned row even when the manifest also lists explicit versions.Set.Validatefetches every artifact a manifest lists and runs theCheckfor its kind. It reports every missing file, malformed artifact and dangling reference at once. Each core adapter gains aCheck, collected incorechecks.Checks():adapter/kindsholds the core kind constants, so adapters that point at each other share them.WithManifestVersion/ManifestVersionFromcarry a version across a boundary that knows nothing of artifacts, such as uiprojector's template provider.cmd/manifestcheckchecks bundles on disk for an artifacts repo's CI. It checks contiguous versions,LoadSetrules andValidatefor every manifest, reading and checking each file once. With-base, it also checks that no published manifest or artifact was changed or deleted.ManifestFilenamegives way toManifestPath(v),LoadManifesttakes a version, andworkflowdef.LoadVersionis removed.Testing
Run with
go test -race ./artifact/.... The tests cover:Registrycalls;GetExplicit, andLatestpreferring the unversioned row;Validatereporting several problems together, and each adapterCheck;manifestcheckfor gaps, dangling references, and immutability edits and deletions.manifestcheckpasses on every bundle ofone-trade-artifacts(cda, cda-v2, customs, customs-v2, fcau, npqs, sltb, tnsw) with eachmanifest.jsonrenamed tomanifest_v1.json. That run includes the duplicate-row fix in OpenNSW/one-trade-artifacts (linked below).Checklist
Related Issues
N/A
Screenshots/Demo
N/A
Additional Notes
template_ids.s3:ListBucket. Without it, S3 reports a missing key as access denied, andLoadSetfails instead of ending the probe.🤖 Generated with Claude Code