OCI Functions starter patterns

oci-fn-queue-worker-starter makes the queue handoff legible before retries and worker logic disappear into framework glue.

This guide exists because async starter repos often hide the real boundary. The repo stays close to one repeated problem: accept a queue work item, validate the contract, and return one normalized result shape that a retry or audit path can actually inspect.

Why this repo carries the track

A short site-side guide before the proof layer on GitHub.

What it proves

A queue worker starter repo gets more reusable when it makes the payload contract, validation edge, and result shape visible before the rest of the async system grows around it.

Why it matters in this track

It extends the OCI Functions starter pattern from routing and validation into async worker design. The important boundary is not only event arrival. It is the handoff between queued work and a stable worker result.

What survives the first run

The normalized work result is the artifact. It gives a later retry, queue monitor, or downstream writer one compact status shape to consume.

What the first useful success looks like

oci-fn-queue-worker-starter as a first useful success, not only a demo.

The first useful run is a worker result that already shows task identity, status, and whether the item is retryable. That makes the starter repo useful before you add a real queue trigger, dead-letter handling, or metrics layer.

Use this when a starter pattern should make the queue handoff and worker result contract obvious before the rest of the background-processing workflow is built out.

Quick run

python3 - <<'PY'
import json
from func import handle_work_item
payload = json.load(open('sample-work-item.json'))
print(json.dumps(handle_work_item(payload), indent=2))
PY

Sample output shape

{
  "ok": true,
  "task_id": "task-1042",
  "worker": "invoice-sync",
  "status": "processed",
  "processed_records": 3,
  "retryable": false
}

Where it routes next

Starter pattern for queue-driven OCI Functions work that makes the handoff, retry edge, and worker boundary easier to inspect.