Repository navigation
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ocuALBprYy13aVai5MaVb
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1197 +/- ##
==========================================
+ Coverage 95.68% 95.71% +0.03%
==========================================
Files 62 62
Lines 6651 6656 +5
==========================================
+ Hits 6364 6371 +7
+ Misses 287 285 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
apify-factory
left a comment
There was a problem hiding this comment.
One thing to fix before merge.
Compared with:
apify/apify-coresrc/api/src/routes/actor_runs/run_abort.ts:28: The POST abort handler readsgracefullyonly fromreq.queryviaparseBooleanParameterand never reads the request body.apify/apify-client-jssrc/resource_clients/run.ts:156: The JSRunClient.abort()sendsgracefullyas a query param viabuildParams, with no body, which this change no longer matches.apify/apify-sdk-pythonsrc/apify/_actor.py:1169:Actor.abort()and_child_runs.py:267callrun_client.abort(gracefully=...), and with this change those calls would silently lose the graceful behaviour.
🏭 Factory review — ℹ️ not auto-approved
This change was reviewed but cannot be auto-approved: a gate failed, so the review cannot end in an approval.
| check | result |
|---|---|
| Static gates | ❌ 15/16 — pr-open-and-ready |
| Review findings | ❌ not clean |
| Reviewer escalation | ❌ Changes the wire format of a public API call (the abort request), and the API does not accept the new format. |
Juror 1 — claude-sonnet-5-5, adversarial |
⏭️ skipped — a gate failed |
Why it was not auto-approved
Failed gates:
pr-open-and-ready: PR is a draft
The comments above are the review itself; this section only explains the approval decision. Push a change and request @apify-factory again to re-run it, or ask a human to review.
Reviewed 210ad0bd1 · workflow run
| method='POST', | ||
| params=self._build_params(gracefully=gracefully), | ||
| headers={'content-type': 'application/json'}, | ||
| data=json.dumps(_build_abort_body(gracefully=gracefully)), |
There was a problem hiding this comment.
Important: the abort handler reads gracefully only from the query string, so moving it into the JSON body means the API silently ignores it and abort(gracefully=True) always aborts immediately. (apify-core src/api/src/routes/actor_runs/run_abort.ts:28)
| method='POST', | ||
| params=self._build_params(gracefully=gracefully), | ||
| headers={'content-type': 'application/json'}, | ||
| data=json.dumps(_build_abort_body(gracefully=gracefully)), |
There was a problem hiding this comment.
Important: the async client has the same problem. The API never reads gracefully from the body, so Actor.abort(gracefully=True) in the SDK and the graceful abort of child runs both stop running Actors right away and skip the aborting/persistState events. (apify-sdk-python src/apify/_child_runs.py:267)
apify-factory
left a comment
There was a problem hiding this comment.
One thing to fix before merge.
🏭 Factory review — ℹ️ not auto-approved
This change was reviewed but cannot be auto-approved: a gate failed, so the review cannot end in an approval.
| check | result |
|---|---|
| Static gates | ❌ 15/16 — pr-open-and-ready |
| Review findings | ❌ not clean |
| Reviewer escalation | ❌ Changes the wire format of a public API call used by the Python SDK (Actor.abort and child-run cleanup), and the API does not read the new body field. |
Juror 1 — claude-sonnet-5-5, adversarial |
⏭️ skipped — a gate failed |
Why it was not auto-approved
Failed gates:
pr-open-and-ready: PR is a draft
The comments above are the review itself; this section only explains the approval decision. Push a change and request @apify-factory again to re-run it, or ask a human to review.
Reviewed 210ad0bd1 · workflow run
| method='POST', | ||
| params=self._build_params(gracefully=gracefully), | ||
| headers={'content-type': 'application/json'}, | ||
| data=json.dumps(_build_abort_body(gracefully=gracefully)), |
There was a problem hiding this comment.
Important: the abort handler reads gracefully only from the query string and ignores the body, so abort(gracefully=True) now aborts the run immediately instead of gracefully (same in the async client at line 691). (apify-core src/api/src/routes/actor_runs/run_abort.ts:28)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ocuALBprYy13aVai5MaVb
apify-factory
left a comment
There was a problem hiding this comment.
One thing to fix before merge.
🏭 Factory review — ℹ️ not auto-approved
This change was reviewed but cannot be auto-approved: a gate failed, so the review cannot end in an approval.
| check | result |
|---|---|
| Static gates | ❌ 15/16 — pr-open-and-ready |
| Review findings | ❌ not clean |
| Reviewer escalation | ❌ Changes the wire format of a public API call, and the API does not accept the new format. |
Juror 1 — claude-sonnet-5-5, adversarial |
⏭️ skipped — a gate failed |
Why it was not auto-approved
Failed gates:
pr-open-and-ready: PR is a draft
The comments above are the review itself; this section only explains the approval decision. Push a change and request @apify-factory again to re-run it, or ask a human to review.
Reviewed abc3fc107 · workflow run
| method='POST', | ||
| params=self._build_params(gracefully=gracefully), | ||
| headers={'content-type': 'application/json'}, | ||
| data=json.dumps(_build_abort_body(gracefully=gracefully)), |
There was a problem hiding this comment.
Important: the abort endpoint only reads gracefully from the query string, so a flag sent in the body is ignored. Every abort(gracefully=True) call, including the SDK's Actor.abort and child-run cleanup, now does a hard abort instead of a graceful one. (apify-core src/api/src/routes/actor_runs/run_abort.ts:28)
| method='POST', | ||
| params=self._build_params(gracefully=gracefully), | ||
| headers={'content-type': 'application/json'}, | ||
| data=json.dumps(_build_abort_body(gracefully=gracefully)), |
There was a problem hiding this comment.
Important: the async client has the same regression. The API never reads gracefully from the body, so await abort(gracefully=True) silently turns into a forced abort. (apify-core src/api/src/routes/actor_runs/run_abort.ts:28)
|
Testing the AI review. Seems ok. |
RunClient.abort()now sends thegracefullyflag as a JSON body instead of a query parameter, in both the sync and async client.The flag is left out of the body when the caller does not set it, so the default request stays unchanged.
Unit tests cover the default, graceful, and forced variants.
Generated by Claude Code