Skip to content

feat: add submission foundation - #1494

Draft
Cedric Vidal (cedricvidal) wants to merge 4 commits into
cedricvidal-microsoft/observation-criteria-pp-taxonomyfrom
cedricvidal-pr-a-submission-foundation
Draft

Cedric Vidal (cedricvidal) wants to merge 4 commits into
cedricvidal-microsoft/observation-criteria-pp-taxonomyfrom
cedricvidal-pr-a-submission-foundation

Conversation

@cedricvidal

Copy link
Copy Markdown
Collaborator

Summary

Adds PR A of the submission/readout stack:

  • introduces stable SubmissionDocument identity with an exact immutable request/run vector per embedded current attempt and immutable submission-runs history;
  • adds resumable claim/archive/CAS rollover, polling repair, bulk-retry reconciliation holds, and attempt-scoped stale worker rejection;
  • finalizes every native single/count/profile/bulk submit into a recoverable submission and exposes list/detail/history/current-retry APIs;
  • defines the PR B pp-readout registration, queue, claim, supersession, and completion contracts over authoritative pp-observations state;
  • adds Submission Detail navigation, parent-submission links, Storybook coverage, and scope submission CLI parity.

This draft intentionally stops at the submission foundation. The readout worker/report generation implementation belongs in stacked PR B.

Demos

Before

N/A — submissions had no stable detail surface or CLI commands on the base branch.

After

N/A — no recording was produced for this foundation draft.

Testing

  • Passed: pnpm vitest run packages/shared/src/submissions/submission-state.test.ts packages/shared/src/submissions/submission-coordinator.test.ts packages/shared/src/scripts/register-handler.test.ts packages/db-migrations/src/034-create-submission-indexes.test.ts packages/db-migrations/src/required-migrations.test.ts apps/api/src/routes/submissions.test.ts apps/portal/src/lib/enrichment.test.ts apps/portal/src/components/SubmissionStatusCard.test.tsx apps/workers/post-processor/src/handlers/taxonomy-handler.test.ts apps/scheduler/src/handler-dispatcher.test.ts — 73/73 tests.
  • Passed: pnpm --filter shared build && pnpm --filter telemetry build && pnpm --filter api build && pnpm --filter scheduler build && pnpm --filter cli build && pnpm --filter db-migrations build && pnpm --filter post-processor build.
  • Passed: pnpm --filter portal build-storybook.
  • Passed: pnpm --filter api generate:openapi && pnpm --dir website build.
  • Passed: pnpm vitest run apps/judge/src/agent-trajectory.test.ts apps/judge/src/observation-trajectory.integration.test.ts — 39/39 discovered tests.
  • Passed: pnpm cli submission --help; confirmed list, get, runs, and retry.
  • Partial baseline: pnpm vitest run apps/api/src/endpoints.test.ts — 168/171 passed. The three failing observation-criterion creation tests return 400 instead of 201 and are unchanged from the stacked base behavior.
  • Blocked by stacked base: pnpm --filter portal build fails at apps/portal/src/pages/CriteriaList.tsx:168 because CriteriaBadge is not imported; that file is unchanged in this branch.
  • Not run: backend ESLint scripts because the workspace command cannot find the eslint executable (spawn ENOENT).

Documentation and compatibility

  • Updated submission lifecycle and PR B contracts in docs/architecture/app-design.md and docs/architecture/overview.md.
  • Updated post-processing/criteria documentation for the authoritative pp-observations handler identity.
  • Regenerated website/src/openapi/scope-openapi.json.
  • Adds required migration 034-create-submission-indexes; it uses Cosmos-compatible index helpers and a no-op down migration.
  • The observation handler registration changes from pp-taxonomy / taxonomy to pp-observations / observations. Deploy the updated registration manifest with the matching post-processor build.
  • No dependency manifests or lockfiles changed.

Checklist

  • If Portal features changed, keep CLI capabilities in sync.
  • If Portal components changed, update their Storybook stories.
  • If database changes require a migration, include up() / down() and keep it CosmosDB-compatible.
  • If dependencies changed, update the lockfile and regenerate NOTICE / NOTICE-REVIEW.txt with pnpm notice as needed. (N/A — no dependency changes.)
  • Video showing the behavior before the suggested change (N/A — new foundation).
  • Video showing the behavior after the suggested change (not produced for this draft).

