Skip to content

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

Open
rbcasperson wants to merge 4 commits into
mainfrom
infra-1882-acceptance-suite
Open

rbcasperson wants to merge 4 commits into
mainfrom
infra-1882-acceptance-suite

Conversation

@rbcasperson

@rbcasperson rbcasperson commented Nov 18, 2026 •

Copy link
Copy Markdown

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

View guided diff

rbcasperson and others added 2 commits November 17, 2026 12:50
Scaffold acceptance/ with @utic/acceptance-core 0.73.0 and add one
scenario that partitions a PDF through the partition API and checks the
first element is its title. It runs on staging; SND and the Transform
environments are skipped.

Publish the suite as @utic/unstructured-api-acceptance on push to main,
so infra/acceptance can install and run it, and add the contract-only
CI job (binds and lists scenarios, runs none) on pull_request.

Add a root AGENTS.md with the acceptance trigger, and CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…blish workflow comment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

GitHub does not let a public repo use actions from the internal
github-workflows repo, so the contract job failed at setup. Inline the
azure/login + az token steps, and skip the contract job on fork PRs,
which get no OIDC token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rbcasperson
rbcasperson marked this pull request as ready for review November 18, 2026 21:04

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 16 files

Shadow auto-approve: would not auto-approve because issues were found.

View guided diff | Re-trigger cubic

Comment thread .github/workflows/ci-acceptance.yml Resolved
…olding the publisher token

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KceyiXKgcs5QtVfaL7HE3C

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.

View guided diff | Re-trigger cubic

Sign up for free to 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.

1 participant