Skip to content

Model portable Codex dispatch and recursive workflow evidence - #7360

Closed
briansrls wants to merge 18 commits into
mainfrom
session/codex-provider-feedback-v0
Closed

briansrls wants to merge 18 commits into
mainfrom
session/codex-provider-feedback-v0

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Why

A live roadmap exercise exposed that the dashboard could acknowledge a provider session but could not yet drive or explain an end-to-end business workflow. The same exercise found ambient host paths, provider/auth ambiguity, hidden execution dependencies, conflated session/process/agent state, unbounded provider-event observation, unclear Stop/Clear behavior, and no authoritative producers for Verify, Publish, Review, or Goal Audit.

This PR preserves those findings as one cohesive foundation and deliberately stops at the first honest boundary: Agent complete; Verify, Publish, Review, and Audit pending.

What this models

  • explicit HostDashboardInstance identity and a safe, disjoint live lab/apply boundary;
  • exact work-item validation operations and platform/task capabilities through WorkItemExecutionContract + Ensure;
  • Codex CLI provider selection, dedicated CODEX_HOME, auth/version preflight, noninteractive execution, persisted JSONL evidence, and observed npm/node process identity;
  • attempt, session, process, provider, Stop, and Clear as independent facts;
  • bounded jq projection of large raw provider events, with malformed/unknown/contradictory evidence refusing loudly;
  • Env / Worktree / Agent / Verify / Publish / Review / Audit as a pure evidence projection;
  • recursive desired-versus-observed workflow reconciliation using one fold, including goal revisions, explicit waivers, reparenting, and refusal of silent goal shrink;
  • the full incident ledger and completion design in docs/plans/recursive-workflow-advancement-design.md.

Live receipt

The isolated lab ran node 2-admission-model, attempt 189ec6faadc3e186:

  • Environment: complete
  • Worktree: complete
  • Agent: complete (turn.completed, process exit 0)
  • Verify / Publish / Review / Audit: pending

A repeated Dispatch click created no new attempt. The retained tmux container produced the actuator-level already_live acknowledgement, currently presented as dispatch · accepted. That is true at the session grain and wrong as the workflow's primary action; the design makes the next control a server-derived WorkflowAdvancePlan instead.

Raw Codex evidence also demonstrated why projection must be bounded: one item.completed command event carried roughly 154 KB of aggregated output and another exceeded 200 KB. Raw JSONL remains intact while synchronous observation consumes only validated structural envelopes.

Finish sequence

  1. Derive a typed, server-authoritative advancement plan and replace the primary Dispatch control with the exact ready obligation.
  2. Capture an immutable candidate and produce Verification receipts from the existing execution contract.
  3. Publish the exact candidate with remote readback.
  4. Advertise and observe exact-head review (draft GitHub PR first; internal API later).
  5. Run an antagonistic approved-intent-versus-actual goal audit that prevents partial work from closing.
  6. Realize provisioning, rework, audit, and functional decomposition as recursive child workflows.
  7. Finish provider/storage portability without changing workflow fact semantics.

Each slice and its RED controls are specified in the design.

Validation

Current head:

  • doc_graph_has_no_orphan_docs — green
  • workflow_reconcile_keystone_holds — green
  • roadmap_provider_events_keystone_holds — green
  • roadmap_workflow_progress_keystone_holds — green
  • cargo fmt --all --check — green using the exact installed Cargo realization
  • git diff --check — green

The first push attempt itself found another modeled dependency gap: the pre-push hook assumed cargo on interactive PATH although Cargo 1.93.0 was installed at /home/briansrls/.cargo/bin/cargo. The exact-path format gate was run successfully before pushing with hook execution skipped, and the receipt/required correction is recorded in the design.

The implementation slices were also exercised with their focused dashboard-instance, apply, serve, dispatch-environment, dispatch-actuator, provider-event, workflow-progress, workflow-reconcile, and generated-artifact witnesses, plus modeled lab apply and live readback.

Review boundary

This is a draft because it is a foundational model and design review, not a claim that the full workflow is implemented. Review should be especially antagonistic about:

  • whether containment and dependency are correctly kept separate;
  • whether every status is derived from authoritative evidence;
  • whether goal revision/waiver rules prevent silent scope loss; and
  • whether the proposed advancement plan can stay generic rather than becoming a hand-maintained stage machine.

@gunbai-bot

gunbai-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Superseded by #7368, which carries all 18 commits from this branch plus the merge with main (#7350's roadmap authority refresh) and repairs for the eight red witnesses. This branch was left conflicted; #7368 is the continuation and is out of draft. Suggest closing this unmerged once #7368 lands.

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