Introduce stable submission identities, deterministic request/run vectors, resumable CAS rollover with immutable history, named-handler dependency evaluation, Cosmos-safe indexes, and attempt-scoped worker claim/completion helpers. Align the observation handler identity with the pp-observations dependency contract.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99f84f04-d3b0-40f1-a254-4dfbd21e4d87
Finalize every native submit as an exact submission vector, recover interrupted final writes, reconcile and archive vector drift, dispatch only current attempts, and expose project-scoped submission detail, history, and retry APIs with polling repair.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99f84f04-d3b0-40f1-a254-4dfbd21e4d87
Navigate successful submits to a Submission Detail shell, link grouped runs and run detail back to their parent submission, surface readiness and blocking pairs, and add CLI list/get/history/retry parity with Storybook coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99f84f04-d3b0-40f1-a254-4dfbd21e4d87
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 99f84f04-d3b0-40f1-a254-4dfbd21e4d87
@cedricvidal Cedric Vidal (cedricvidal) added type: enhancement New functionality or improvements to existing behavior. area: cli Scope command-line interface and terminal workflows. area: portal Scope web portal, pages, and user-facing components. area: post-processing ATIF generation and the run-output post-processing pipeline. area: scheduler area: api Scope REST API, run orchestration, SSE streaming, and endpoints. area: shared Shared package: types, DB models, and queue/blob/redis clients used by all apps. labels Oct 13, 2026
@github-actions github-actions Bot added type: documentation Documentation additions, corrections, and improvements. area: worker Coding agent worker runtime, task execution, and lifecycle. area: infrastructure Cloud resources, hosting, networking, and shared infrastructure. language: javascript Work involving JavaScript code, tooling, or dependencies. area: judge Evaluation engine, scoring, and criteria execution. topic: testing Test coverage, test infrastructure, and validation quality. topic: ui Portal, visual presentation, layout, and interface components. labels Oct 13, 2026
@cedricvidal
Cedric Vidal (cedricvidal) added this pull request to stack #1508 October 15, 2026 15:06
@cedricvidal
Cedric Vidal (cedricvidal) removed this pull request from stack #1508 October 15, 2026 22:45
@cedricvidal
Cedric Vidal (cedricvidal) added this pull request to stack #1485 October 15, 2026 22:45
@github-actions

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #272

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
3386 3378 8 0 0 0 0 1m33s

❌ Some tests failed!

Name Failure Message
❌ API Endpoints > POST /api/v1/criteria > creates an observation criterion with a taxonomy element expected 400 to be 201 // Object.is equality
❌ API Endpoints > POST /api/v1/criteria > defaults an observation's subject to 'run' expected 400 to be 201 // Object.is equality
❌ API Endpoints > POST /api/v1/criteria > creates an observation with an explicit subject:'iteration' override expected 400 to be 201 // Object.is equality
❌ PostProcessor > re-processes stale versions and stamps success for the same run attempt Cannot read properties of undefined (reading 'collection')
❌ PostProcessor > claims a run left in the scheduler's 'queued' state and drives it to done Cannot read properties of undefined (reading 'collection')

See all failed tests here

Github Test Reporter

@cedricvidal
Cedric Vidal (cedricvidal) removed this pull request from stack #1485 October 17, 2026 00:57
@cedricvidal

Copy link
Copy Markdown
Collaborator Author

Historical recovery reference: the canonical successor work is now #1512 (Experiment foundation) followed by #1513 (attempt-scoped Experiment readouts), registered in native stack #1518. This PR remains open and unchanged for recovery/history.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: api Scope REST API, run orchestration, SSE streaming, and endpoints. area: cli Scope command-line interface and terminal workflows. area: infrastructure Cloud resources, hosting, networking, and shared infrastructure. area: judge Evaluation engine, scoring, and criteria execution. area: portal Scope web portal, pages, and user-facing components. area: post-processing ATIF generation and the run-output post-processing pipeline. area: scheduler area: shared Shared package: types, DB models, and queue/blob/redis clients used by all apps. area: worker Coding agent worker runtime, task execution, and lifecycle. language: javascript Work involving JavaScript code, tooling, or dependencies. topic: testing Test coverage, test infrastructure, and validation quality. topic: ui Portal, visual presentation, layout, and interface components. type: documentation Documentation additions, corrections, and improvements. type: enhancement New functionality or improvements to existing behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant