Repository navigation
test(tlon): exercise the real channel authorization resolver - #134393
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 2:59 PM ET / 18:59 UTC. ClawSweeper reviewWhat this changesThe PR replaces four copied Tlon channel-policy demonstrations with direct tests of the resolver used by the channel monitor. Merge readinessThe test calls the actual Tlon configuration resolver, whose result the monitor consumes before restricting a sender; no introduced correctness or security defect was found. Keep this maintainer-authored, maintainer-labeled PR open for the normal merge decision. Priority: P3 Review scores
Verification
How this fits togetherTlon file configuration and hot-reloaded settings feed a channel authorization resolver. The monitor consumes its resolved mode and allowed ships before it dispatches a channel message. flowchart LR
A[File configuration] --> C[Authorization resolver]
B[Hot-reloaded settings] --> C
C --> D[Resolved channel policy]
D --> E[Tlon monitor]
E --> F[Dispatch or deny sender]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +10. Total +10 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the direct resolver coverage and merge it once the normal exact-head maintainer and CI gates are satisfied. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR improves test sensitivity and does not report a current production failure. Is this the best way to solve the issue? Yes. Testing the resolver directly is the narrowest maintainable way to protect its policy defaults and precedence, while the monitor remains the separate consumer boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 72dab3e75198. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
I read the full latest ClawSweeper review (18:59 UTC): no findings or Rank-up moves remain. Exact-head CI has finished successfully, so its ordinary landing condition is satisfied. Maintainer review is complete. All 60 security and 22 monitor tests pass, along with full changed checks and Codex autoreview. The restricted-to-open mutation left all four old demonstrations passing but caused exactly the two expected new resolver failures; both diagnostics joined their processes and restored the production source exactly. Production +0/-0; tests +50/-40. The remaining copied sender-role coverage is explicitly recorded as a follow-up. Proceeding through native landing gates. |
|
Merged via squash.
|
What problem does this PR solve?
Four Tlon authorization tests repeat policy expressions inside the test instead of calling the resolver used by the monitor. They can stay green when the actual default changes.
Why this approach?
Call resolveChannelAuthorization directly for unconfigured channels, explicit empty allowlists, explicit open policy, and settings-over-file precedence. Assert both the resolved mode and ships so the tests exercise the real configuration owner.
User impact
Test-only improvement: production +0/-0; tests +50/-40. All 60 security cases remain; four copied demonstrations become direct owner checks. This changes no authorization policy and makes no elapsed-time claim.
Evidence
All 60 original security tests passed. After the rewrite, all 60 security tests and 22 monitor siblings pass. Full changed-file checks and Codex autoreview pass.
A temporary mutation changed only the real resolver's default from restricted to open. All four old authorization cases still passed; the rewritten default and explicit-empty cases failed, while explicit-open and precedence cases still passed. Both joined diagnostics restored the production file exactly. This proves test sensitivity to an injected regression, not an existing production security defect.
node scripts/run-vitest.mjs extensions/tlon/src/security.test.ts extensions/tlon/src/monitor/index.test.tsFollow-up: replace the ten remaining copied sender-role demonstrations with direct monitor admission evidence. This PR proves configuration resolution; it does not claim new coverage of every runtime sender/approval path.