Skip to content

Bind managed accounts to adaptive orchestration - #736

Merged
Meta-Develop merged 147 commits into
mainfrom
codex/maco-completion-integration-01a12e63
Oct 17, 2026
Merged

Meta-Develop merged 147 commits into
mainfrom
codex/maco-completion-integration-01a12e63

Conversation

@Meta-Develop

@Meta-Develop Meta-Develop commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Normal intake now retains the selected managed account, frozen routing policy and genuine task assessment through role selection, launch and collection. Unknown access and usage remain explicit. Candidate ranking includes loaded review/retry tradeoffs and retained accepted-result evidence; score proxies remain separate from billed usage.

Native launch authority stays bound to the actual managed worktree, held claims, selected executable/account and launch purpose. Managed control parents retain read-only access; ordinary terminal Workers use their validated execution contract. Optional Git info directories are created through the authenticated held common-directory root. Linux isolation retains UID-map, procfs, Nix-directory masking, deadline, cancellation and cleanup checks. The Nix package exports the main binary, account authority and setup helper against one source manifest.

Grok headless, ACP, catalog and managed-login paths disable automatic updates. ACP requires its exact protocol, approval, model and effort contract and disables memory and subagents. Cursor managed sign-in relays validated public owner actions through the native/account-authority/GUI adapters with expiry, incarnation, cancellation and redaction controls.

Executable review lenses retain authored model/effort and information scope. Each launch is selected against the frozen assessment/policy, current account/catalog, priors, history and quota; scoped authorization is restored afterward. Invalid contracts, account drift, lost access and policy-floor violations still refuse. Historical routing-score V1 remains readable while current V2 schemas retain the added review/rework evidence.

Incomplete goal/spec proposals keep their conservative planning/execution graph, real coverage gaps and frozen policy. Both task assessment and grain classification now require a complete, nondegraded proposal; normal intake still refuses an unassessed document before provider observation. Complete proposals retain normal classification and error propagation.

Writable Direct confinement is first sealed after final parent timeout, assignment messaging, checkpoint and live-budget binding, before launch validation or invocation. Preparation still authenticates and persists the underlying managed-worktree admission. The full command snapshot remains strict; the separately sealed process grant retains its own validation. Tests cover finalized messaging/timeout and independent post-seal mutations.

Fixture repairs carry current selected-account registry/adapter custody into scoped threads, retain real assessment and role/lens contracts, preserve canonical nested Worker metadata and synchronize published schemas. Original isolation, grant, journal, primary-integrity, usage and pricing assertions remain.

Feedback replanning now derives routing from a cloned view of the remaining validated fragments. The canonical session retains completed assignments and fragment history; unassigned remaining fragments still prevent assessment. Heuristic lowering and provider assessment use that same view. A regression checks assessment, history, scope and round-trip preservation.

Grok catalog observation now distinguishes the exact native owner-authentication refusal from a malformed catalog. An implicit optional observation retains existing omission behavior; an explicit executable override still fails closed. Hermetic regressions use the actual unauthenticated public payload and preserve the authenticated-header requirement.

Current fixtures use owned Core registry and lifecycle custody for Cursor, seal each IPC phase after its final messaging and artifact paths, and assert the canonical ACP approval sequence. Role-selection tests assert the four reachable roles and preserve the authored fail-closed effort. Coordinated policy/script planning retains its parent and two terminal Worker scopes, fragments and original task text. The CLI unassessed-intake regression now enters normal automatic intake.

The compiled 76ae489 package was qualified by its source manifest and ELF hashes, delivered to the isolated normal-user VM and imported successfully. Its actual native MACO attempt stopped before Worker dispatch because the selected Grok profile required owner authentication. The final-command confinement change was not reached by that attempt. Productive execution, successful import and operational acceptance remain separate; no stable launcher or running account-authority service has been replaced.

