Skip to content

feat(release): carry upload-rule ids on domain Release#101

Merged
ben-miru merged 11 commits into
mainfrom
feat/release-carry-upload-rule-ids
Jun 30, 2026
Merged

feat(release): carry upload-rule ids on domain Release#101
ben-miru merged 11 commits into
mainfrom
feat/release-carry-upload-rule-ids

Conversation

@ben-miru

@ben-miru ben-miru commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Domain Release now carries upload_rule_ids: Vec<UploadRuleID>, populated from the server-side upload_rules expansion. From<backend_client::Release> is replaced with a Release::from_backend(release, upload_rule_ids) constructor, threaded through deserialize via #[serde(default)].
  • Re-vendors api/specs/backend/v04.yaml from openapi main to pick up the new getRelease expand param (openapi #167) and regenerates models, adding a ReleaseExpansion model.
  • The get-release service now requests the expansion (fetch_release passes &["upload_rules"]) and projects the expanded rule ids onto the Release. If the backend fails to expand, it hard-errors (ServiceErr::UploadRulesNotExpanded) rather than silently caching an empty set that would poison the shared release store — mirroring the deployment-sync path.
  • Deployment sync (store_expanded_release) links the ids onto the stored Release, while still writing full rule bodies into the separate append-only upload_rules store.

Split out of the in-progress uploads branch (#93) so it can be reviewed and merged independently; this should merge before #93. The uploader-feeding work (active-rule traversal + syncer push) intentionally stays on #93.

Validation: cargo check --workspace clean; full test suite green (1349 passing); preflight clean; separate lint gate clean.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

ben-miru and others added 11 commits June 30, 2026 14:05
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The get-release service used unwrap_or_default() on the upload_rules
expansion, silently caching an empty upload_rule_ids set when the backend
omitted the expansion. Because get caches with Overwrite::Allow into the
same release store that sync reads with write_if_absent, a single
missing-expansion fetch poisoned the store permanently. Mirror the sync
path: hard-error via the new ServiceErr::UploadRulesNotExpanded (keyed on
release_id) so the contract violation is loud and never cached. An empty
but present expansion still yields empty ids.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a From<UploadRulesNotExpandedErr> for ServiceErr conversion test to
restore the services module coverage gate (was 94.47%, requires 95.01%).
Also apply cargo fmt to the release get fallback assertion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ben-miru ben-miru merged commit 321be41 into main Jun 30, 2026
3 checks passed
@ben-miru ben-miru deleted the feat/release-carry-upload-rule-ids branch June 30, 2026 22:06
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.

1 participant