LAB
By Chason ArthurRevision 107.031Updated

ZYEL LAB / CODEX BRIDGE WORKSHOP

Keep the task.
Verify the callback.

Two device labels. One stable task identity. Inspect the board, preview a small change, apply the exact reviewed batch, then prove a repeated callback does nothing.

Project Lead and tutorial: Chason Arthur

01 / GUARDED RECONCILIATION

A small change you can inspect.

  1. Inspect
  2. Validate
  3. Preview
  4. Apply
  5. Read back

Interactive controls load when the fixture is ready. If loading does not finish, reload this page or read the tutorial.

Curated callback

The form creates work metadata, not a transcript. Unknown fields and unreviewed content are held.

Use 1–60 ASCII letters, numbers, underscores, periods, colons or hyphens, starting with a letter or number. Keep the same message for an identical retry. Use a new reviewed message for new content.

Exact prepared batch
No batch prepared.

Apply changes this fixture only. A local review receipt cannot prove deployment or whole-task completion.

Identity extract

Only these identity and guard fields from the actual prepared batch are shown. The complete JSON stays available in normal view.

Prepare a batch to inspect its identity fields.

Board authority

Board revision
—
Task version
—
Task phase
—

Stable source task
demo:bridge-workshop

Last preview or receipt

Result extract

Selected fields from the actual last result. Full JSON is available in normal view.

No result yet.
Nothing applied.

Minimal event log

Twenty in-memory event codes at most. No summary, raw input, token or conversation is logged.

[]

02 / ONE AUTHORITY, EXPLICIT PRODUCERS

The wall reads the board.

  1. 1. Authorized sourceAccessible task results, reviewed by a producer. Missing access stays a visible hold.
  2. 2. Guarded adapterValidate, immutable preview, bounded apply and exact readback.
  3. 3. Native task boardStable mapping, version checks and task authority.
  4. 4. Progress wallShows board status with separate artifact receipts and verification scope.

The configured owner system uses this pattern through an already authorized private producer route. It has no generic Codex conversation discovery API, no public task-writing callback and no automatic access to every device’s private chats.

Distinguish local Codex APIs from the generic teaching contract

03 / RECORD A REAL CHECKPOINT

Show the change. Keep the failure.

Reset affects only the synthetic fixture and discards its in-memory batch and receipts. No owner board or saved site appearance is changed. Reload clears the browser-only fixture. In local HTTP mode the companion keeps its board until an explicit reset or server restart; reloading discards the page draft and requires a new inspection.

Full result-first script
Speaker notes

Show one accepted change, then the exact repeat. Next simulate the owner edit and hold the stale batch. Say “synthetic” aloud. Keep the error and recovery visible; do not cut around the verification.

Future video: no video has been uploaded or attached. The recording guide includes a transcript-ready script and chapter plan.

Working in this page

Stable task mapping, format/privacy gates, immutable preview, task/board conflicts, exact-repeat no-op, bounded logs and synthetic evidence holds.

Local HTTP companion

The supplied Node server crosses a real loopback HTTP boundary with public dummy bearer scopes, body limits and timeouts. It remains an in-memory fixture.

Run the local project

Unproven here

Production identity, durable multi-process transactions, real Codex execution, private conversation synchronization, live deploy evidence and a future scheduled run.

Lab discussion / Codex Bridge Workshop

What would you try next?

Ask about the code, compare an approach, or describe an edge case. Reader comments are reviewed before publication.

All lab discussions

Reader comments

Open the discussion to read and add reader comments.

Read or write a comment →

Code walkthrough

Follow the implementation in code.

These short excerpts connect the lab’s behavior to its implementation. Each example links to the full tutorial step for its context, tradeoffs and checkpoint. Names and dependencies belong to that source; the excerpts are not standalone programs.

Example 01 · Tutorial excerpt

Separate Codex capability from the adapter contract.

The official Codex SDK guide describes server-side control of local threads. The app-server guide describes JSON-RPC clients, approvals and streamed events; it currently marks app-server and its WebSocket transport experimental and unsupported for production. This workshop installs neither. Supported accessible local tasks do not establish access to all private ChatGPT or Codex cloud conversations.

// Generic application boundary: this does not call Codex.
async function onReviewedWorkResult(metadata, bridge) {
  const batch = await prepareReviewedBatch(metadata);
  return bridge.preview(batch); // A human inspects before any apply.
}
// prepareReviewedBatch is an adapter boundary, not a provided Codex API.

Read the full tutorial step

Example 02 · Tutorial excerpt

Keep task identity across devices.

validateBatch allowlists keys and bounds identifiers, text and total body size. An unknown field is refused. An explicit privacy declaration is necessary but cannot prove the content is safe. A human still reviews the short summary; the credential-shaped text check is only a limited backstop.

{
  "source_task_id": "demo:bridge-workshop",
  "source_thread_id": "thread-laptop",
  "source_message_id": "message-01",
  "device_label": "Demo laptop",
  "board_task_id": "TASK-101",
  "expected_task_version": 1,
  "sensitivity": "work_metadata",
  "privacy_reviewed": true
}

Read the full tutorial step

Example 03 · Tutorial excerpt

Preview an immutable change.

A digest detects mismatched bytes; it is not a signature, permission or proof of a human review. The server also checks the permitted producer scope and task mapping. Changing the form invalidates the current preview rather than quietly applying new content under an old approval.

const planId = await digest(batch);
plans.set(planId, {batch: structuredClone(batch), createdAt: now()});
// Apply later requires this exact stored batch and current board guards.

Read the full tutorial step

Example 04 · Tutorial excerpt

Apply once, then prove it.

The excerpt explains the algorithm; the complete running implementation is bridge-core.mjs . The fixture stores receipts in memory. A real multi-process service requires a transaction or lock spanning the version check, task update and unique event insert, plus exact backup and recovery behavior. A JavaScript Map is not durable storage.

const processed = ledger.get(sourceEventKey);
if (processed) {
  if (processed.eventDigest !== eventDigest) throw eventConflict();
  return {would_change: false, changed: [], receipt: processed};
}

Read the full tutorial step

Example 05 · Tutorial excerpt

Test, release and maintain the boundary.

Inspect this excerpt in the full lesson, then compare its result with the lab scenario.

node --test tests/*.test.mjs
node --check bridge-core.mjs
node --check app.mjs
node --check server.mjs
# Freeze the exact source, review it, then record individual frames.

Read the full tutorial step

Reset the synthetic workspace?

Discard this fixture’s batch, preview, receipts and event log. The real board and site preferences are untouched.