From 6c0fc351b2e8223c7ff05763a4b8d878f84384a8 Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Fri, 24 Jul 2026 18:28:14 +0800 Subject: [PATCH 1/2] ci(spec-sync): tell the wiring prompt to scope the 504 remediation per endpoint The prompt said "route a 504 through raise_if_sync_timeout" without noting the helper's message was parse/extract-specific, so a wired build_schema inherited a 504 hint pointing at the wrong async resource. Instruct the AI to pass the endpoint's own `jobs_resource` (extending the helper if needed) so future regenerations name the correct *_jobs route. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/spec-sync.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spec-sync.yml b/.github/workflows/spec-sync.yml index b1753af..e67ff6f 100644 --- a/.github/workflows/spec-sync.yml +++ b/.github/workflows/spec-sync.yml @@ -406,7 +406,11 @@ jobs: - Add a resource module under src/landingai_ade/resources/v2/ with a sync run() (multipart or JSON per the spec; route a 504 through - lib/v2_errors.raise_if_sync_timeout) and, for an async route, a *JobsResource with + lib/v2_errors.raise_if_sync_timeout, passing THIS endpoint's own async route as + `jobs_resource` — e.g. `build_schema_jobs` — so the 504 remediation names the right + resource; never let it fall back to a parse/extract-specific message, and if the + helper doesn't yet take a per-endpoint `jobs_resource`, extend it rather than reusing + another endpoint's wording) and, for an async route, a *JobsResource with create / get / wait / list. Decide multipart-vs-JSON from the SPEC, not from a generated class name: an operation accepts file uploads iff its `requestBody.content` has a `multipart/form-data` variant with a property (or array From b4a6e74d6829f1113039056d95f6a4d6e84efecb Mon Sep 17 00:00:00 2001 From: Tian Lan <86591280+tian-lan-landing@users.noreply.github.com> Date: Fri, 24 Jul 2026 18:34:54 +0800 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/spec-sync.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spec-sync.yml b/.github/workflows/spec-sync.yml index e67ff6f..e36efbb 100644 --- a/.github/workflows/spec-sync.yml +++ b/.github/workflows/spec-sync.yml @@ -409,8 +409,9 @@ jobs: lib/v2_errors.raise_if_sync_timeout, passing THIS endpoint's own async route as `jobs_resource` — e.g. `build_schema_jobs` — so the 504 remediation names the right resource; never let it fall back to a parse/extract-specific message, and if the - helper doesn't yet take a per-endpoint `jobs_resource`, extend it rather than reusing - another endpoint's wording) and, for an async route, a *JobsResource with + helper doesn't yet take a per-endpoint `jobs_resource`, extend it and update every + existing call site and helper test to pass its own matching resource rather than + reusing another endpoint's wording) and, for an async route, a *JobsResource with create / get / wait / list. Decide multipart-vs-JSON from the SPEC, not from a generated class name: an operation accepts file uploads iff its `requestBody.content` has a `multipart/form-data` variant with a property (or array