010 shape contract

? Unknown Status unknown.

Code

input.kz

Expected output

TEST 1 PASS: valid handler accepted
TEST 2 PASS: caught invalid branch 'not_foundy'
TEST 3 PASS: caught missing field in 'ok'
TEST 4 PASS: free-running mode allows any shape, got branch 'not_foundy'

Flows

flow ~register click a branch to expand · @labels scroll to their anchor
register (scope: "api", source: handler(0) // handler itself has no cost (it's the shape) db.user.get(5) // database lookup costs 5 tokens)
flow ~run click a branch to expand · @labels scroll to their anchor
run (source: VALID_HANDLER, scope: "api", budget: 100, shape: "handler")
flow ~run click a branch to expand · @labels scroll to their anchor
run (source: TYPO_HANDLER, scope: "api", budget: 100, shape: "handler")
flow ~run click a branch to expand · @labels scroll to their anchor
run (source: MISSING_FIELD_HANDLER, scope: "api", budget: 100, shape: "handler")
flow ~run click a branch to expand · @labels scroll to their anchor
run (source: TYPO_HANDLER, scope: "api", budget: 100)

Test Configuration

MUST_RUN