Skip to content

chore(api): sync vendored backend openapi spec and regen models#100

Merged
ben-miru merged 6 commits into
mainfrom
chore/sync-openapi-spec-models
Jun 30, 2026
Merged

chore(api): sync vendored backend openapi spec and regen models#100
ben-miru merged 6 commits into
mainfrom
chore/sync-openapi-spec-models

Conversation

@ben-miru

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

Copy link
Copy Markdown
Contributor

Summary

  • Re-vendor the backend OpenAPI spec (api/specs/backend/v04.yaml) and regenerate Rust models via api/regen.sh to match openapi main's agent bundle.
  • Drop the per-rule poll_interval_secs field from UploadRuleSource (openapi #166); the agent now uses a single global polling cadence instead of a per-rule interval. Updates the hand-written domain model agent/src/models/upload_rule.rs and two test fixtures.
  • Add an optional content field to the generated BaseUploadRule model, intentionally left unsurfaced in the agent's domain model (out of scope here).
  • agent/src/workers/poller.rs is untouched — its poll interval is the unrelated sync poller.
  • Validation clean: cargo check --workspace, full test suite (1346 passed), ./scripts/preflight.sh, and ./scripts/lint.sh all green.

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 6 commits June 30, 2026 10:02
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…openapi main

Remove per-rule poll_interval_secs from UploadRuleSource and add optional content to BaseUploadRule, matching openapi main (316936e). Regenerated backend models via api/regen.sh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…el and tests

Remove the field from the domain UploadRuleSource struct and its From<backend_client::UploadRuleSource> impl, and from the storage/model test fixtures. Add content: None to the explicit backend_client::BaseUploadRule test literal so it compiles with the new generated field.

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>
@ben-miru ben-miru merged commit b6bbb6d into main Jun 30, 2026
3 checks passed
@ben-miru ben-miru deleted the chore/sync-openapi-spec-models branch June 30, 2026 20:55
ben-miru added a commit that referenced this pull request Jun 30, 2026
After openapi removed poll_interval_secs from the upload-rule contract (#100),
the uploader can no longer read a per-rule interval. Collapse the per-rule
cadence to the single global min_poll_interval_secs: every rule's next scan is
one global interval out. Update the test fixtures (remove the poll_interval_secs
arg from rule_with) and rewrite scan_honors_per_rule_cadence as
scan_uses_global_cadence (both rules now come due together each tick).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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