Skip to content

fix(tests): enforce cron authority and optional exec completion - #184373

Merged
steipete merged 1 commit into
mainfrom
steipete/fix-main-stale-cron-mcp-tests-20261026
Oct 26, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/fix-main-stale-cron-mcp-tests-20261026

Conversation

@steipete

@steipete steipete commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the stale empty-final expectation in MCP exec-completion coverage, strengthens cron publication-authority regression coverage, and corrects outdated tool-listing documentation.

Related: #184144, #184005, #184366.

User Impact

No production changes in this PR. CI checks that ordinary background exec completions can finish quietly without an error or delivery claim, and that listed GitHub actions still refuse unauthorized scheduled calls.

Why This Change Was Made

Read the bodies and diffs of #184144 (@steipete) and #184005 (@obviyus). Their intended contracts remain: GitHub schemas stay stable across turns, and ordinary exec-completion replies are optional.

The cron investigation also reproduced a product authority gap: a continuation without operator authority could reach synthetic GitHub inspection and merging through the System-backed in-process bridge. #184366 independently fixed that owner while this PR's first CI run was passing. This branch incorporates it by rebase, preserves its production implementation unchanged, and adds the remaining independent-action coverage. The upstream fix was not in the original failing baseline (git merge-base --is-ancestor returned 1).

Case Contract chosen and checked
Legacy attribution Stored attribution grants no operator authority: listed inspect and merge calls are independently rejected.
Foreign target Scheduling into another conversation does not transfer the creator's operator authority: both calls are rejected.
Queued manager rename A manager's queued edit clears captured operator authority: both calls are rejected despite the stable schema.
Owner capture races manager payload Replaced manager payload cannot inherit the owner's captured authority: both calls are rejected.
Empty CLI final An ordinary exec-completion turn may complete without a reply, error, delivery, or attempted delivery.

The cron test no longer consults schema contents to decide whether to execute. An inspection rejection cannot skip the merge attempt. It retains absent-operator, zero-result, zero-receipt-read and zero-GitHub-transport assertions. MCP coverage retains real dispatch, admission, CLI preparation, MCP calls, allowed filesystem effects, permission-revocation denial, and provider failure. External GitHub and model I/O remain synthetic.

Evidence

  • Original main 622215d053bbe4c1ec3c6cdc4a386ccd27d5a844: cron 4 failed / 16 passed, MCP 1 failed / 3 passed, matching all five reported signatures.
  • Strengthened cron regression against the original production owner: 4 failed / 16 filtered, because unauthorized actions were not rejected. The owner was verified byte-identical to original main for this run.
  • Before conflict repair: both required files passed locally (20 cron + 4 MCP), publication-action siblings 32/32 passed, and CI 40288736176 passed on ab0365e1bb4b42eb541b62cf7cacbc7351e07158. This is prior-head evidence only.
  • Rebased final focused local run: 20/20 cron (196.91 s runner duration) and 4/4 MCP (152.79 s) passed. Combined local wrapper wall time: 376.03 s.
  • Exact-head CI 40291139419 and openclaw/ci-gate: passed for b4e7b57cfc7628160f2c15e0454dc553eed4886b. Logs verify cron 20/20 and MCP 4/4. Summed test-case time: 72.989 s cron, 4.210 s MCP (not whole-job elapsed time).
  • Changed-file oxfmt, repository oxlint, and git diff --check: passed after conflict repair.
  • Independent subagent review (autoreview route unavailable): no actionable P0–P2 findings on the final staged three-file delta after conflict repair. The helper's preflight refused the selected provider because it did not match the operator configuration; configuration was not changed.
  • Production LOC delta: 0. This is a test/docs correctness repair; CPU/allocation benchmarks, iteration counts and Gateway stress are not applicable. No timeouts raised and no CI reruns.

The existing cron file exceeds the 30-second test budget because it exercises durable scheduling, admission, restart recovery, queued edits and real action boundaries across 20 cases. This repair adds no fixtures or cases. The author simplification pass consolidated schema assertions and independent action calls in the existing fixture. Local proof used the repository test wrapper with --maxWorkers=1; no Testbox lease was used.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Contributor

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-26T08:22:55.879468Z ab0365e PR opened
ℹ️ 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: S labels Oct 26, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

