Files
sim/apps/docs
Waleed 5bbf4e748b feat(api): failing block on polled runs, deployed input schema, paused-runs list, and applied limits (#9906)
* feat(api): attribute polled run failures, deployed input schema, paused-run list, and applied run limits

- GET /v2/workflows/{id}/runs/{runId} reads the failing block back from the run's
  recorded trace, withheld when the viewer's permission group hides execution data
- GET /v2/workflows/{id} adds inputSchema for the active deployment's API run input
- GET /v2/workflows/runs/paused lists a workspace's runs waiting on human input,
  projecting pause points exactly as the run detail does
- Execute responses report executionTimeoutSeconds; GET /v2/billing/status adds plan limits

* fix(api): respect the paused-run page cap in the CLI and keep waiting pause points under the cap

- CLI generator carries a numeric field's contract maximum; the pager never requests
  a page above it while still paging to the caller's total --limit
- Pause point cap keeps points not yet resumed before resumed history, so a run that
  paused again is never listed without its waiting point (run detail and paused list)

* improvement(api): reuse FailedTraceBlock and sort pause points once when capping

* fix(api): custom-block trace boundary, legacy pause point arrays, and list point selection

- A custom block is an opaque trace boundary for failing-block attribution
- The paused-run list reads object and legacy array pause_points
- The list selects waiting human points before the per-run cap, reads points in
  waves that stop once the page budget is spent, and shares one waiting predicate
- Resume response schemas omit executionTimeoutSeconds
- Drop a non-null assertion from the CLI page cap test

* fix(api): attribute concurrent failures to the stored error's block and never fail a workflow read on its deployment

- Failing-block attribution prefers the span the stored error names, else the
  failure that ended first, else none; the block error prefix has one owner
- The workflow read degrades inputSchema to null when the deployment cannot be
  read or its schema has an unexpected shape
- Integration cases for time-only, archived, and cross-workspace exclusion

* fix(api): consistent trace walk, block-named error attribution, required applied timeout, and ungated input schema

- Failing-block attribution walks spans as hasUnhandledError does, through
  successful blocks, with one shared successful-boundary rule
- An error message headed by the failing block's name is attributed to it even
  when the name reads as a run-level failure
- executionTimeoutSeconds is required (nullable) on Execute workflow responses
- The workflow read takes inputSchema from the active version row, not isDeployed
- Pause cap wording: unresolved points are kept in preference, listed earliest first
- Regenerate the CLI API the previous contract wording left stale

* fix(api): parse resume responses with the resume schema in e2e scripts and regenerate the CLI API on staging

- Stop-after and pinned-execute e2e scripts parse resume responses with
  v2ResumeWorkflowDataSchema, which omits executionTimeoutSeconds
- Regenerate the CLI API against the merged staging contracts

* fix(api): parse the stop-after e2e resume helper's response with the resume schema
2026-11-11 15:52:59 -08:00
..
…
…
…
…

Sim documentation

The documentation site uses Next.js, a build-time MDX content catalog, and the shared Sim docs component library. Read the editorial guide before changing copy or page organization. The architecture and authoring guide explains content ownership, reusable components, assets, and generated references. The copy audit records the complete page inventory, accuracy corrections, and validation.

Develop

From this directory:

bun run dev

Open http://localhost:3001. Build the site with bun run build and run the built server with bun run start.

Content owners

  • Authored pages and navigation: content/docs/** and each section's meta.json.
  • API operation pages: generated openapi*.json, owned by apps/sim/lib/api/contracts/v2/** and scripts/openapi/generator.ts.
  • CLI reference pages: generated from the command tree by scripts/generate-cli-docs.ts.
  • Interactive workflow examples: components/workflow-preview/**.
  • Local media: public/static/**. Product captures use the shared Image component.

Use the owner and generation commands listed in the editorial guide. Do not hand-edit generated reference pages. The build also generates llms-full.txt from the current content.

The machine access guide documents Markdown, JSON, MCP, search indexing, and their verification commands. The local /design-system gallery demonstrates the shared docs components and interaction states.

Validate

From the repository root, run the required lint, type, audit, and test gates in the development guidelines. From this directory, bun run type-check compiles MDX and checks the docs workspace, and bun run build validates the production site. Inspect affected page types on desktop and a narrow viewport, and check internal links and existing anchors after heading changes.

The docs HTTP workflow also checks sidebar navigation, API language switching, and copying Markdown on desktop and mobile layouts. It uploads screenshots and a JSON report with the HTTP regression artifacts. These checks run against the built site in CI; no visitor telemetry is collected. Use Vercel's build logs and usage reports to compare deployment cost and duration.

Reader feedback

Votes are submitted through /api/feedback to an authenticated Sim webhook. Configure DOCS_FEEDBACK_WEBHOOK_URL and DOCS_FEEDBACK_WEBHOOK_TOKEN only on the server. The endpoint returns unavailable when either is absent. Limit POST requests to this path at the deployment edge before enabling it (10 requests per IP per minute).

The workflow receives submission_id, page, helpful, comment, and received_at. Use submission_id as the webhook deduplication field and a unique table column for upsert. Retries of an unchanged submission reuse its ID. The acknowledgment confirms queue acceptance; workflow failures remain visible in Sim execution logs. No email, IP address, or user identity is included in the stored feedback payload.