INFRA-1882: add a partition API acceptance suite and test package

RB
3d ago
+2527-0

Adds an acceptance suite for the partition API, built on @utic/acceptance-core 0.73.0. It ships as a test package that infra/acceptance installs and runs (INFRA-1906). This repo's CI only checks that the suite binds; it runs no scenarios.

What changed

  • acceptance/: scaffolded with acceptance-init. Every stamped file matches core's templates. Plus one scenario: partition the LayoutParser paper PDF with strategy=fast and check that the response is a list of elements whose first element is the paper's title. The test PDF comes from s3://u10d-acceptance-test-data/unstructured-api/, pinned by SHA-256.
  • Tags: @platform @freq-hourly @skip-snd @skip-transform-staging @skip-transform-prod. API keys don't work on SND, and the two Transform environments don't serve this API.
  • .github/workflows/cd_acceptance_package.yml: publishes @utic/unstructured-api-acceptance to unstructured-npm on pushes to main that touch acceptance/. Modelled on transform's workflow. The patch version is the number of commits that touched acceptance/.
  • .github/workflows/ci-acceptance.yml: the Acceptance contract job, copied from dataplane's. It builds the steps, runs bddgen, and lists the scenarios, but runs none. It triggers on pull_request, since this repo has no merge queue. It skips fork PRs, which get no OIDC token and so can't install the framework.
  • Both workflows mint the Azure Artifacts token with azure/login + az account get-access-token inline, instead of the shared azure-devops-oidc-token action. This repo is public, and GitHub won't let a public repo use actions from the internal github-workflows repo. The first CI run failed at setup with Unable to resolve action unstructured-io/github-workflows.
  • Root AGENTS.md: the acceptance trigger, which points agents at npx acceptance-help update-for-product-change when a change touches the API's request/response behaviour. A root CLAUDE.md holds @AGENTS.md.

Acceptance criteria

  • acceptance/AGENTS.md + acceptance/CLAUDE.md: CLAUDE.md is exactly @AGENTS.md, and everything above ## This repo in AGENTS.md matches core 0.73.0's templates/AGENTS.md exactly (checked with diff).
  • Root AGENTS.md names the partition API's request/response behaviour and runs npx acceptance-help update-for-product-change.
  • A scenario passes against a deployed partition API (staging, 2026-11-18). Run log below.
  • Every scenario is tagged @platform and skips the environments that don't run the API. playwright test --list collects 1 test on staging, testing, prod and di-qa-env, and 0 on transform-staging.
  • Publish workflow modelled on transform's cd_acceptance_package.yml, and acceptance/package.json carries the unstructured-acceptance-tests keyword. actionlint is clean.
  • Acceptance contract is green on this PR (run 44377923843) and lists 1 scenario. The reader app's Azure login works from this repo.
  • After merge: @utic/unstructured-api-acceptance is installable from unstructured-npm. Check with npm view @utic/unstructured-api-acceptance versions once the publish workflow has run.
Staging run log (TEST_ENV=staging npm test, Node SDK warnings stripped)
> @utic/unstructured-api-acceptance@0.1.0 test
> bddgen && playwright test

Environment probe passed: ui, platform-api, test-session
Running 1 test using 1 worker

  ✓  1 .features-gen/features/partition-document.feature.spec.js:6:3 › Partition a document › A partitioned PDF comes back as elements headed by its title @platform @freq-hourly @skip-snd @skip-transform-staging @skip-transform-prod (1.9s)

  1 passed (9.4s)

Deliberately not built

  • Broad coverage: one scenario proves the harness works.
  • Running scenarios in this repo's CI, and so no merge queue. The hub runs them.
  • Installing the package in infra/acceptance (INFRA-1906).
  • The cubic acceptance-coverage rule (after TRNSFRM-745), and a reusable CI workflow.

Session: 30576548-4fb6-4788-a16d-e2f61b15c339

🤖 Generated with Claude Code