Skip to content

feat(cu): add runtime observation and action leases - #1

Closed
hqhq1025 wants to merge 1 commit into
codex/cu-foundation-corefrom
codex/cu-runtime-foundation
Closed

hqhq1025 wants to merge 1 commit into
codex/cu-foundation-corefrom
codex/cu-runtime-foundation

Conversation

@hqhq1025

Copy link
Copy Markdown
Owner

Stack position

PR B, stacked on codex/cu-foundation-core (upstream draft PR apache#857).

This fork-local PR preserves the real stacked diff because the upstream repository cannot use a fork branch as a PR base. After apache#857 merges, this branch will be retargeted to maka-agent/main and opened upstream.

Summary

Adds the provider-neutral Runtime layer without adding a native executor, Desktop wiring, provider adapter, or cursor presentation.

  • one-shot frame/epoch observations and canonical action fingerprints;
  • capture-local window binding for coordinate actions;
  • semantic element identity binding;
  • per-session invocation queues without global serialization;
  • session generation leases for intervention, lock, re-observe, blocked URL, and user stop;
  • stale/replay/duplicate action rejection;
  • fresh full observation requirement after every mutation;
  • unknown dispatch outcome requires re-observation;
  • same-turn terminal tombstones with explicit new-turn recovery;
  • privacy split between persisted summaries and provider-visible AX/screenshot state;
  • model-visible screenshot output through the generic tool result mapping.

Codex lab alignment

  • maxInFlight: 1 is implemented per Computer Use session, not globally;
  • approval does not create an active session: actions require a successful observation;
  • unrelated dynamic AX/DOM changes do not synthesize user intervention;
  • physical intervention, lock, blocked URL, and user stop invalidate old leases;
  • ambiguous/stale semantic identity remains an executor responsibility and must fail closed;
  • raw AX labels, values, window titles, and app inventory do not enter persisted tool results.

Non-goals

  • cua-driver transport and service lifecycle;
  • page/element refetch implementation;
  • Desktop event producers;
  • provider-specific scaling or native tools;
  • cursor/PiP presentation;
  • real-model E2E.

Verification

  • focused Computer Use Runtime tests: 55/55;
  • Runtime full test: 1420 passed, 2 skipped, 0 failed;
  • Core: 833/833;
  • UI: 125/125;
  • Desktop: 2384/2385 in the aggregate run; the only Rive child-process timeout passed 10/10 on immediate isolated rerun;
  • full repository build passed;
  • full repository typecheck passed;
  • adversarial review findings for lock recovery, queued keyboard actions, clearSession tombstones, and app-title persistence were fixed and covered by regression tests.

@hqhq1025
hqhq1025 force-pushed the codex/cu-foundation-core branch from 50ebaf8 to c4468e1 Compare July 13, 2026 06:31
@hqhq1025
hqhq1025 force-pushed the codex/cu-runtime-foundation branch from 018a98e to 58bfe06 Compare July 13, 2026 06:31
@hqhq1025
hqhq1025 force-pushed the codex/cu-foundation-core branch from c4468e1 to e80b218 Compare July 13, 2026 07:01
@hqhq1025
hqhq1025 force-pushed the codex/cu-runtime-foundation branch from 58bfe06 to 3b99f02 Compare July 13, 2026 07:01
@hqhq1025
hqhq1025 force-pushed the codex/cu-foundation-core branch from e80b218 to 79923b4 Compare July 13, 2026 15:27
@hqhq1025

Copy link
Copy Markdown
Owner Author

The exact net diff represented here is now published upstream as apache#892. Closing this fork-local review PR to keep the active review queue in the upstream repository.

@hqhq1025 hqhq1025 closed this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant