Skip to content

test(agents): use supported metadata in recovery replay fixture - #170722

Merged
steipete merged 1 commit into
mainfrom
dbasync/redmain-recovery-fixture-label
Oct 13, 2026
Merged

steipete merged 1 commit into
mainfrom
dbasync/redmain-recovery-fixture-label

Conversation

@steipete

@steipete steipete commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The agents-sessions test typecheck rejects the publication-replay fixture added by 2251880 because title is not a field of InternalSessionEntry.

Use the supported label metadata field for the real session write that triggers publication replay. The held-read ordering and exactly-once recovery assertions remain unchanged. This is a one-line test-fixture correction; production code is unchanged.

Evidence

Validation: changed-file formatting and lint, git diff --check, and one isolated Codex review passed. No local tests or typechecks were run under the source-only repair assignment. PR CI run 38356094793/job115159524813 passed all 20 tests in the changed file: 34.12 seconds Vitest, 58.74 seconds including the wrapper. Both startup and publication replay cases passed (1.026 and 1.188 seconds). The exact agents-sessions typecheck also passed in job115159954419 (142.1 seconds). T1 remained 454→454, compatibility 9→9, and every dialect category 0→0. Production, SQL, T1, schema, and SDK behavior are unchanged; no SQL harness was run. Scope: one test line replaced.

Original failure: https://github.com/openclaw/openclaw/actions/runs/38354413202/job/115154423701 (main-session-restart-recovery-admission.test.ts:705, TS2322).

Fix the recovery replay fixture introduced by 2251880: title is not a persisted session-entry field. Use label to trigger the same metadata publication while preserving the held-read ordering and exactly-once recovery assertions.
@clawsweeper

clawsweeper Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 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-13T06:22:10.815364Z ea7f9b3 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 agents Agent runtime and tooling size: XS labels Oct 13, 2026
steipete added a commit that referenced this pull request Oct 13, 2026
…70692)

Publish the existing online status config read before resolving usage so Codex runtime readers retain the selected account identity. Await publication and preserve the explicit usage gate without an extra read or synchronous fallback.

The status owner tests and original unchanged auth product case passed. The only failing static leaf is the independently verified main recovery-fixture TS2322, repaired separately in #170722.
@steipete
steipete merged commit 605065c into main Oct 13, 2026
107 of 108 checks passed
@steipete
steipete deleted the dbasync/redmain-recovery-fixture-label branch October 13, 2026 06:29
steipete added a commit that referenced this pull request Oct 13, 2026
…0716)

## What Problem This Solves

First-send native-runtime confirmation must keep session creation bound to the physical database read during preparation. Scheduled main CI found that replacing that database before commit could leave an initialized session row in a store that was not the prepared owner.

