INFRA-1882: add a partition API acceptance suite and test package
RB
3d ago+2527+2527+0123456789012345678901234567890123456789-0-0-0123456789
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 withacceptance-init. Every stamped file matches core's templates. Plus one scenario: partition the LayoutParser paper PDF withstrategy=fastand check that the response is a list of elements whose first element is the paper's title. The test PDF comes froms3://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-acceptancetounstructured-npmon pushes tomainthat touchacceptance/. Modelled on transform's workflow. The patch version is the number of commits that touchedacceptance/..github/workflows/ci-acceptance.yml: theAcceptance contractjob, copied from dataplane's. It builds the steps, runsbddgen, and lists the scenarios, but runs none. It triggers onpull_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-tokeninline, instead of the sharedazure-devops-oidc-tokenaction. This repo is public, and GitHub won't let a public repo use actions from the internalgithub-workflowsrepo. The first CI run failed at setup withUnable to resolve action unstructured-io/github-workflows. - Root
AGENTS.md: the acceptance trigger, which points agents atnpx acceptance-help update-for-product-changewhen a change touches the API's request/response behaviour. A rootCLAUDE.mdholds@AGENTS.md.
Acceptance criteria
-
acceptance/AGENTS.md+acceptance/CLAUDE.md:CLAUDE.mdis exactly@AGENTS.md, and everything above## This repoinAGENTS.mdmatches core 0.73.0'stemplates/AGENTS.mdexactly (checked withdiff). - Root
AGENTS.mdnames the partition API's request/response behaviour and runsnpx 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
@platformand skips the environments that don't run the API.playwright test --listcollects 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, andacceptance/package.jsoncarries theunstructured-acceptance-testskeyword. actionlint is clean. -
Acceptance contractis 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-acceptanceis installable fromunstructured-npm. Check withnpm view @utic/unstructured-api-acceptance versionsonce 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