Since d7d8dc4 the branch adds 26 commits that harden the Linux/WSL operator path. Grok's inner bubblewrap is admitted in the ExternalGrok systemd profile. Bare instructions default to the Codex runtime, Codex priors use gpt-6.1-sol as the baseline and refuse GPT-6 Astra, and budgets halt per assignment. Literal single-file create/append goals are accepted, an absent implicit CAM endpoint is treated as not configured, a local-auth Codex primary stays eligible, and direct Codex Workers run with native delegation disabled. Path resolution falls back to a component walk when openat2 is unavailable. Review lens scope keeps earlier selector seals and binds the parent process record, the admitted CAM endpoint is rechecked before release, and worker changes are attributed by wrapper observation. The endpoint socket uses the short-path helper, bounded-status cleanup is budgeted, and journal-append wrapper commands are canonicalised. Codex moderation notices are accepted and missing worker reports are reported as missing. Stale supervise, plan-runtime, quota-refresh, gate-classifier, release-error and operator-prior fixtures are repaired, and shared supervise test helpers use distinct run ids. docs/OPERATOR_QUICKSTART.md, linked from the README, documents the Linux operator path.

Status at f57624f: all 23 checks pass, including the Required Rust CI gate (run 38981323406). On WSL Ubuntu, a release build of maco completed two Codex E2E supervise runs (README append and new-file creation); both ended with accepted=true, decision=accept, status=succeeded. A Grok E2E run has not been performed yet because it requires the owner's interactive Grok device login.

Grok Build uses bubblewrap for denied-path protection, which the
ExternalGrok unit blocked with RestrictNamespaces=yes and a denied @mount
group. Give ExternalGrok the same namespace and @mount exceptions that
ExternalCodex already has, in both the property projector and the
effective-property verifier, and update the pinning tests. AF_NETLINK
stays Codex-only and every other confinement property is unchanged.
Batch repair of the Linux-only supervise-fixtures and supervise-core test
failures reported by CI at d7d8dc4: canonical Cursor provider id, owned
and assessed selection fixtures, persisted source/account custody, explicit
terminal Worker categories, effective review-lens effort floors, and the
CAM socket isolation for the Grok IPC harness. Test-only; scheduler.rs
changes are inside cfg(all(test, target_os = "linux")) fixture installers.
…tart

Bare `maco <instruction>` now routes to `supervise run --literal-goal`
with `--runtime codex` unless the instruction carries `--runtime <value>`
or `--runtime=<value>`, matching the README. Missing machine-global flags
are named individually. The README gains a verified quickstart for one
supervised Codex task on Linux and its machine-global sample now keeps the
staging root under /run/user/<uid>.
Declare the Worker and current policy tags for the authored-profile
scheduler fixture, give the quota-refresh fixture an owned Cursor account
with lifecycle attachment and typed usage evidence, make the gate
classifier fallback explicit, and update a stale licensed-breakage
guidance assertion. Test-only; the helper change is cfg(test).
…hecks

Give each budget and licensed-cascade fixture case its own run id so
immutable process-wide CAM run bindings from an earlier registry cannot
refuse a later case, and declare the pending Worker scope that budget
reselection replays. Seal a selector-authorized coordinator model so the
role-transition fixture still proves a granted promotion, and make the
lens fixture's Auditor minimum explicit while asserting the exact
selector-authorized lens effort (below-minimum refusal stays covered in
selection_bridge). Add the missing assignment_schedule to the verified
run-entry plan, bind the Grok messaging fixture's run account the way
scheduler initialization does, and give its journal-bound dispatch a
budget that covers the debug-image custody checks. Test-only.
…stra

The Codex 0.162 catalog offers gpt-6.1-sol, gpt-6-astra, gpt-6-sol and
gpt-6-luna, but the built-in priors only knew the gpt-5.6 family. Under a
loaded routing policy a catalog model without a dated prior is an
unmeasured but eligible candidate, so gpt-6-astra could be chosen. Revision
2026-10-15.1 prohibits gpt-6-astra for every authority role and adds
gpt-6.1-sol as the owner-policy default baseline, ranked above gpt-5.6-sol
with explicitly non-measured limitations; the capability table admits it
for judgment roles. Tests cover every authority, all Astra efforts,
fallback paths and judgment admission.
…le proof

Budget pressure records one Halt per denied pending assignment, so the
judgment-binding fixture now expects exactly the two pending assignments,
each halting dispatch without a role-binding transition. The single-slug
chain round-trip test also round-trips the unmodified all-frontier map and
asserts ALL_FRONTIER_PROFILE_NAME, which the overwritten map could no
longer prove.
… stops

The fixture released child-b as soon as child-a's runner callback returned,
before the scheduler had collected child-a and recorded its release error.
If child-b finished first, the scheduler could admit child-c. A one-shot
cfg(test) observer now fires right after a release error sets
stop_scheduling, and the fixture releases child-b only then, so child-b
still completes normally and the join-active assertions hold.
CAM run bindings are process-wide and keyed by run id, so sibling tests
that share a helper with a hard-coded run id interfere when libtest runs
them in parallel; the generated-direct re-audit case lost its second
charged launch in CI that way. The re-audit, catalog-preflight and
autonomy-KPI helpers now derive a distinct id per variant or caller.
The priors bundle moved to revision 2026-10-15.1, so operator prior
fixtures published on 2026-09-13 now predate the dataset they extend and
are correctly refused. The fixtures derive their revision and dates from
the bundled dataset instead of hard-coding them, and a new case keeps a
strictly older publication date to prove the predating refusal.
A real supervised run showed that ordinary single-file goals could not
reach a worker: "Add a new file `hello.txt` at the repository root ..."
failed decomposition, and "Update README.md: append one final line that
reads exactly `...`" decomposed without a typed verification contract and
was parked at pre-claim viability.

The planner now accepts the repository-root qualifier for new root files
and recognizes literal append forms ("Update X: append ...", "Append ...
to X", "In X, add ...") for one existing Git-visible file, lowering both
to the existing direct or paired typed contracts. Pre-claim parses the
same forms, so the same contract, task-hash, risk and file checks decide
viability; goals without a contract stay parked with an accepted example.

New-file targets must have existing non-symlink parents that canonicalize
inside the repository, and every path component is checked
case-insensitively against protected and ignored roots in both the
planner and pre-claim, so `.GIT/x` or `Target/x` cannot be claimed on
case-insensitive filesystems. Single-line payloads reject Unicode line
and paragraph separators as well as control characters.
Since the Linux default CAM authority endpoint was introduced, every
caller saw a configured socket even on hosts without a CAM service, so the
designed fallback (CAM local registry selection, else legacy local Codex
auth) was unreachable and a plain Codex supervise run failed before any
launch.

The endpoint resolver now records whether a socket came from an explicit
flag or environment override or from the implicit default. Only an
implicit default whose socket and parent directory are both absent counts
as unconfigured; explicit overrides, existing or dangling entries and
inspection errors still fail closed. Frozen selections carry their socket
source, so a run that froze a socket-observed account refuses to launch if
that socket disappears instead of silently switching to the registry or
local auth. The quickstart describes the fallback and keeps example
runtime roots outside the CAM service's directory.
Account observation returns no entry for a runtime without a selected CAM
account, so a Codex run on legacy local auth reached selection with only
other runtimes' accounts and failed with "account catalog set is missing
the selected primary runtime binding". When CAM is not configured and
Codex was admitted on local auth, selection now takes the existing
unmanaged path for Codex with unknown quota, and role initialization keeps
that eligibility on reselection. Managed Codex parents accept the matching
frozen local-auth admission. A configured CAM endpoint without a Codex
selection still refuses.
…th review

A real supervised run refused its first Codex Worker launch: the managed
app-server classifier requires native delegation disabled, and the setter
only ran for managed ChildOrchestrators, so a direct terminal Worker never
received it. Worker preparation now disables native delegation for
writable Codex Workers too; the classifier is unchanged.

Model-backed parent review also required a selected CAM account. When CAM
is not configured and the run was admitted on local Codex auth, review now
uses that admission with the same model, effort, frozen policy, quota and
scoped authorization checks. A configured CAM endpoint without a selection
still refuses.
…journals

Inside the Codex sandbox the worker journal wrapper failed with "cannot
open the existing worker journal without following links: Function not
implemented", because openat2 with RESOLVE_NO_SYMLINKS returns ENOSYS
under its seccomp filter, so the Worker stopped before its first action.
On ENOSYS only, journal opens now use the existing no-follow component
walker, refusing every symlinked component, and keep the device/inode,
regular-file, ownership, mode and single-link checks. Other errors still
refuse.
Entering the auditor lens scope rebound the routing policy and cleared
every selector seal, so the agent registry's next reread rejected the
run's earlier Worker record ("role/model has no current selector-authorized
loaded-policy binding") and the auditor's version preflight could not
register. The lens scope now keeps existing seals under the same frozen
policy and seals the exact auditor lens triple; scope exit still restores
outer authority. A failed launch registration keeps typed rollback
evidence, and invocation scratch is discarded only after a verified
rollback, so unverified quiescence still refuses.
A real one-line README review exceeded the 32768-byte review lens evidence
limit: the auditor-authored report was 1.3 KB, but the parent appends its
own process record, including up to 32 KB of captured stdout, before the
limit is checked. The lens evidence now carries a versioned envelope with
the auditor-authored report and a SHA-256 and length reference to the
parent process record, verified against the record the caller supplies;
the full record stays in the collected reports and logs. The limit is
unchanged and still refuses oversized auditor-authored findings or
commands.
An independent review found that Grok, Claude, Gemini and Cursor launch
authorities only remembered whether a socket was bound. When none was
admitted, the pre-release check never consulted a CAM socket that appeared
afterwards, so a stale registry selection could be released; a
socket-bound authority also re-resolved the endpoint and would accept a
different one reporting the same binding. Legacy local Codex auth likewise
did not repeat its endpoint-absence check before release.

Each launch authority now keeps the exact admitted endpoint, including
none, refuses any change at verification and revalidates that path; local
Codex auth refuses release if a CAM endpoint has appeared since admission.
A real run produced the exact README edit but was rejected because the
Worker model omitted the optional --changed-path flag, so the journal did
not attribute the mutation. journal-append now executes the wrapped argv
once and records the Git-visible changes it observes within bounded path,
file and total size limits; native edits are attributed with
--observe-changes -- true. A declared --changed-path is kept as an
assertion and a mismatch with the observation is rejected; out-of-scope
observed changes still fail the parent check, which now also verifies
observation continuity, worktree identity and base HEAD. A failed
observation appends a terminal failure record, and the Worker is told to
report wrapper environment errors.

Every open and stat on this in-sandbox path falls back to the no-follow
component walker, with device and mount-id checks, only when openat2 or
statx return ENOSYS, as they do under the Codex sandbox's seccomp filter.
CI checkout paths exceed sun_path, so the plain UnixListener::bind in local_codex_auth_endpoint_appearing_before_release_is_refused failed with SUN_LEN. bind_test_unix_socket binds through a short alias and leaves the socket at the original path the check inspects.
Final private-runtime cleanup now runs under a fresh 30 s budget instead of the exhausted main deadline, startup scavenging honours its local cap, and the measured cleanup time is excluded once per snapshot from repository-map and planning scan deadlines. Per-command and GC status bounds cover the runner's slot wait. Failure stays closed and preserves the main error. Tests pin the 30 s ceiling and clear the scavenge hook on unwind.
Worker, top-level and validation command references recorded through the journal-append wrapper are rewritten to the journaled argv only when the launcher-bound executable, journal, device, inode and cwd match a unique finished record; ambiguous, prefixed, non-IFS-whitespace or unjournaled wrappers stay unsupported. The terminal worker prompt is trimmed back under its fixture ceiling.
…missing

The app-server client now accepts turn/moderationMetadata notifications for the active thread and turn under the same strict parsing as rate-limit notices (raw-byte duplicate-key rejection, closed envelope and params, string ids, at most 64 per turn) instead of aborting the worker as an unsupported method. Acceptance distinguishes an absent or unbound nested worker report from a real envelope/report disagreement, and tests assert the full messages. The invalid direct-worker finalization fixture now expects Failed, matching the journal gate that rejects an envelope without its bound report.
Adds docs/OPERATOR_QUICKSTART.md covering host prerequisites (systemd user manager, delegated cgroup scope, machine-global.json), building, running Codex workers, provisioning a Grok CAM account through device login, and troubleshooting, and links it from the README.
@Meta-Develop
Meta-Develop marked this pull request as ready for review October 17, 2026 00:26
@Meta-Develop
Meta-Develop merged commit fb41d30 into main Oct 17, 2026
24 of 31 checks passed
@Meta-Develop
Meta-Develop deleted the codex/maco-completion-integration-01a12e63 branch October 19, 2026 02:54
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