Require admitted operator identity for privileged GitHub actions and update regression coverage for stable tool schemas and silent background completions.

Example: A scheduled continuation with legacy attribution calls merge on fixture/repository pull request 7.

  • Before: Synthetic System write scopes allow the action to reach the GitHub transport.
  • After: The action rejects before publication-receipt lookup or GitHub transport.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused and source-supported, with meaningful in-process authority coverage but no live GitHub execution evidence.
Proof confidence 🦐 gold shrimp (3/6) Sufficient (none): The supplied cron harness exercises durable scheduling, real admission and the publication action owner with allowed, unauthorized, and revoked principals; transport-boundary assertions prevent unauthorized effects. Reported repaired runs pass, while model and GitHub I/O remain synthetic. This maintainer-authored PR requires no additional ordinary contributor proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An unauthorized scheduled continuation could invoke privileged PR actions, while existing integration assertions rejected intentionally silent background completions.
Reason: The direction is maintainer-authorized and preserves established authority and reply contracts without adding configuration or machinery.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: useful test and documentation corrections remain, although main already fixes the authority gap through #184366. The pinned diff introduces no definite defect; GitHub reports merge conflicts.

Priority: P2
Reviewed head: ab0365e1bb4b42eb541b62cf7cacbc7351e07158

Before merge

  • Complete next step - The PR author should resolve GitHub's reported conflicts with the merged caller-authority repair, preserving its scope intersection and lifetime checks.

Findings

None.

Agent review details

How this fits together

Scheduled conversation turns invoke GitHub tools through Gateway admission; the publication action owner checks live requester authority before reading publication metadata or sending GitHub requests.

flowchart LR
  A[Scheduled continuation] --> B[Session admission]
  B --> C[Stable GitHub tool]
  C --> D[Gateway requester]
  D --> E[Publication action guard]
  E --> F[GitHub transport]
Loading

Technical review

Best possible solution:

Preserve main's caller-capability authorization while integrating the remaining independent action assertions, optional-completion regression, and documentation correction.

Do we have a high-confidence way to reproduce the issue?

Source inspection establishes the pre-fix synthetic-System scope path and stale completion expectation; the author reports failing negative controls and passing repaired suites, but this review ran no tests.

Is this the best way to solve the issue?

The pinned change is a focused repair at the existing owner, but its authority hunk now overlaps main's more explicit caller-capability implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0eb245aedb56.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 718bd3d adds src/cron/isolated-agent/run.operator-continuation.test.ts:165 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 718bd3d69d29; files: src/cron/isolated-agent/run.operator-continuation.test.ts)

PR surface

Source +1, Tests +5, Docs 0. Total +6 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 6 5 +1
Tests 2 29 24 +5
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 36 30 +6

Labels

Label changes:

  • add P2: The remaining work preserves useful regression contracts and corrects documentation; fetched main already repairs the authority gap.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The remaining work preserves useful regression contracts and corrects documentation; fetched main already repairs the authority gap.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 26, 2026, 4:10 AM ET / 08:10 UTC.

Assert stable GitHub schemas and independently reject unauthorized inspect
and merge calls on top of #184366. Accept empty optional exec-completion
finals without delivery claims. Correct stale tool-authority documentation.
Follow-up to the contracts established by #184144 and #184005.
@steipete
steipete force-pushed the steipete/fix-main-stale-cron-mcp-tests-20261026 branch from ab0365e to b4e7b57 Compare October 26, 2026 08:16
@steipete
steipete merged commit 7aee701 into main Oct 26, 2026
109 checks passed
@steipete
steipete deleted the steipete/fix-main-stale-cron-mcp-tests-20261026 branch October 26, 2026 08:31
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…claw#184373)

Assert stable GitHub schemas and independently reject unauthorized inspect
and merge calls on top of openclaw#184366. Accept empty optional exec-completion
finals without delivery claims. Correct stale tool-authority documentation.
Follow-up to the contracts established by openclaw#184144 and openclaw#184005.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant