Repository navigation
test: update resident profile and fallback transcript fixtures - #170355
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis 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.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThese 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]
Technical reviewBest 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
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +28. Total +28 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 12, 2026, 6:53 PM ET / 22:53 UTC. |
…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.
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
UserProfileIdentityandUserProfileDisplaytypes. In the cron test, assert one primary-to-backup timeout notice throughreadModelFallbackNotice, 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:
profile.aliasesspread failure.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 merge634ae26bddea49d922f784c57805b11db5159773(candidated171a04362e17b99fae68e59f1e593f2b173edf2into basef307d643). 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: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
81ad3bf71935d80c60a8b4a34492e51630d883c3found 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.