Skip to content

fix(test): preserve human provenance in release recovery fixture - #159642

Merged
roboclaw-bot merged 1 commit into
release/2026.9.7from
fix/release97-transcript-recovery-provenance-5168
Sep 27, 2026
Merged

roboclaw-bot merged 1 commit into
release/2026.9.7from
fix/release97-transcript-recovery-provenance-5168

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Related: #159617

What Problem This Solves

Fixes the release 2026.9.7 transcript-only restart-recovery test failing before it reaches its stale-route and run-claim assertions. This is the concrete assertion exposed by the reporting repair in #159617 (CI run 36316223625, job 108611480248). Maintainer-directed release-validation repair; not a production-policy change.

User Impact

No user-visible behavior change. The release retains its existing refusal of unverified internal recovery and never derives channel authority from historical Discord routing.

Why This Change Was Made

The positive Control UI fixture records internal ingress but its interrupted user message had no provenance. Release adaptation 0862237 deliberately leaves unknown provenance unverified, so recovery correctly tombstones that synthetic input instead of dispatching. Supply external_user provenance only for this intended human-input case; every other helper caller keeps the old fixture shape. Keep all original counters, deliver=false, message_tool_only, stale route, and source/operational run-ID assertions unchanged.

This is release-specific: the unchanged case passes on inspected main 57f12db, whose provenance reader instead classifies the default branch as other. This PR does not copy that broader main policy into the release.

Evidence

  • Before: exact release source eb63221 reproduces the hosted assertion: expected started=1/skipped=0, received started=0/skipped=1 (25.92s wall).
  • Focused corrected positive case plus existing missing/invalid/external_user provenance cases and missing message-action authority refusal: 8 passed (24.31s wall).
  • Final patch, complete affected file through the repository run-vitest wrapper and canonical infra config: 228 passed, zero skips, exit 0; 135.40s wall with one worker. This existing integration file exercises persistent recovery/dispatch ownership; the patch adds no test cases or process boots.
  • Canonical qaRuntime prerequisite completed successfully (65.1s), including CLI bootstrap and built control-plane guards, after task-local dependency provisioning.
  • Formatting, targeted Oxlint, line-cap ratchet, max-lines suppression ratchet, assertion-safety ratchet, and git diff --check passed; no line-count growth. Parser-dependent ratchets used the same process-local TypeScript 6 adapter.
  • Local execution is diagnostic, not hosted parity: Linux Node 26.8.2 / Vitest 5.0.1, borrowed package dependencies, process-local TypeScript 6 adapter on the release. Main control also used borrowed dependencies (QuickJS 3.6.0 rather than declared 3.6.1; this test does not execute QuickJS). No installed packages were edited.
  • Independent local autoreview was stopped without a verdict after more than nine minutes of heartbeat-only output; this is an explicit review gap, not a clean review. Per the supervising maintainer, proceed to hosted review and CI; parent maintainer personally reviews and lands.
  • No full runtime11 shard or overall release-validation success claimed. Exact-head hosted CI and Claw review are separate gates; parent maintainer owns landing and final validation.

Keep release 2026.9.7 delegated-recovery guards intact while admitting the intended positive Control UI fixture. Preserve routing and run-claim assertions.

Co-authored-by: RomneyDa <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 27, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 27, 2026 12:12
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Sep 27, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 8:25 AM ET / 12:25 UTC.

ClawSweeper review

What this changes

The branch marks the human-origin user message in one restart-recovery test transcript while leaving other uses of the shared fixture unmarked.

Merge readiness

✅ Ready for maintainer review

This remains a useful release-branch test repair. Release recovery rejects the fixture’s unverified input before the intended routing and run-claim assertions; current main uses a different provenance policy, so its passing test does not resolve the release failure. No introduced defect was found.

Priority: P3
Reviewed head: 2d277459dbfb74e5ba2e5421115923299b31696a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The fixture change is narrow and supported by a reported before-and-after regression run, with no production patch or concrete review finding.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The changed owner is a test fixture for release restart recovery. The PR reports a failing release-parent assertion and passing after-fix integration cases, but its Gateway call is mocked; this trusted-author test-only change has no contributor real-setup proof gate. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The changed owner is a test fixture for release restart recovery. The PR reports a failing release-parent assertion and passing after-fix integration cases, but its Gateway call is mocked; this trusted-author test-only change has no contributor real-setup proof gate. No stored-data contract changes.
Evidence reviewed 9 items Introduced change: The pinned merge-base-to-head diff adds an optional human marker to the shared transcript helper and enables it at one call site.
Test contract: The changed case still checks started recovery, disabled direct delivery, message-tool-only mode, a fresh operational run claim, and the retained source run ID.
Release provenance gate: The release reader recognizes explicit external_user provenance; recovery skips an internal-ingress turn when its source remains unverified.
Findings None None.
Security None None.

How this fits together

After a Gateway restart, OpenClaw reads saved session state and transcripts to decide whether an interrupted agent turn may resume. This test checks a Control UI turn whose saved session also contains a stale Discord delivery route.

flowchart LR
  A[Saved session state] --> C[Restart recovery]
  B[Transcript provenance] --> C
  C --> D{Human source verified?}
  D -->|Yes| E[Resume agent turn]
  D -->|No| F[Skip and record outcome]
  E --> G[Gateway request without stale route]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 3 3 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 3 3 0

Review metrics

None.

Technical review

Best possible solution:

Keep explicit human provenance confined to this release fixture, retain the unknown-provenance refusal cases, and land it through the release branch’s normal review and validation gates.

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

Yes on the release parent: the unmarked fixture reaches the source-verification gate and the PR reports the expected started=1 assertion failing as started=0/skipped=1. I did not execute the test; current main uses a different provenance policy.

Is this the best way to solve the issue?

Yes. Marking the one synthetic human input supplies the evidence the release policy requires without changing production recovery or the other fixture callers.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against bdfdc095ee65.

Labels

Label changes:

  • add P3: This is a narrow release-validation fixture correction with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The changed owner is a test fixture for release restart recovery. The PR reports a failing release-parent assertion and passing after-fix integration cases, but its Gateway call is mocked; this trusted-author test-only change has no contributor real-setup proof gate. No stored-data contract changes.

Label justifications:

  • P3: This is a narrow release-validation fixture correction with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The changed owner is a test fixture for release restart recovery. The PR reports a failing release-parent assertion and passing after-fix integration cases, but its Gateway call is mocked; this trusted-author test-only change has no contributor real-setup proof gate. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@roboclaw-bot
roboclaw-bot merged commit beab1d9 into release/2026.9.7 Sep 27, 2026
160 of 161 checks passed
@roboclaw-bot
roboclaw-bot deleted the fix/release97-transcript-recovery-provenance-5168 branch September 27, 2026 12:31
steipete added a commit that referenced this pull request Sep 28, 2026
…160130)

Restart recovery resumes an internal-ingress run only with verified external_user provenance; missing or unknown provenance no longer inherits human evidence.

Forward-port of release/2026.9.7 0862237 (provenance correction) and beab1d9 (#159642 fixture).

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…penclaw#160130)

Restart recovery resumes an internal-ingress run only with verified external_user provenance; missing or unknown provenance no longer inherits human evidence.

Forward-port of release/2026.9.7 0862237 (provenance correction) and beab1d9 (openclaw#159642 fixture).

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant