Repository navigation
test(tlon): exercise sender roles through the real monitor - #134646
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 10:13 PM ET / September 1, 2026, 02:13 UTC. ClawSweeper reviewWhat this changesThe PR replaces Tlon sender-role tests that duplicated monitor logic with twelve table-driven cases that send DM and group events through the monitor subscription harness. Merge readinessKeep open. This active, maintainer-authored PR replaces shadow role tests with coverage that exercises the monitor’s subscribed event path; no introduced correctness or security defect was found. Priority: P3 Review scores
Verification
How this fits togetherThe Tlon monitor receives Urbit chat or group subscription events, derives the sender identity and role, creates an inbound envelope/context, and dispatches the turn to the agent runtime. This PR tests the role and label facts at that monitor boundary. flowchart LR
A[Urbit subscription event] --> B[Tlon monitor]
B --> C[Normalize sender and decide role]
C --> D[Build envelope and context]
D --> E[Dispatch agent turn]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +33. Total +33 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the focused real-monitor regression coverage once the exact-head required checks complete successfully. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds regression coverage rather than reporting a separate runtime failure; the supplied validation describes an intentional monitor-role mutation that the new cases detect. Is this the best way to solve the issue? Yes. Exercising subscribed events through the monitor is the narrowest maintainable replacement for copied helper tests because it covers the production role producer and its downstream context construction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ef6fe6638250. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer source review and native preparation are complete for 8475fa4. The exact-head hosted checks are green. I read the latest ClawSweeper review in full: it found no actionable defect, and its remaining next step was normal maintainer review after exact-head checks. Both are now satisfied; no rank-up repair was requested. The selected suites pass 90 cases before and 92 after, with all distinct prior inputs retained at the actual monitor boundary. Forcing the production sender role to user leaves the ten removed shadow cases green but fails four new owner cases; exact restoration passes all 92. Production is unchanged; tests +133/-100. This verifies role/context production in the subscription harness, not live Urbit delivery or model authorization. |
|
Merged via squash.
|
Ten sender-role tests called two local copies of the monitor logic, so changing the actual role producer could leave them green. Replace those copies with twelve table rows in the existing real-monitor harness. Each row enters a subscription callback and checks the envelope label, both context role fields, completed dispatch, and absence of runtime errors.
All distinct normalization, null/empty owner, ordinary user, DM/group label, and owner-lookalike inputs remain. The hostile-text case now actually sends its claimed-owner text through the monitor. Preserve real channel-inbound exports with a partial mock so group mention handling uses its actual owner. Each new row aborts and joins its monitor in finally. Existing HTTP/SSE shutdown, reply-prefix, authorization and settings coverage remains unchanged.
Validation: 90 baseline cases and 92 candidate cases pass. Temporarily forcing the production monitor role to user leaves all ten original shadow cases passing but makes four new owner-output cases fail. Exact restoration passes all 92 cases. Full changed checks and Codex autoreview pass.
Production +0/-0; tests +133/-100. This improves sensitivity to real regressions and removes copied logic; no elapsed-time gain or live Urbit/model-authorization proof is claimed. It addresses the role-copy follow-up independently of the earlier channel-authorization cleanup.