Skip to content

Execute frozen research workflows with durable step journals - #357

Merged
dinpd merged 3 commits into
mainfrom
codex/356-authoritative-research
Oct 8, 2026
Merged

dinpd merged 3 commits into
mainfrom
codex/356-authoritative-research

Conversation

@dinpd

@dinpd dinpd commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #356.

  • Execute newly saved social scanners from a frozen, canonical server-validated v2 contract: fixed operations, ordered typed bindings, model/instructions/parameters, retrieval and polling bounds, report limits and stable delivery identity.
  • Persist a bounded ordered step journal with times, frozen digest, input/output references and tool-call indices. Expose it read-only beside retained evidence, with explicit legacy gaps.
  • Preserve pre-I/O Actor intent, safe read recovery and no replay of interrupted starts. Completed AI decisions survive restart; interrupted AI assessment is not recomputed. Handoff intent uses one identity, bounded attempts and an uncertain outcome when acceptance is unconfirmed.

Acceptance evidence

  • Canonical operations/bindings/version/settings and digest validation reject unsupported definitions and missing/changed execution state before provider calls. Approval and activation remain owner/revision gated.
  • Runtime fixtures correlate the eight ordered steps, recorded typed bindings, AI request parameters, tool arguments and report handoff with the frozen definition.
  • Stored-boundary recovery fixtures cover interrupted Actors, interrupted/completed AI assessment, pre-handoff intent and retained acceptance. Partial retrieval, failed classification, scope cancellation, budget exhaustion and uncertain delivery do not establish success.
  • Maximum-size fixture covers 20 calls, 40 multibyte candidates, full-length queries and five pending handoffs below the 128KB storage budget.
  • Browser checks: frozen/current definitions, actual journal rendering, typed wiring, decisions, partial coverage, uncertainty, legacy capture, viewer controls, tenant switching, keyboard and desktop/mobile no-overflow; zero writes during inspection. Existing research and grouped-history browser acceptance passed.
  • Console: npm ci --offline, 340 passing tests, operator/demo bundle dry runs.
  • Python: 206 passing tests; release metadata check; wheel and sdist built; fresh-wheel installation/version/CLI smoke passed.
  • Repository minor-release TypeScript gates: clean installs, tests and builds for guard (37), SDK (11), provider-express (17), OpenClaw (21), adapter (35).

Review and security

git diff --check passed. Production dependency audit reports zero vulnerabilities; no dependencies changed. Scoped manual review covered credential retention/redaction, untrusted provider/model text, safe DOM text rendering, tenant/role boundaries, endpoint/tool allowlists, frozen authority, pre-I/O persistence and replay/uncertainty behavior. Existing automated security-boundary tests passed. Fixtures are synthetic, not live-account execution or independent verification.

Release / compatibility

Significant functionality; minor RC 0.48.0rc1 / v0.48.0-rc.1 because execution/evidence schemas change. Version metadata, dated changelog and compatibility notes are included. No destructive migration, arbitrary scripts, editable user graphs, new connectors or expanded authority. Legacy descriptive/absent contracts retain compatibility execution and no invented step journals. Owners save/capture a new executable snapshot, complete a fresh trial and reactivate. Historical definitions remain frozen.

Journals reference bounded normalized projections, not original provider payloads or private model reasoning. They are runtime-recorded, not signed/tamper-proof independent audits. Existing 40-run retention applies; explanations retain at most 250 characters / 400 JSON UTF-8 bytes. Transport remains at-least-once, and provider acceptance does not prove inbox receipt. The release tag, published artifacts, clean published-wheel installation and hosted deployment will be verified after merge.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5810ed15b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const delivery=await this.reports.report({id:`research:${run.id}`,jobId:agent.id,title:`${agent.title}: daily research digest`.slice(0,180),detail:research.report,recipient:config.recipient});
const delivery=await this.reports.report({id:deliveryId,jobId:agent.id,title:`${agent.title}: daily research digest`.slice(0,180),detail:inputs?.report??research.report!,recipient:inputs?.recipient.recipient??config.recipient});
research.delivery=delivery;
if(research.execution)recordStep(research,'deliver',delivery.status==='uncertain'?'uncertain':delivery.status==='failed'?'failed':'succeeded',{kind:'handoff',attempt,observation:delivery.status});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Record cancelled handoffs as cancelled

When the report bridge returns status: "cancelled"—for example, after the recipient is removed while a report is pending—this branch records the handoff as succeeded, even though the delivery step and final outcome subsequently fail. Because the journal is exposed as durable audit evidence and StepRecord already supports cancelled, map this response to cancelled rather than presenting a cancelled handoff as successful.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T15:25:27.138849Z 32f688a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dinpd
dinpd merged commit 15f8549 into main Oct 8, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32f688a283

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const attempt=(research.execution?.handoffAttempts??research.deliveryAttempts??0)+1;
if(research.execution){
if(attempt>Number(settings!.maxHandoffAttempts)){research.delivery={status:'uncertain',error:'The bounded handoff attempts were exhausted; check the existing delivery identity.'};await this.saveRun(run);return;}
research.execution.handoffAttempts=attempt;recordStep(research,'deliver','started',{kind:'handoff',attempt});await this.saveRun(run);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Read executable handoff counts from the execution record

For executable v2 runs, this stores every handoff attempt in research.execution.handoffAttempts, but researchStepEvidence() in console/src/workflow-inspector.ts still displays only research.deliveryAttempts || 0. Because deliveryAttempts is normally untouched when the bridge returns a status, accepted deliveries and even five pending responses are presented as having zero handoff attempts, making the new evidence inspector contradict the durable journal. Use the execution counter for v2 runs, with the legacy field as a fallback.

Useful? React with 👍 / 👎.

@dinpd

dinpd commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

Delivery verification complete: merged commit 15f8549 is on remote main; checkout and annotated v0.48.0-rc.1 tag match it. Release workflow 37800590424 succeeded and published the wheel and source distribution. The downloaded published wheel installed in a fresh environment; version and CLI smoke checks passed. Production deployment 37800488449 succeeded, including readiness, console Worker and public demo (not skipped). Required PR checks passed. Separate automatic Dependency Graph run 37800501618 failed before starting any job steps, emitted no diagnostics/findings, and GitHub rejected a rerun. Production npm audit reported zero vulnerabilities and scoped manual trust-boundary review completed; no dependencies changed. This separate scan limitation remains disclosed.

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.

Execute the social scanner from its frozen bounded workflow contract

1 participant