Skip to content

test: update resident profile and fallback transcript fixtures - #170355

Merged
steipete merged 2 commits into
mainfrom
redmain/resident-profile-and-fallback-fixtures
Oct 12, 2026
Merged

steipete merged 2 commits into
mainfrom
redmain/resident-profile-and-fallback-fixtures

Conversation

@steipete

@steipete steipete commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Two tests still encode contracts that changed on main. The resident profile authority path added by #170228 consumes aliases and display facts that the personal-file mock does not provide; seven cases fail before exercising their intended behavior. The fallback notice added by #169773 is a stopped assistant message, so the cron test incorrectly counts the notice as a second answer.

Complete the personal-file mock using the existing UserProfileIdentity and UserProfileDisplay types. In the cron test, assert one primary-to-backup timeout notice through readModelFallbackNotice, then count successful assistant answers separately. Preserve the original requester, revocation, filesystem, one-user-turn, provider-order, and successful-result assertions. Production code and authority checks are unchanged.

Cached failure evidence:

Source and history were checked against main 395ea60dea893feb48782c0ac5fd4fc5a148a42a. The profile failure is a prior candidate observation; the cron failure is reproduced by the cited scheduled-main run. Changed-file formatting, basic lint, and whitespace checks passed. One isolated Codex review completed scoped-clean with no actionable P0–P2 findings; both changed tests passed in PR CI 38318717235, testing merge 634ae26bddea49d922f784c57805b11db5159773 (candidate d171a04362e17b99fae68e59f1e593f2b173edf2 into base f307d643). The run finished green: 20 successful and 29 skipped jobs. Selected lint, test types, baseline ratchets, source contracts, boundaries, guards, and the CI gate passed:

pnpm test src/gateway/server-methods/users-personal-file.test.ts --maxWorkers=1
pnpm test src/cron/isolated-agent/run.fallback-transcript.test.ts --maxWorkers=1

Test-only change: two files, +31/−3. One commit per root cause.

CI executed all 42 personal-file cases (26.40s Vitest, 28.34s wrapper) and the cron fallback case (15.580s case, 29.67s Vitest, 31.20s wrapper). No local runtime timing is claimed.

Standalone Knip and Madge jobs were not selected for this test-only PR; no fresh whole-tree graph pass is claimed. The bounded source disposition reuses the prior clean topology and unaffected production/export scans: these two test leaves add no exports or production edges. The only value import added is the existing leaf readModelFallbackNotice, whose sole dependency is the existing normalization-core record coercer. Other added imports are erased types from an already-imported module. The historical full-tree unused-file findings concern the unrelated executable roots repaired separately in #170347.

Before landing, source checks against main 81ad3bf71935d80c60a8b4a34492e51630d883c3 found no changes to either repaired test or the imported fallback-notice helper. No SDK, schema, update, Doctor, plugin-loading or service-lifecycle change; no SQL/T1 performance claim. Direct-main publication previously hit repository protection, so this emergency repair uses the authorized exact-head PR squash fallback.

@clawsweeper

clawsweeper Bot commented Oct 12, 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 12, 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 Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR completes profile mocks and distinguishes fallback notices from successful assistant answers in existing tests.

Example: A scheduled turn switches from mock-openai/primary to mock-openai/backup after a timeout.

  • Before: The test counts the fallback notice and “Fallback report” as two successful answers and fails.
  • After: The test verifies one timeout notice, one successful answer, and one saved user turn.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused test maintenance supported by matching production contracts and passing affected test lanes, with no actionable code finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test-only PR changes no shipped behavior; inspected screenshots belong to the earlier fallback UI implementation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Existing tests fail on intentional mainline contracts before validating personal-instructions behavior or correctly accounting for fallback answers.
Reason: The maintainer-directed repair restores useful coverage while leaving production behavior and authority checks intact.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it repairs two stale test contracts without weakening their original assertions, and no introduced defect was found; the PR-context gate remains red.

Priority: P3
Reviewed head: d171a04362e17b99fae68e59f1e593f2b173edf2

Before merge

None.

Findings

None.

Agent review details

How this fits together

These tests exercise personal-instructions handlers with controlled profile facts and the cron runner with a simulated provider timeout, checking filesystem effects and persisted transcript messages.

flowchart TD
  A[Profile fixture] --> B[Personal instructions handlers]
  B --> C[Filesystem assertions]
  D[Provider timeout fixture] --> E[Cron agent runner]
  E --> F[Saved transcript]
  F --> G[Notice and answer assertions]
Loading

Technical review

Best possible solution:

Retain these focused fixture repairs and land them through the existing submission and CI gates.

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

Source establishes both fixture failures: the profile consumer spreads missing aliases, and persisted fallback notices satisfy the old stopped-assistant filter; no target code was executed during this review.

Is this the best way to solve the issue?