The regression came from `869ceef2c25f9c966bfb574b6f5206d1fc685039` (#170536): removing duplicate target-absence checks also dropped source custody. The snapshot owner already captured the database identity, but discarded it; commit then captured the replacement. This is a real user-data custody boundary, so the check stays at the creation effect.

This change carries the snapshot's existing `databaseSource` into the existing final initialization guard. It adds no check, SQL statement, worker request, or handshake. Cohort-reader and in-memory callers retain their behavior. The removed target-absence checks stay removed. The regression keeps its assertions that both stores remain empty and no reply or run is admitted; only the expected error text changes.

## Evidence

- Existing failure: [scheduled run 38352378612, compact-large9](https://github.com/openclaw/openclaw/actions/runs/38352378612/job/115147565692), at `4e3b11bf5c8d011bf1b690424862737b06493a63`.
- Changed-file oxfmt, plain oxlint, and `git diff --check` passed. Private-content scans and the repository formatting hook passed at commit.
- Codex autoreview: scoped-clean through P2, one completed review attempt.
- Candidate behavioral proof: [focused CI 38357203921](https://github.com/openclaw/openclaw/actions/runs/38357203921/job/115162748437) passed the exact original case `rejects first-send consent when its captured database owner is replaced` on the reviewed candidate. One case passed, nine were filtered; case 11.094 seconds, Vitest 55.76 seconds, wrapper 62.55 seconds. The workflow verified pinned source and a clean final source diff. No local suite or broad static scan ran under compute conservation.

No warmed-path SQL or T1 performance change is claimed; no harness run was needed. Source scope is three files, **+18 / -5**. Reviewed candidate: `a98eaf10ecf23b194e7b4c722012added4d2c8ed`.

Ordinary CI 38355813699 exposed three other failures: orphan recovery also fails scheduled main (run 38352378612, job 115147565399); the recovery fixture type error is fixed by #170722 (`605065ce`); the auth endpoint fixture failure is fixed by #170735 (`66f611cd`) after baseline reproduction of all five errors and a five-case candidate pass. Integrated head `9da579411f381299ced29ed7473cb1c8059a7659` merges main `0348a2526c561d8ccce61bfd23931024a6b8f13e`, including both landed repairs without conflicts; the original failures remain evidence and are not represented as passing CI.

The integration preserves the reviewed three-file patch (+18/-5). Changed-file formatting, oxlint and diff checks passed on the integrated source; fresh ordinary CI completed all runtime and static jobs. The exact-case hosted proof above remains evidence for the unchanged repair.

Final integrated-head CI: build, production/test types, lint, architecture, security and database ratchets passed (T1 454 → 454; compatibility calls 9 → 9; dialect groups 0 → 0). The sole failed test is the unchanged orphan-recovery case in [38360337902/job115173163487](https://github.com/openclaw/openclaw/actions/runs/38360337902/job/115173163487): expected provider count 2, got 1, with the capability-preparation error. This matches [scheduled main 38352378612/job115147565399](https://github.com/openclaw/openclaw/actions/runs/38352378612/job/115147565399). Landing uses the authorized inherited-failure exception; CI is not represented as green. The separately landed orphan repair remains subject to its own original-flow proof.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…enclaw#170692)

Publish the existing online status config read before resolving usage so Codex runtime readers retain the selected account identity. Await publication and preserve the explicit usage gate without an extra read or synchronous fallback.

The status owner tests and original unchanged auth product case passed. The only failing static leaf is the independently verified main recovery-fixture TS2322, repaired separately in openclaw#170722.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…claw#170722)

Replace unsupported title with label in the real session metadata write used to trigger recovery publication replay. Preserve the held-read ordering and exactly-once assertions.

The changed file passed all 20 tests in PR CI, and the original agents-sessions type stripe passed. No production behavior changed.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 14, 2026
…nclaw#170716)

## What Problem This Solves

First-send native-runtime confirmation must keep session creation bound to the physical database read during preparation. Scheduled main CI found that replacing that database before commit could leave an initialized session row in a store that was not the prepared owner.

The regression came from `9dc20c232a5293f429234eb327bd5b1c961cb230` (openclaw#170536): removing duplicate target-absence checks also dropped source custody. The snapshot owner already captured the database identity, but discarded it; commit then captured the replacement. This is a real user-data custody boundary, so the check stays at the creation effect.

This change carries the snapshot's existing `databaseSource` into the existing final initialization guard. It adds no check, SQL statement, worker request, or handshake. Cohort-reader and in-memory callers retain their behavior. The removed target-absence checks stay removed. The regression keeps its assertions that both stores remain empty and no reply or run is admitted; only the expected error text changes.

## Evidence

- Existing failure: [scheduled run 38352378612, compact-large9](https://github.com/openclaw/openclaw/actions/runs/38352378612/job/115147565692), at `ddb003ef80607326ec14581c2670ae5407af1b14`.
- Changed-file oxfmt, plain oxlint, and `git diff --check` passed. Private-content scans and the repository formatting hook passed at commit.
- Codex autoreview: scoped-clean through P2, one completed review attempt.
- Candidate behavioral proof: [focused CI 38357203921](https://github.com/openclaw/openclaw/actions/runs/38357203921/job/115162748437) passed the exact original case `rejects first-send consent when its captured database owner is replaced` on the reviewed candidate. One case passed, nine were filtered; case 11.094 seconds, Vitest 55.76 seconds, wrapper 62.55 seconds. The workflow verified pinned source and a clean final source diff. No local suite or broad static scan ran under compute conservation.

No warmed-path SQL or T1 performance change is claimed; no harness run was needed. Source scope is three files, **+18 / -5**. Reviewed candidate: `a98eaf10ecf23b194e7b4c722012added4d2c8ed`.

Ordinary CI 38355813699 exposed three other failures: orphan recovery also fails scheduled main (run 38352378612, job 115147565399); the recovery fixture type error is fixed by openclaw#170722 (`b47aa9f9`); the auth endpoint fixture failure is fixed by openclaw#170735 (`e5a6bd5c`) after baseline reproduction of all five errors and a five-case candidate pass. Integrated head `9da579411f381299ced29ed7473cb1c8059a7659` merges main `116f0502239e7f1cd4a85f57331f986f616e8939`, including both landed repairs without conflicts; the original failures remain evidence and are not represented as passing CI.

The integration preserves the reviewed three-file patch (+18/-5). Changed-file formatting, oxlint and diff checks passed on the integrated source; fresh ordinary CI completed all runtime and static jobs. The exact-case hosted proof above remains evidence for the unchanged repair.

Final integrated-head CI: build, production/test types, lint, architecture, security and database ratchets passed (T1 454 → 454; compatibility calls 9 → 9; dialect groups 0 → 0). The sole failed test is the unchanged orphan-recovery case in [38360337902/job115173163487](https://github.com/openclaw/openclaw/actions/runs/38360337902/job/115173163487): expected provider count 2, got 1, with the capability-preparation error. This matches [scheduled main 38352378612/job115147565399](https://github.com/openclaw/openclaw/actions/runs/38352378612/job/115147565399). Landing uses the authorized inherited-failure exception; CI is not represented as green. The separately landed orphan repair remains subject to its own original-flow proof.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant