Skip to content

Chore/papi 4701 scheduling payload - #479

Merged
nahua-aignx merged 2 commits into
mainfrom
chore/PAPI-4701-scheduling-payload
Mar 23, 2026
Merged

Chore/papi 4701 scheduling payload#479
nahua-aignx merged 2 commits into
mainfrom
chore/PAPI-4701-scheduling-payload

Conversation

@nahua-aignx

Copy link
Copy Markdown
Contributor

No description provided.

CopilotAI review requested due to automatic review settings March 17, 2026 10:14
@codecov

codecovBot commented Mar 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.23077% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing linesPatch %Lines
src/aignostics/application/_utils.py94.11%1 Missing and 1 partial ⚠️
...application/_gui/_page_application_run_describe.py87.50%0 Missing and 1 partial ⚠️
Files with missing linesCoverage Δ
src/aignostics/application/_service.py61.03% <100.00%> (-6.40%)⬇️
src/aignostics/platform/resources/runs.py65.21% <ø> (ø)
...application/_gui/_page_application_run_describe.py59.39% <87.50%> (+0.46%)⬆️
src/aignostics/application/_utils.py88.88% <94.11%> (-5.91%)⬇️

... and 13 files with indirect coverage changes

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK to use the Platform API’s first-class scheduling field for run submission/inspection (instead of embedding scheduling into custom_metadata), and regenerates the OpenAPI client to API spec v1.4.0 which introduces scheduling models and additional endpoints/params.

Changes:

  • Pass scheduling as a top-level field when submitting runs (CLI/service + platform runs resource), and display/consume scheduling from run responses (GUI + e2e).
  • Update deadline-exceeded logic to prefer the API response scheduling.deadline, with a fallback to legacy custom_metadata.
  • Regenerate OpenAPI artifacts to v1.4.0 (adds scheduling request/response models, new artifact URL endpoint, and for_organization filter for list runs).

Reviewed changes

Copilot reviewed 7 out of 51 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
tests/aignostics/platform/e2e_test.pyAdjusts e2e submission to send top-level scheduling and reads deadline from response scheduling field (fallback to legacy metadata).
tests/aignostics/application/utils_test.pyAdds/updates unit tests for deadline-exceeded logic with new scheduling-first behavior.
src/aignostics/platform/resources/runs.pyExtends runs.submit() to accept and forward top-level scheduling.
src/aignostics/application/_utils.pyChanges deadline-exceeded helper to prioritize response scheduling, with legacy metadata fallback.
src/aignostics/application/_service.pyBuilds and forwards scheduling payload to platform runs submission; updates static run listing to pass scheduling.
src/aignostics/application/_gui/_page_application_run_describe.pyDisplays due date / deadline from the run response scheduling field.
codegen/out/docs/PublicApi.mdRegenerated API docs (v1.4.0), including new artifact URL endpoint and updated list runs params.
codegen/out/aignx/codegen/rest.pyUpdates generated client header to OpenAPI doc version 1.4.0.
codegen/out/aignx/codegen/models/version_read_response.pyRegenerated model (adds stricter version typing/validation).
codegen/out/aignx/codegen/models/validation_error_loc_inner.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/validation_error.pyRegenerated model to include input/ctx.
codegen/out/aignx/codegen/models/user_read_response.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/scheduling_response.pyNew generated model for scheduling fields returned in run responses.
codegen/out/aignx/codegen/models/scheduling_request.pyNew generated model for scheduling constraints in run creation.
codegen/out/aignx/codegen/models/run_termination_reason.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/run_state.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/run_read_response.pyAdds scheduling field to run response model.
codegen/out/aignx/codegen/models/run_output.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/run_item_statistics.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/run_creation_response.pyMakes run_id required (per spec).
codegen/out/aignx/codegen/models/run_creation_request.pyAdds scheduling to run creation request model.
codegen/out/aignx/codegen/models/output_artifact_visibility.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/output_artifact_scope.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/output_artifact_result_read_response.pyAdjusts error fields ordering and marks download_url deprecated in schema representation.
codegen/out/aignx/codegen/models/output_artifact.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/organization_read_response.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/me_read_response.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/item_termination_reason.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/item_state.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/item_result_read_response.pyAdds error_code as an explicit nullable field ordering in generated model.
codegen/out/aignx/codegen/models/item_output.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/item_creation_request.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/input_artifact_creation_request.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/input_artifact.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/http_validation_error.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/custom_metadata_update_response.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/custom_metadata_update_request.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/artifact_termination_reason.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/artifact_state.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/artifact_output.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/application_version.pyRegenerated model (adds stricter version typing/validation).
codegen/out/aignx/codegen/models/application_read_short_response.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/application_read_response.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/models/init.pyUpdates exported generated models to include scheduling request/response.
codegen/out/aignx/codegen/exceptions.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/configuration.pyUpdates debug report API version to 1.4.0.
codegen/out/aignx/codegen/api_client.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/api/public_api.pyUpdates resource paths and adds new artifact URL endpoint + list runs for_organization param.
codegen/out/.openapi-generator/FILESAdds scheduling request/response files to generator manifest.
codegen/in/openapi.jsonUpdates OpenAPI spec to v1.4.0 and adds scheduling + new endpoint/params.
codegen/in/archive/openapi_1.4.0.jsonAdds archived OpenAPI 1.4.0 spec snapshot.

Comment threadsrc/aignostics/application/_service.py Outdated
Comment threadtests/aignostics/platform/e2e_test.py Outdated
Comment threadsrc/aignostics/application/_utils.py
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from e3cd812 to fe73569CompareMarch 17, 2026 11:47
@nahua-aignx
nahua-aignx marked this pull request as ready for review March 17, 2026 13:24
CopilotAI review requested due to automatic review settings March 17, 2026 13:24
@claude

claudeBot commented Mar 17, 2026

Copy link
Copy Markdown

Claude finished @nahua-aignx's task in 14m 51s —— View job


PR Review: Scheduling Payload Migration (PAPI-4701)

This PR migrates scheduling information from custom_metadata to first-class API fields in the Platform API v1.4.0. I've conducted a thorough review following the Aignostics Python SDK standards.


Summary

✅ What's Good:

  • Clean separation of concerns: scheduling moved from metadata to top-level API field
  • Comprehensive test coverage for new scheduling logic (unit tests added)
  • Backward compatibility maintained with fallback to custom_metadata
  • All tests properly marked (744 tests with unit, integration, or e2e markers)
  • Linting passes (ruff, pyright, mypy all green ✅)
  • Conventional commits followed correctly

⚠️ Issues Found:

3 issues identified (2 from Copilot review confirmed + 1 additional) - see inline comments for details.


Critical Issues (Must Fix Before Merge)

1. 🚨 Breaking Change: Parameter Order in is_not_terminated_with_deadline_exceeded

Location:src/aignostics/application/_utils.py:137

Issue: Function signature changed parameter order, breaking backward compatibility for positional argument callers.

Fix: Make scheduling keyword-only to prevent silent failures. See inline comment for detailed fix.


2. ⚠️ Missing Validation for deadline Parameter

Location:src/aignostics/application/_service.py:1034

Issue:deadline is passed to API without local validation (unlike due_date which is validated).

Fix: Add _validate_deadline() method and call it before submission. See inline comment for implementation guidance.


Minor Issues

3. Typo in Comment

Location:tests/aignostics/platform/e2e_test.py:316

Issue:fiond should be find

Fix: One-liner fix suggested in inline comment.


Architecture & Code Quality Review

✅ Modulith Architecture Compliance

  • Changes properly isolated to platform and application modules
  • Service layer changes only (no CLI/GUI coupling)
  • Dependency hierarchy maintained

✅ Testing Strategy

  • All new tests correctly marked with @pytest.mark.unit
  • Tests cover both new scheduling path and legacy fallback
  • Tests verify precedence (scheduling takes priority over custom_metadata)
  • No unmarked tests found ✅ (critical check passed)

✅ Type Safety

  • Both MyPy strict and PyRight basic modes pass
  • Type hints present for all new code
  • Generated OpenAPI models properly typed (SchedulingRequest, SchedulingResponse)

✅ Medical Device Security

  • No secrets or tokens in code
  • Proper datetime handling with timezone awareness
  • Sensitive data masking maintained

✅ Documentation

  • Docstrings present for new functions
  • Clear explanation of scheduling precedence
  • OpenAPI docs regenerated (v1.4.0)

Generated Code Review

The bulk of changes (+3000 lines) are in codegen/ - auto-generated from OpenAPI spec v1.4.0:

✅ Key additions:

  • SchedulingRequest model (due_date, deadline as Optional[datetime])
  • SchedulingResponse model (same fields)
  • RunCreationRequest now accepts scheduling field
  • RunReadResponse now returns scheduling field
  • Both models properly handle nullable fields and timezone-aware datetimes

Test Coverage Note

SonarQube reports 0% coverage on new code - this may be because:

  1. Tests were still running during SonarQube scan
  2. New scheduling code paths need additional test coverage
  3. Generated code (codegen/) is counted but excluded from tests

Recommendation: Verify coverage locally after full test suite completes:

uv run pytest tests/aignostics/application/ \
--cov=src/aignostics/application \
--cov-report=term-missing

Commit Quality

✅ All commits follow conventional commit format:

  1. chore(python-sdk): Run make codegen to update generated code
  2. chore(python-sdk): Use scheduling payload when creating runs
  3. chore(python-sdk): Update tests

Quick Fix Commands

# 1. Fix typo
sed -i 's/fiond/find/g' tests/aignostics/platform/e2e_test.py
# 2. Verify linting still passes
make lint
# 3. Verify tests pass 
make test_unit && make test_integration
# 4. Check coverage
uv run coverage report --fail-under=85

The other two fixes (parameter order and deadline validation) require code changes - see inline comments for detailed guidance.


Final Verdict

Status: ⚠️ CHANGES REQUESTED

This is a well-structured refactoring with good backward compatibility strategy. However, the breaking change in function signature (issue #1) must be addressed to prevent silent failures in downstream code.

Priority:

  1. CRITICAL: Fix parameter order breaking change
  2. HIGH: Add deadline validation
  3. LOW: Fix typo

Once these issues are addressed, this PR will be ready to merge. Great work on the comprehensive test coverage and maintaining backward compatibility with the fallback logic! 🎉


Standards Applied:

  • ✅ CLAUDE.md architecture principles
  • ✅ Test marker requirements (all 744 tests marked correctly)
  • ✅ Type checking (MyPy strict + PyRight basic both pass)
  • ✅ Conventional commits
  • ✅ Medical device security standards
  • ⏳ 85% coverage requirement (pending final verification)
    | Branch: chore/PAPI-4701-scheduling-payload

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK to support a first-class scheduling field in run submission payloads (instead of embedding scheduling under custom_metadata), and updates run consumers (service/UI/tests) to prefer the scheduling field returned by the API while keeping backward compatibility for older runs.

Changes:

  • Add scheduling to run submission (Runs.submit(...)) and update application run submission/service + e2e test payloads accordingly.
  • Update deadline handling logic to prefer run.scheduling.deadline (API response) with fallback to legacy custom_metadata["sdk"]["scheduling"]["deadline"], and expand unit tests around this behavior.
  • Regenerate OpenAPI client artifacts for API v1.4.0 (adds scheduling request/response models and new/updated endpoints).

Reviewed changes

Copilot reviewed 7 out of 51 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
tests/aignostics/platform/e2e_test.pySubmits scheduling as a top-level payload field and reads deadline from API scheduling response with legacy fallback.
tests/aignostics/application/utils_test.pyAdds unit tests for scheduling-object precedence and updates existing tests to use the new function signature.
src/aignostics/platform/resources/runs.pyExtends Runs.submit() to accept an optional scheduling payload field.
src/aignostics/application/_utils.pyUpdates deadline-exceeded logic to prefer API scheduling response with fallback to legacy custom metadata.
src/aignostics/application/_service.pyBuilds/forwards scheduling as a top-level run submission field and updates run listing to pass scheduling to deadline helper.
src/aignostics/application/_gui/_page_application_run_describe.pyDisplays scheduling (due date/deadline) from the API response in the run describe UI.
codegen/out/docs/PublicApi.mdRegenerated API docs reflecting v1.4.0 additions/changes.
codegen/out/aignx/codegen/rest.pyBumps generated OpenAPI document version metadata to 1.4.0.
codegen/out/aignx/codegen/models/version_read_response.pyRegenerated model (adds validators/typing updates).
codegen/out/aignx/codegen/models/validation_error_loc_inner.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/validation_error.pyRegenerated model (adds input/ctx fields).
codegen/out/aignx/codegen/models/user_read_response.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/scheduling_response.pyNew generated model for scheduling fields in run responses.
codegen/out/aignx/codegen/models/scheduling_request.pyNew generated model for scheduling constraints in run creation requests.
codegen/out/aignx/codegen/models/run_termination_reason.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/run_state.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/run_read_response.pyRegenerated model adding scheduling: Optional[SchedulingResponse].
codegen/out/aignx/codegen/models/run_output.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/run_item_statistics.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/run_creation_response.pyRegenerated model (makes run_id required).
codegen/out/aignx/codegen/models/run_creation_request.pyRegenerated model adding scheduling: Optional[SchedulingRequest].
codegen/out/aignx/codegen/models/output_artifact_visibility.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/output_artifact_scope.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/output_artifact_result_read_response.pyRegenerated model (field ordering/defaults adjusted; download_url marked deprecated in spec).
codegen/out/aignx/codegen/models/output_artifact.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/organization_read_response.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/me_read_response.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/item_termination_reason.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/item_state.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/item_result_read_response.pyRegenerated model (adds error_code and adjusts required fields).
codegen/out/aignx/codegen/models/item_output.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/item_creation_request.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/input_artifact_creation_request.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/input_artifact.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/http_validation_error.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/custom_metadata_update_response.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/custom_metadata_update_request.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/artifact_termination_reason.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/artifact_state.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/artifact_output.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/application_version.pyRegenerated model (adds validators/typing updates).
codegen/out/aignx/codegen/models/application_read_short_response.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/application_read_response.pyRegenerated model header/version metadata.
codegen/out/aignx/codegen/models/init.pyRegenerated exports (adds scheduling models and reorders exports).
codegen/out/aignx/codegen/exceptions.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/configuration.pyRegenerated metadata (API version string updated).
codegen/out/aignx/codegen/api_client.pyRegenerated header/version metadata.
codegen/out/aignx/codegen/api/public_api.pyRegenerated client (paths updated, adds artifact download endpoint, adds for_organization to list runs).
codegen/out/.openapi-generator/FILESRegenerated file manifest including new scheduling models.
codegen/in/openapi.jsonUpdates stored OpenAPI spec to 1.4.0, including scheduling and new endpoints/fields.
codegen/in/archive/openapi_1.4.0.jsonAdds archived OpenAPI 1.4.0 spec snapshot.

Comment threadsrc/aignostics/application/_utils.py
Comment threadsrc/aignostics/application/_utils.py
Comment threadsrc/aignostics/application/_utils.py
Comment threadsrc/aignostics/application/_service.py Outdated
Comment threadtests/aignostics/platform/e2e_test.py Outdated
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from fe73569 to d445eb0CompareMarch 17, 2026 14:44
CopilotAI review requested due to automatic review settings March 18, 2026 07:37
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from d445eb0 to aa5de65CompareMarch 18, 2026 07:37

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK to use the new top-level scheduling payload for run submission (instead of embedding scheduling data in custom_metadata), and refreshes the generated OpenAPI client artifacts to API version 1.4.0.

Changes:

  • Add scheduling support to run submission and propagate it through CLI/service usage and E2E validation.
  • Update deadline-exceeded logic to prefer the API response scheduling field, with legacy fallback to custom_metadata.
  • Regenerate OpenAPI code/docs (API 1.4.0), including new scheduling models and a new artifact download endpoint.

Reviewed changes

Copilot reviewed 8 out of 53 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
tests/aignostics/platform/e2e_test.pySubmits runs with top-level scheduling and validates deadlines from API response (with fallback).
tests/aignostics/application/utils_test.pyExpands unit tests for deadline handling with a primary scheduling-object path + legacy metadata fallback.
tests/aignostics/application/cli_pipeline_validation_test.pyAdjusts CLI submit test deadline to avoid immediate-expiry edge case.
src/aignostics/platform/resources/runs.pyAdds optional scheduling param to submit() and forwards it into RunCreationRequest.
src/aignostics/application/_utils.pyUpdates deadline-exceeded helper to prefer scheduling.deadline over legacy metadata.
src/aignostics/application/_service.pyPasses run.scheduling into deadline-exceeded helper when listing runs.
src/aignostics/application/_gui/_page_application_run_describe.pyDisplays scheduling due date/deadline from run response in the GUI describe view.
codegen/out/docs/PublicApi.mdUpdates generated public API docs (adds artifact URL endpoint; updates list-runs parameter docs).
codegen/out/aignx/codegen/rest.pyUpdates generated client header to OpenAPI version 1.4.0.
codegen/out/aignx/codegen/models/version_read_response.pyGenerated model updates (adds regex validation for semantic version).
codegen/out/aignx/codegen/models/validation_error_loc_inner.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/validation_error.pyGenerated model updated to include input and ctx fields.
codegen/out/aignx/codegen/models/user_read_response.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/scheduling_response.pyNew generated model for scheduling fields returned by run responses.
codegen/out/aignx/codegen/models/scheduling_request.pyNew generated model for scheduling constraints in run creation.
codegen/out/aignx/codegen/models/run_termination_reason.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/run_state.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/run_read_response.pyAdds scheduling to run read response model.
codegen/out/aignx/codegen/models/run_output.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/run_item_statistics.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/run_creation_response.pyMakes run_id required in the creation response model.
codegen/out/aignx/codegen/models/run_creation_request.pyAdds scheduling to run creation request model.
codegen/out/aignx/codegen/models/output_artifact_visibility.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/output_artifact_scope.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/output_artifact_result_read_response.pyGenerated model updates around error_code and download_url field ordering/defaults.
codegen/out/aignx/codegen/models/output_artifact.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/organization_read_response.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/me_read_response.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/item_termination_reason.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/item_state.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/item_result_read_response.pyGenerated item result model updates (notably error_code placement/defaults).
codegen/out/aignx/codegen/models/item_output.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/item_creation_request.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/input_artifact_creation_request.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/input_artifact.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/http_validation_error.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/custom_metadata_update_response.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/custom_metadata_update_request.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/artifact_termination_reason.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/artifact_state.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/artifact_output.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/application_version.pyGenerated model updates (adds regex validation for semantic version).
codegen/out/aignx/codegen/models/application_read_short_response.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/application_read_response.pyGenerated model header version bump to 1.4.0.
codegen/out/aignx/codegen/models/init.pyUpdates generated model export list to include new scheduling models.
codegen/out/aignx/codegen/exceptions.pyGenerated code header version bump to 1.4.0.
codegen/out/aignx/codegen/configuration.pyGenerated config updates API version shown in debug report.
codegen/out/aignx/codegen/api_client.pyGenerated code header version bump to 1.4.0.
codegen/out/aignx/codegen/api/public_api.pyAdds generated method for artifact URL endpoint; updates list-runs query args.
codegen/out/.openapi-generator/FILESAdds scheduling model files to generator manifest.
codegen/in/openapi.jsonUpdates bundled OpenAPI spec to 1.4.0 (scheduling fields, new endpoint, etc.).
codegen/in/archive/openapi_1.4.0.jsonStores archived OpenAPI 1.4.0 spec snapshot.
MakefileMinor formatting tweaks + adjusts sed -i invocation formatting for codegen patch step.

Comment threadsrc/aignostics/application/_utils.py
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from aa5de65 to 92d9a29CompareMarch 18, 2026 09:33
CopilotAI review requested due to automatic review settings March 18, 2026 09:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK to send run scheduling constraints (due_date, deadline) via the first-class scheduling request field (instead of embedding them under custom_metadata.sdk.scheduling), and refreshes the generated OpenAPI client/models to API version 1.4.0.

Changes:

  • Move scheduling payload to top-level scheduling in run submission flows (SDK, CLI/GUI, and e2e tests), with backward-compatible read fallback to legacy custom_metadata.
  • Add/extend validation utilities (validate_deadline, cross-field scheduling constraints) and broaden unit test coverage for the new scheduling response shape.
  • Regenerate OpenAPI client/docs/models for API v1.4.0 (adds scheduling request/response models and new endpoints/params).

Reviewed changes

Copilot reviewed 10 out of 55 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
tests/aignostics/platform/e2e_test.pySends scheduling as top-level field and reads deadline from response scheduling with legacy fallback.
tests/aignostics/application/utils_test.pyAdds unit tests for deadline-exceeded logic using scheduling response object, plus legacy fallback tests.
tests/aignostics/application/service_test.pyAdds unit tests for validate_deadline and cross-field scheduling constraint validation.
tests/aignostics/application/gui_test.pyAdjusts GUI scheduling test inputs (due date + deadline).
tests/aignostics/application/cli_pipeline_validation_test.pyAvoids deadline=now by pushing CLI deadline slightly into the future.
src/aignostics/platform/resources/runs.pyAdds scheduling parameter to runs.submit() and includes it in RunCreationRequest.
src/aignostics/application/_utils.pyAdds deadline validation + scheduling helpers; updates deadline-exceeded logic to prefer response scheduling.
src/aignostics/application/_service.pyValidates deadline + constraints; submits scheduling as top-level field.
src/aignostics/application/_gui/_page_application_run_describe.pyDisplays scheduling info from run response scheduling field.
codegen/out/docs/PublicApi.mdRegenerated API docs (incl. new artifact URL endpoint, list-runs param changes).
codegen/out/aignx/codegen/rest.pyRegenerated client runtime with updated OpenAPI version header.
codegen/out/aignx/codegen/models/version_read_response.pyRegenerated model with stricter semver validation.
codegen/out/aignx/codegen/models/validation_error_loc_inner.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/validation_error.pyRegenerated ValidationError shape (adds input, ctx).
codegen/out/aignx/codegen/models/user_read_response.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/scheduling_response.pyNew generated model for scheduling fields in run responses.
codegen/out/aignx/codegen/models/scheduling_request.pyNew generated model for scheduling constraints in run create requests.
codegen/out/aignx/codegen/models/run_termination_reason.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/run_state.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/run_read_response.pyAdds scheduling field to run read response model.
codegen/out/aignx/codegen/models/run_output.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/run_item_statistics.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/run_creation_response.pyMakes run_id required (aligns with spec).
codegen/out/aignx/codegen/models/run_creation_request.pyAdds scheduling to run creation request model.
codegen/out/aignx/codegen/models/output_artifact_visibility.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/output_artifact_scope.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/output_artifact_result_read_response.pyUpdates output artifact result fields/order and deprecations per spec.
codegen/out/aignx/codegen/models/output_artifact.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/organization_read_response.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/me_read_response.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/item_termination_reason.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/item_state.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/item_result_read_response.pyUpdates item result schema (incl. error_code field changes).
codegen/out/aignx/codegen/models/item_output.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/item_creation_request.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/input_artifact_creation_request.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/input_artifact.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/http_validation_error.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/custom_metadata_update_response.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/custom_metadata_update_request.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/artifact_termination_reason.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/artifact_state.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/artifact_output.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/application_version.pyRegenerated model with semver validation.
codegen/out/aignx/codegen/models/application_read_short_response.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/application_read_response.pyRegenerated model version header updates.
codegen/out/aignx/codegen/models/init.pyRegenerated models export list.
codegen/out/aignx/codegen/exceptions.pyRegenerated exceptions module version header updates.
codegen/out/aignx/codegen/configuration.pyUpdates debug report API version string.
codegen/out/aignx/codegen/api_client.pyRegenerated client module version header updates.
codegen/out/aignx/codegen/api/public_api.pyAdds new endpoint and updates list-runs signature/params per spec.
codegen/out/.openapi-generator/FILESTracks newly generated files (scheduling models).
codegen/in/openapi.jsonUpdates stored OpenAPI spec to 1.4.0 (adds scheduling and other schema changes).
codegen/in/archive/openapi_1.4.0.jsonAdds archived OpenAPI 1.4.0 spec snapshot.
MakefileUpdates codegen sed invocation (in-place patch step).

Comment threadMakefile Outdated
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from 6defed6 to 6f552a0CompareMarch 18, 2026 10:12
Comment threadsrc/aignostics/application/_utils.py
CopilotAI review requested due to automatic review settings March 18, 2026 10:17
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from 6f552a0 to f31112dCompareMarch 18, 2026 10:17

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK to send and consume run scheduling constraints (due_date, deadline) via the API’s first-class scheduling field (instead of embedding it in custom_metadata), and refreshes generated OpenAPI artifacts to Platform API 1.4.0.

Changes:

  • Add scheduling support to run submission (SDK + tests), and update run status/deadline logic to prefer the API response scheduling field with a legacy fallback.
  • Add validation helpers for deadline and cross-field scheduling constraints in the application service layer, plus expanded unit tests.
  • Regenerate OpenAPI client/docs (new scheduling models, new artifact download endpoint, API version bump) and improve make codegen portability.

Reviewed changes

Copilot reviewed 11 out of 55 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
tests/aignostics/platform/e2e_test.pySubmit runs with top-level scheduling; read deadline from API response with fallback.
tests/aignostics/application/utils_test.pyExpand unit tests for deadline-exceeded logic using scheduling response object + legacy metadata.
tests/aignostics/application/service_test.pyAdd unit tests for validate_deadline and validate_scheduling_constraints.
tests/aignostics/application/gui_test.pyUpdate GUI E2E scheduling inputs (due date + longer deadline).
tests/aignostics/application/cli_pipeline_validation_test.pyAvoid “deadline == now” by using a small future offset.
src/aignostics/platform/resources/runs.pyAdd scheduling arg to Runs.submit and include it in the create payload.
src/aignostics/application/_utils.pyAdd deadline validation + cross-field constraints; update deadline-exceeded logic to prefer API scheduling.
src/aignostics/application/_service.pyValidate deadline + constraints; submit scheduling as top-level request field.
src/aignostics/application/_gui/_page_application_run_describe.pyDisplay scheduling info from the API response field.
codegen/out/docs/PublicApi.mdOpenAPI doc regen; includes new endpoint and parameters.
codegen/out/aignx/codegen/**Regenerated OpenAPI client/models including scheduling request/response models.
codegen/in/openapi.jsonUpdate OpenAPI spec to 1.4.0 (scheduling fields, new endpoint, etc.).
codegen/in/archive/openapi_1.4.0.jsonArchive the 1.4.0 OpenAPI spec snapshot.
MakefileMake the sed patch step portable across GNU/BSD sed.

@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from f31112d to dd80f41CompareMarch 19, 2026 07:17
Comment threadtests/aignostics/application/service_test.py Outdated

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK and tests to support the Platform API’s new first-class scheduling field for runs (instead of embedding scheduling constraints under custom_metadata.sdk), alongside an OpenAPI spec/codegen refresh to API version 1.4.0.

Changes:

  • Add scheduling to run submission payloads and update e2e/UI flows to display/measure deadlines via the API response field.
  • Add validation helpers for deadline plus cross-field scheduling constraints (due_date < deadline) and update deadline-exceeded logic to prefer API scheduling.
  • Refresh OpenAPI spec + regenerate client/models/docs (new scheduling models, new artifact URL endpoint, schema tweaks).

Reviewed changes

Copilot reviewed 11 out of 55 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
tests/aignostics/platform/e2e_test.pySwitch e2e submission to top-level scheduling; resolve deadline from response scheduling field.
tests/aignostics/application/utils_test.pyAdd unit tests for deadline-exceeded logic using scheduling object + legacy custom_metadata fallback.
tests/aignostics/application/service_test.pyAdd unit tests for validate_deadline and validate_scheduling_constraints.
tests/aignostics/application/gui_test.pyUpdate GUI scheduling step inputs (due date + longer deadline).
tests/aignostics/application/cli_pipeline_validation_test.pyAdjust CLI tests’ deadline argument to be in the future.
src/aignostics/platform/resources/runs.pyExtend Runs.submit() with optional scheduling and include it in RunCreationRequest.
src/aignostics/application/_utils.pyAdd deadline validation + cross-field constraints; prefer API scheduling.deadline in deadline-exceeded checks.
src/aignostics/application/_service.pyValidate deadline + constraints; send scheduling as top-level run submit field.
src/aignostics/application/_gui/_page_application_run_describe.pyDisplay scheduling (due date/deadline) from run response in the describe page.
codegen/out/docs/PublicApi.mdRegenerated API docs (includes new artifact URL endpoint and parameter updates).
codegen/out/aignx/codegen/rest.pyRegenerated client header/version updates.
codegen/out/aignx/codegen/models/version_read_response.pyRegenerated model changes (semver regex validation, typing updates).
codegen/out/aignx/codegen/models/validation_error_loc_inner.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/validation_error.pyRegenerated model fields (adds input/ctx).
codegen/out/aignx/codegen/models/user_read_response.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/scheduling_response.pyNew generated model for scheduling in run responses.
codegen/out/aignx/codegen/models/scheduling_request.pyNew generated model for scheduling in run creation requests.
codegen/out/aignx/codegen/models/run_termination_reason.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/run_state.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/run_read_response.pyRegenerated model adds scheduling field.
codegen/out/aignx/codegen/models/run_output.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/run_item_statistics.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/run_creation_response.pyRegenerated model adjusts run_id requiredness/typing.
codegen/out/aignx/codegen/models/run_creation_request.pyRegenerated model adds scheduling to request schema.
codegen/out/aignx/codegen/models/output_artifact_visibility.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/output_artifact_scope.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/output_artifact_result_read_response.pyRegenerated model field ordering/optional defaults.
codegen/out/aignx/codegen/models/output_artifact.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/organization_read_response.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/me_read_response.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/item_termination_reason.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/item_state.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/item_result_read_response.pyRegenerated model field ordering/optional defaults.
codegen/out/aignx/codegen/models/item_output.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/item_creation_request.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/input_artifact_creation_request.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/input_artifact.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/http_validation_error.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/custom_metadata_update_response.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/custom_metadata_update_request.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/artifact_termination_reason.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/artifact_state.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/artifact_output.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/application_version.pyRegenerated model adds semver regex validation.
codegen/out/aignx/codegen/models/application_read_short_response.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/application_read_response.pyRegenerated model header/version updates.
codegen/out/aignx/codegen/models/init.pyRegenerated exports list ordering including scheduling models.
codegen/out/aignx/codegen/exceptions.pyRegenerated client header/version updates.
codegen/out/aignx/codegen/configuration.pyRegenerated client version string updates.
codegen/out/aignx/codegen/api_client.pyRegenerated client header/version updates.
codegen/out/aignx/codegen/api/public_api.pyRegenerated API client methods (new artifact URL endpoint, list_runs param updates, etc.).
codegen/out/.openapi-generator/FILESRegenerated file manifest includes scheduling models.
codegen/in/openapi.jsonUpdated OpenAPI input spec to 1.4.0 including scheduling fields.
codegen/in/archive/openapi_1.4.0.jsonAdded archived OpenAPI spec snapshot for 1.4.0.
MakefileMake codegen sed step portable across GNU/BSD sed variants.

Comment threadtests/aignostics/platform/e2e_test.py
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from b4db3b7 to 46699a6CompareMarch 19, 2026 08:14
CopilotAI review requested due to automatic review settings March 19, 2026 08:29

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK to use the Platform’s new first-class scheduling field on run creation (instead of embedding scheduling under custom_metadata.sdk), along with regenerating the OpenAPI client to API version 1.4.0 and adjusting tests/GUI to reflect the new contract.

Changes:

  • Add scheduling to run submission (SDK resources + application service) and validate due_date/deadline including cross-field constraints.
  • Update e2e + unit tests and GUI run description rendering to read scheduling from the API response field.
  • Regenerate OpenAPI client output for API 1.4.0 (adds scheduling models/fields, new endpoint docs, schema tweaks).

Reviewed changes

Copilot reviewed 11 out of 55 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
tests/aignostics/platform/e2e_test.pySends scheduling in submit + reads deadline from API scheduling, with fallback helper
tests/aignostics/application/utils_test.pyAdds/updates unit tests for deadline/scheduling validation + deadline exceeded logic
tests/aignostics/application/service_test.pyRemoves duplicated validate_due_date tests from service tests
tests/aignostics/application/gui_test.pyAdjusts GUI scheduling time inputs used by the test flow
tests/aignostics/application/cli_pipeline_validation_test.pyTweaks CLI deadline test input (adds small future buffer)
src/aignostics/platform/resources/runs.pyExtends Runs.submit() to accept scheduling and include it in RunCreationRequest
src/aignostics/application/_utils.pyAdds deadline + cross-field scheduling validation and updates deadline-exceeded logic to prefer API scheduling
src/aignostics/application/_service.pyValidates due_date/deadline and sends top-level scheduling in run submission
src/aignostics/application/_gui/_page_application_run_describe.pyDisplays scheduling (due date/deadline) from API response in run describe page
codegen/out/docs/PublicApi.mdRegenerated API docs (adds artifact URL endpoint, list_runs param changes, etc.)
codegen/out/aignx/codegen/rest.pyRegenerated client metadata for OpenAPI version 1.4.0
codegen/out/aignx/codegen/models/version_read_response.pyRegenerated model updates (semver regex validation, typing adjustments)
codegen/out/aignx/codegen/models/validation_error_loc_inner.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/validation_error.pyRegenerated validation error schema (adds input/ctx)
codegen/out/aignx/codegen/models/user_read_response.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/scheduling_response.pyNew generated model for scheduling returned in run responses
codegen/out/aignx/codegen/models/scheduling_request.pyNew generated model for scheduling request payload
codegen/out/aignx/codegen/models/run_termination_reason.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/run_state.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/run_read_response.pyAdds scheduling to run read response model
codegen/out/aignx/codegen/models/run_output.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/run_item_statistics.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/run_creation_response.pyRegenerated response schema (run_id required)
codegen/out/aignx/codegen/models/run_creation_request.pyAdds scheduling to run creation request model
codegen/out/aignx/codegen/models/output_artifact_visibility.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/output_artifact_scope.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/output_artifact_result_read_response.pyRegenerated artifact result schema (field ordering/defaults)
codegen/out/aignx/codegen/models/output_artifact.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/organization_read_response.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/me_read_response.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/item_termination_reason.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/item_state.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/item_result_read_response.pyRegenerated item result schema (adds error_code placement/handling)
codegen/out/aignx/codegen/models/item_output.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/item_creation_request.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/input_artifact_creation_request.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/input_artifact.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/http_validation_error.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/custom_metadata_update_response.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/custom_metadata_update_request.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/artifact_termination_reason.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/artifact_state.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/artifact_output.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/application_version.pyRegenerated model updates (semver regex validation, typing adjustments)
codegen/out/aignx/codegen/models/application_read_short_response.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/application_read_response.pyRegenerated header/version metadata
codegen/out/aignx/codegen/models/init.pyRegenerated models export list
codegen/out/aignx/codegen/exceptions.pyRegenerated header/version metadata
codegen/out/aignx/codegen/configuration.pyRegenerated version string + debug report API version
codegen/out/aignx/codegen/api_client.pyRegenerated header/version metadata
codegen/out/aignx/codegen/api/public_api.pyRegenerated Public API client (new endpoint + list_runs param changes)
codegen/out/.openapi-generator/FILESUpdates generated file manifest
codegen/in/openapi.jsonUpdates OpenAPI spec input (v1.4.0, scheduling schemas, endpoint additions)
codegen/in/archive/openapi_1.4.0.jsonAdds archived OpenAPI spec snapshot for 1.4.0
MakefileMakes the sed-based codegen patch step portable across GNU/BSD sed

Comment threadtests/aignostics/application/utils_test.py
Comment threadsrc/aignostics/application/_service.py Outdated
Comment threadtests/aignostics/platform/e2e_test.py Outdated
Comment threadtests/aignostics/application/utils_test.py
CopilotAI review requested due to automatic review settings March 20, 2026 07:39
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from 2a73414 to bbd03dbCompareMarch 20, 2026 07:39

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SDK and tests to use the Platform’s first-class run scheduling request/response fields (due date + hard deadline) instead of embedding scheduling under custom_metadata, and refreshes the generated OpenAPI client to API v1.4.0.

Changes:

  • Add top-level scheduling support when submitting runs, plus GUI/e2e adjustments to display/validate scheduling from API responses.
  • Introduce deadline validation helpers and update “deadline exceeded” logic to prefer the API scheduling field with legacy custom_metadata fallback.
  • Regenerate OpenAPI client artifacts (new scheduling models, new artifact download URL endpoint, new for_organization filter on runs listing) and improve make codegen portability.

Reviewed changes

Copilot reviewed 11 out of 55 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
tests/aignostics/platform/e2e_test.pySubmits scheduling as a top-level payload field and reads deadline from API scheduling with fallback logic.
tests/aignostics/application/utils_test.pyAdds unit tests for new scheduling validators and updated deadline-exceeded behavior.
tests/aignostics/application/service_test.pyRemoves duplicated scheduling validation tests (moved into utils tests).
tests/aignostics/application/gui_test.pyUpdates GUI e2e flow to set due date + longer deadline.
tests/aignostics/application/cli_pipeline_validation_test.pyAdjusts CLI deadline to be slightly in the future for stability.
src/aignostics/platform/resources/runs.pyExtends run submission to include SchedulingRequest in RunCreationRequest.
src/aignostics/application/_utils.pyAdds validate_deadline, cross-field scheduling validation, and prefers API scheduling for deadline-exceeded checks.
src/aignostics/application/_service.pyValidates due date/deadline and builds a SchedulingRequest for submission.
src/aignostics/application/_gui/_page_application_run_describe.pyDisplays scheduling information (due date/deadline) from the API response.
codegen/out/docs/PublicApi.mdUpdates generated API docs (new endpoint + updated list-runs params).
codegen/out/aignx/codegen/rest.pyBumps generated OpenAPI doc version to 1.4.0.
codegen/out/aignx/codegen/models/version_read_response.pyRegenerated model (semver pattern validation updates).
codegen/out/aignx/codegen/models/validation_error_loc_inner.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/validation_error.pyRegenerated model with additional input/ctx fields.
codegen/out/aignx/codegen/models/user_read_response.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/scheduling_response.pyNew generated model for scheduling fields returned in run responses.
codegen/out/aignx/codegen/models/scheduling_request.pyNew generated model for scheduling constraints in run creation.
codegen/out/aignx/codegen/models/run_termination_reason.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/run_state.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/run_read_response.pyAdds scheduling field to run read responses.
codegen/out/aignx/codegen/models/run_output.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/run_item_statistics.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/run_creation_response.pyTightens run_id requirement in generated response model.
codegen/out/aignx/codegen/models/run_creation_request.pyAdds optional scheduling to run creation request model.
codegen/out/aignx/codegen/models/output_artifact_visibility.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/output_artifact_scope.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/output_artifact_result_read_response.pyRegenerated model field ordering/optionality updates.
codegen/out/aignx/codegen/models/output_artifact.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/organization_read_response.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/me_read_response.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/item_termination_reason.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/item_state.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/item_result_read_response.pyRegenerated model field ordering/optionality updates.
codegen/out/aignx/codegen/models/item_output.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/item_creation_request.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/input_artifact_creation_request.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/input_artifact.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/http_validation_error.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/custom_metadata_update_response.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/custom_metadata_update_request.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/artifact_termination_reason.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/artifact_state.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/artifact_output.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/application_version.pyRegenerated model (semver pattern validation updates).
codegen/out/aignx/codegen/models/application_read_short_response.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/application_read_response.pyRegenerated model header/version update.
codegen/out/aignx/codegen/models/init.pyRegenerated models export list to include new scheduling models.
codegen/out/aignx/codegen/exceptions.pyRegenerated client exceptions header/version update.
codegen/out/aignx/codegen/configuration.pyUpdates debug report API version string to 1.4.0.
codegen/out/aignx/codegen/api_client.pyRegenerated API client header/version update.
codegen/out/aignx/codegen/api/public_api.pyAdds generated get_artifact_url endpoint and for_organization param for listing runs.
codegen/out/.openapi-generator/FILESTracks newly generated scheduling model files.
codegen/in/openapi.jsonUpdates OpenAPI source to v1.4.0 (scheduling fields + new endpoint + query param changes).
MakefileMakes the codegen sed patch step portable across GNU/BSD sed variants.

Comment threadtests/aignostics/platform/e2e_test.py
Comment threadsrc/aignostics/application/_service.py
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from bbd03db to 62b9a05CompareMarch 20, 2026 07:54
CopilotAI review requested due to automatic review settings March 20, 2026 08:08
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from 62b9a05 to e9b093aCompareMarch 20, 2026 08:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 55 changed files in this pull request and generated 2 comments.

Comment threadsrc/aignostics/platform/resources/runs.py
Comment threadtests/aignostics/platform/e2e_test.py
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from e9b093a to 93192fbCompareMarch 20, 2026 08:34
CopilotAI review requested due to automatic review settings March 20, 2026 09:28
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from 93192fb to 9d9f38bCompareMarch 20, 2026 09:28

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 55 changed files in this pull request and generated 2 comments.

Comment threadtests/aignostics/application/utils_test.py
Comment threadtests/aignostics/application/utils_test.py

@olivermeyerolivermeyer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Could you do a squash merge, and update the PR title to follow conventional commit (chore: ...) so this gets categorised correctly?

@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from 9d9f38b to 6da9610CompareMarch 20, 2026 10:14
CopilotAI review requested due to automatic review settings March 23, 2026 07:43
@nahua-aignx
nahua-aignxforce-pushed the chore/PAPI-4701-scheduling-payload branch from 6da9610 to cd86749CompareMarch 23, 2026 07:43
@sonarqubecloud

Copy link
Copy Markdown

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 55 changed files in this pull request and generated 1 comment.

Comment threadtests/aignostics/application/cli_pipeline_validation_test.py
@nahua-aignx
nahua-aignx merged commit 8f4445b into mainMar 23, 2026
30 of 32 checks passed
Sign up for freeto 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.

3 participants

@nahua-aignx@olivermeyer