The patch updates fixtures to existing contracts and adds independent notice expectations without relaxing requester, revocation, filesystem, provider-order, or successful-result coverage.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1bfbdceca349.

Provenance checked

  • Personal-instructions profile fixture keeps the original intent (bdd47f2: Provide self-service personal instructions with requester-bound access; later asynchronous preparation retained those authorization contracts.)
  • Cron fallback transcript assertion keeps the original intent (e52cbaa: Prove provider timeout fallback completes while retaining one user turn and one successful answer.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit e52cbaa adds src/cron/isolated-agent/run.fallback-transcript.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: e52cbaafccae; files: src/cron/isolated-agent/run.fallback-transcript.test.ts)
  • RoboClaw: Raw commit bdd47f2 adds src/gateway/server-methods/users-personal-file.test.ts:28 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: bdd47f252a33; files: src/gateway/server-methods/users-personal-file.test.ts)

PR surface

Tests +28. Total +28 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 31 3 +28
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 31 3 +28

Labels

Label changes:

  • add P3: This is a focused test-maintenance repair with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused test-maintenance repair with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 12, 2026, 6:53 PM ET / 22:53 UTC.

@steipete
steipete merged commit 17e8f10 into main Oct 12, 2026
118 of 122 checks passed
@steipete
steipete deleted the redmain/resident-profile-and-fallback-fixtures branch October 12, 2026 22:58
steipete added a commit that referenced this pull request Oct 13, 2026
Merge main at 81e2765, including the fallback-notice fixture repair from #170355. Preserve the TCP-only local-provider preflight and collection preloads alongside the one-notice and one-answer assertions.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 13, 2026
…law#170355)

Two tests still encode contracts that changed on main. The resident profile authority path added by openclaw#170228 consumes aliases and display facts that the personal-file mock does not provide; seven cases fail before exercising their intended behavior. The fallback notice added by openclaw#169773 is a stopped assistant message, so the cron test incorrectly counts the notice as a second answer.

Complete the personal-file mock using the existing `UserProfileIdentity` and `UserProfileDisplay` types. In the cron test, assert one primary-to-backup timeout notice through `readModelFallbackNotice`, then count successful assistant answers separately. Preserve the original requester, revocation, filesystem, one-user-turn, provider-order, and successful-result assertions. Production code and authority checks are unchanged.

Cached failure evidence:

- Personal-file mock: [Bun job 115027766429](https://github.com/openclaw/openclaw/actions/runs/38313840692/job/115027766429), `profile.aliases` spread failure.
- Cron transcript: scheduled-main [run 38317311743, job 115037168335](https://github.com/openclaw/openclaw/actions/runs/38317311743/job/115037168335), expected one stopped assistant message, received two. The same signature appeared in prior candidate CI.

Source and history were checked against main `3dd81bae92980aecaf0920bbad841c10486dea75`. The profile failure is a prior candidate observation; the cron failure is reproduced by the cited scheduled-main run. Changed-file formatting, basic lint, and whitespace checks passed. One isolated Codex review completed scoped-clean with no actionable P0–P2 findings; both changed tests passed in PR CI [38318717235](https://github.com/openclaw/openclaw/actions/runs/38318717235), testing merge `634ae26bddea49d922f784c57805b11db5159773` (candidate `d171a04362e17b99fae68e59f1e593f2b173edf2` into base `68ba0b0a`). The run finished green: 20 successful and 29 skipped jobs. Selected lint, test types, baseline ratchets, source contracts, boundaries, guards, and the CI gate passed:

```sh
pnpm test src/gateway/server-methods/users-personal-file.test.ts --maxWorkers=1
pnpm test src/cron/isolated-agent/run.fallback-transcript.test.ts --maxWorkers=1
```

Test-only change: two files, +31/−3. One commit per root cause.

CI executed all 42 personal-file cases (26.40s Vitest, 28.34s wrapper) and the cron fallback case (15.580s case, 29.67s Vitest, 31.20s wrapper). No local runtime timing is claimed.

Standalone Knip and Madge jobs were not selected for this test-only PR; no fresh whole-tree graph pass is claimed. The bounded source disposition reuses the prior clean topology and unaffected production/export scans: these two test leaves add no exports or production edges. The only value import added is the existing leaf `readModelFallbackNotice`, whose sole dependency is the existing normalization-core record coercer. Other added imports are erased types from an already-imported module. The historical full-tree unused-file findings concern the unrelated executable roots repaired separately in openclaw#170347.

Before landing, source checks against main `53575ccd561ef562d46ff259fc47b7f4582dc7dc` found no changes to either repaired test or the imported fallback-notice helper. No SDK, schema, update, Doctor, plugin-loading or service-lifecycle change; no SQL/T1 performance claim. Direct-main publication previously hit repository protection, so this emergency repair uses the authorized exact-head PR squash fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime 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