You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sideloading: App accepts Output File Sets from Executor (#42)
* accept output file set callbacks
add the earthbeam callback and job payload fields needed to record executor output file sets.
keep the table keyed by uid, harden the callback error handling, and cover the new auth and payload behavior with integration tests.
Co-authored-by: Codex <noreply@openai.com>
* fix path validation, store output file set path, update AGENTS.md
- tighten startsWith check to require exact match or trailing slash,
preventing sibling-prefix bypass (e.g. output-evil)
- add regression test for sibling-prefix path rejection
- add path column to run_output_file_set (migration 030) so PR 6 can
reconstruct download paths for subfolder output sets
- update AGENTS.md sequence diagram and executor lifecycle to include
the output-files callback
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Made-with: Cursor
* add unique constraint and duplicate detection for output file sets
The PR-4 review flagged that a retried executor POST for the same
run_id + path would silently create duplicate output file sets.
Consolidate the path column and a UNIQUE(run_id, path) constraint
into migration 029 (removing the now-unnecessary 030), add an
application-level duplicate check returning 409 Conflict, and cover
the scenario with an integration test.
Co-authored-by: Claude <noreply@anthropic.com>
Made-with: Cursor
* catch unique constraint instead of pre-querying, clean up tests
- replace findFirst duplicate check with catch on P2002 unique
constraint violation to eliminate TOCTOU race and save a query
- move jobX setup into the cross-run auth test that uses it
- remove redundant sentToOds=false test (just persisting a boolean)
- fix test semantics: sideloaded paths use sentToOds=false,
ODS-sent paths use sentToOds=true
- simplify TIMESTAMP(6) to TIMESTAMP in migration 029
- gitignore docs/, .cursor/skills/, .claude/skills/, .agents/
to prevent accidental commits of in-progress project docs
Co-authored-by: Claude <noreply@anthropic.com>
Made-with: Cursor
* use .catch for output file set error handling
Flatten the try/catch into a .catch on the create promise to
match the pattern used elsewhere and reduce nesting.
Co-authored-by: Claude <noreply@anthropic.com>
Made-with: Cursor
* require subfolder path, use relative S3 keys, canonicalize trailing slashes
Review round 3 fixes:
- Reject bare base path in output-files callback (must be a proper subfolder)
- Canonicalize trailing slashes before validation and persistence to prevent
duplicate-bypassing of the UNIQUE(run_id, path) constraint
- Switch outputFilesBasePath from full S3 URI to relative key ({fileBasePath}/output)
since the executor sends relative paths, not protocol://bucket URIs
- Rename lb-download-dir to roster-download-dir in local executor service
- Revert .gitignore scope creep (moved to .git/info/exclude)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* remove outputFilesBasePath from executor payload, validate against fileBasePath
The executor owns the output file location — it doesn't need the app
to tell it where to write. Removed outputFilesBasePath from the DTO
and payload. The output-files callback now validates the reported path
is a child of fileBasePath (the job's data directory) instead of a
narrower outputFilesBasePath.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* consolidate GET /:runId tests, remove outputFilesBasePath test
Move appUrls.outputFiles payload test into the existing GET /:runId
describe block (above Descriptor Mappings). Remove the duplicate
describe block and the outputFilesBasePath test, which tested a field
that was never shipped.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* reject output file set callback when no files found at S3 path
If the executor posts a path that has no files in S3, return 400
rather than creating a record with an empty files array.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* type RunOutputFileSet.files as string[]
Add prisma-json-types-generator annotation so the files column is
typed as string[] instead of generic Json.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* add .nxignore to prevent nx daemon from indexing vite temp files
Vite creates transient timestamp files (e.g. vite.config.mts.timestamp-*.mjs)
that NX caches in its project graph. When the dev server stops and deletes
them, NX fails with "Unable to load" errors requiring nx reset.
Co-authored-by: Claude <noreply@anthropic.com>
Made-with: Cursor
* return { key, name } from listFilesAtPath, simplify callers
listFilesAtPath now filters out undefined keys and folder markers
internally, and returns objects with both the full S3 key and the
filename. This removes duplicate prefix-stripping from both callers
and makes the contract explicit.
Also adds a test for completeRun saving output files from S3 listing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* remove redundant error logging from output file set catch
NestJS's built-in exception handler already logs unhandled errors
with full stack traces and returns a generic 500. The manual
catch-log-rethrow was duplicating that with less detail.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: app/api/src/database/prisma/schema.prisma
+27-12Lines changed: 27 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -265,22 +265,23 @@ model Job {
265
265
266
266
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
0 commit comments