Owner write scope: owner sessions can only write to their own properties and jobs #529
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 304 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.342
Real PR Conversation Timeline
1 comments
"Review active on #529"
general
weight: 0.35
github-actions[bot]
What this fixes (class C: login/permissions, needs Brett's yes before merge)
The Oct 14 identity binding stops an owner session from naming another owner's id. It did not stop an owner session from writing to another owner's records. Proven by
test/owner-write-scope.test.mjs, which fails 21 of 33 checks on currentmain:POST /workordercreated a job on ANY property_id (that texts the property's tenants/owner), and accepted extra body fields (tenant ids, parent_wo_id, contact phone/name, approval_, recurring_, max_price)./wo/add-noteand/wo/append-descriptiononly checked ownership when the client saidauthor_role=ownerand sentowner_id. A note posted "as a tenant" also texts Brett./wo/set-tenant-visibility,/log-attachment,/create-upload-sessionchecked nothing./wishlist/add(Brett's internal dev list) was reachable by owners.The fix
One gate,
ownerWriteScopeDenied, called in the router for owner sessions only (admin secret and internal tokens never reach it):attachmentScopeAllowsthe read side uses). Otherwise 404 + failed telemetry rowowner_write_scope_denied./workorder: property must be the owner's, unit must belong to that property, only the fields the owner portal form sends survive, type forced toowner.owner_idforced,author_roleforced toowneron notes/descriptions./wishlist/addrefused for owners.Not changed
Admin secret behaviour (tested). Tenant and vendor write scopes (same pattern likely worth a follow-up, not touched here).
owner.htmlalready sends only the allowed fields and always includes wo_id on uploads.Verification
2026-11-10.01-owner-write-scope; verify deploy via/version.🤖 Generated with Claude Code
https://claude.ai/code/session_01EsUqehZV43drizkHs3ePfy