feat(api): actress sync API surface (phase 4/6) - #210
Conversation
Summary
Testing
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6acdba60f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3b79b916d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| func supportsActressMetadata(scraper models.Scraper) bool { | ||
| _, ok := scraper.(models.ActressMetadataResolver) | ||
| return ok |
There was a problem hiding this comment.
Advertise only actress resolvers the sync worker can invoke
For a registered scraper outside the built-in name set that implements ActressMetadataResolver, this endpoint reports supports_actress_metadata: true and the new priority validator accepts it, but worker.actressMetadataScrapers only admits the hard-coded names dmm, r18dev, javdb, and minnanoav (internal/worker/actress_sync.go:1035-1049). Selecting such a resolver exclusively therefore produces no resolver calls even though the API declares it supported; either discovery in the worker should use the interface or this capability must reflect the worker's actual allowlist.
Useful? React with 👍 / 👎.
8545589 to
b6eb871
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6eb871180
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
b6eb871 to
8d57197
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Phase 4 of 6: the HTTP surface for actress sync — sync-job create/list/status/cancel/tasks endpoints, slim+paginated sync-candidates, actress merge preview/apply, config presence plumbing, and swagger. This is the first user-facing phase; phases 1-3 shipped infrastructure with no endpoints.
Stacked on
integ/actress-sync-p12(epic PR #209 carrying P1+P2+P3 on current main).Audit findings addressed (API-2..API-8)
writeProtected(POST/PUT/DELETE/merge/import + sync create/cancel)core.RespondInternalError— no rawerr.Error()leakerrors.Is/errors.As— 409 NoCandidates, 503 Unavailable (never 202), cancel terminal→409/404view=+limitvalidation (unknown→400, non-numeric/≤0→400, >1000→clamp, default 500)actress_idscap 10000{items,total,limit,offset}+filter=validationretry_count/timeoutpresence plumbing (explicit-0 survives, omitted inherits)Frozen contracts consumed
ErrActressSyncManagerUnavailable(phase 3) → 503 viaerrors.IsNoCandidatesError{SkippedIDs}/ErrActressSyncNoCandidates(phase 2/3) → 409 withskipped_idsCreateJobtriple-return(job, skippedIDs, err)from phase 3ListSyncCandidatesPaged(ctx, filter, limit, offset)from phase 2R-SCOPE: P3-carried hunks finalized
PR #200 (phase 3) carried early impls of the presence plumbing + swagger
aliasesschema for compile coherence. This phase finalizes both: symmetrictimeoutpresence,marshal_presence_test.go/scrapers_yaml_presence_test.gocoverage, and endpoint-path swagger additions.Local review gate
Passed 4 rounds of kadode/kimi-k3 max-thinking review (13→9→6→0 findings). All production-code defects resolved in round 1; rounds 2-3 were test/spec-completion items.
Test plan
go build ./...greengo test -short ./...cleangolangci-lint run ./...— 0 issuesgo vetcleanfilterparam + fence fields)openspec validate --strict actress-sync-apivalid@codex review→codex: okSupersedes no PRs (stacks on epic #209). OpenSpec artifacts:
openspec/changes/actress-sync-api/.