Files
apophis-fastify/docs/attic/homepage.md
T
John Dvorak d0523fcc2d fix: harden engine, enrich failure diagnostics, close adoption gaps
- P0: CLI verify now honors  test budget with seeded multi-sample
- P0: Observe sampling enforced via Math.random() gate in hook-validator
- P1: Remove misleading undici-mock-agent isolation option
- P1: Qualify reuses shared discoverRouteDetails() with warnings
- P1: Chaos/scenario config exposed via preset schema
- P1: README/docs limitations updated to current state
- P2: Nested response annotations prefer 2xx deterministically
- P2: --changed documented as heuristic in verify.md

- Add observe sink tests (sampling 0/1, sink failure non-interference)
- Add verify runs regression tests (scale, determinism, variants)
- Add configured-scenario qualify test (independent of OAuth fixture)
- Add coverageBreakdown to qualify artifacts (per-gate route coverage)
- Add production-style observe example with real sink in docs/observe.md
- Add nightly/staging vs PR gating guidance to docs/qualify.md

- Enrich VerifyFailure with formula-aware diagnostics:
  status:201 => 'HTTP 200', body field checks => actual values
- Remove stale observe CLI activation message
- Document outbound mocks as process-global in getting-started.md
- Refresh APOPHIS_ADOPTION_AUDIT.md with current state

903 tests pass, build clean, typecheck clean.
2026-05-21 20:39:36 -07:00

3.9 KiB

APOPHIS Homepage

Hero

Behavioral confidence for Fastify services.

APOPHIS lets you write behavioral contracts next to route schemas and check behavior across operations, states, and protocol flows.

Find a behavioral bug in 10 minutes See the bug APOPHIS catches

Behavior Example

One route contract. One create/read consistency bug.

Route:

app.post('/users', {
  schema: {
    'x-category': 'constructor',
    'x-ensures': [
      'response_code(GET /users/{response_body(this).id}) == 200'
    ]
  }
}, async (request, reply) => {
  const { name } = request.body;
  const id = `usr-${Date.now()}`;
  reply.status(201);
  return { id, name };
});

APOPHIS output:

Contract violation
POST /users
Profile: quick
Seed: 42

Expected
  response_code(GET /users/{response_body(this).id}) == 200

Observed
  GET /users/usr-123 returned 404

Why this matters
  The resource created by POST /users is not retrievable.

Replay
  apophis replay --artifact reports/apophis/failure-2026-04-28T12-30-22Z.json

Next
  Check the create/read consistency for POST /users and GET /users/{id}.

JSON Schema cannot express this relationship. APOPHIS turns it into an executable check.

Why It Matters

  • JSON Schema checks shape: Does the response have the right fields?
  • APOPHIS checks behavior: Does creating a user make it retrievable? Does updating change persist? Does deleting make it inaccessible?

Production outages often come from behavior drift as well as invalid payload shapes. APOPHIS checks behavior at the route-contract layer.

Three Modes

Mode Purpose Default Environments
verify Deterministic CI and local contract verification local, test, CI
observe Runtime visibility and drift detection without blocking staging, prod
qualify Run scenario, stateful, and chaos checks for critical flows local, test, staging

Quickstart

Three commands to the first targeted behavior check:

npm install @apophis/fastify fastify @fastify/swagger
apophis init --preset safe-ci
apophis verify --profile quick --routes "POST /users"

See docs/getting-started.md for the full walkthrough.

Trust and Safety

  • Deterministic replay: Every failure includes a seed and a one-command replay.
  • CI-safe default path: verify is deterministic and safe for CI pipelines.
  • Production-safe observe path: observe is non-blocking by default.
  • Qualify path gated away from prod: qualify is blocked in production by default.
  • Explicit environment boundaries: Config rejects unknown keys and unsafe environment mixes.

LLM-Coded Services

APOPHIS gives coding agents a constrained, repeatable way to encode and verify behavior:

  • Official scaffolds (safe-ci, llm-safe, platform-observe, protocol-lab)
  • apophis doctor checks for missing dependencies, malformed config, and unsafe modes
  • CI policy guards catch unknown keys, unsafe environments, and missing seeds
  • Generated code follows the same pattern in every repo

See docs/llm-safe-adoption.md for templates and CI policy.

Advanced Cases

Operator Resources

CTAs