Repository navigation
docs(gateway): record why Control UI admission exemptions exist - #125108
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 2:37 AM ET / 06:37 UTC. ClawSweeper reviewWhat this changesAdds an inline explanation of why Gateway build-ID admission exempts configured-root, development, and cross-origin Control UI connections. Merge readinessKeep this maintainer PR open for normal landing: the revised invariant comment accurately records the existing Control UI admission boundary and resolves the prior wording concern. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI sends a build identity when it opens a Gateway WebSocket session. Gateway admission rejects a stale bundled same-origin UI before it can issue RPCs, while configured-root, development, and cross-origin paths remain outside that enforcement boundary. flowchart LR
Browser[Control UI browser] --> Connect[Gateway WebSocket connect]
Connect --> Admission[Build admission]
Admission --> Scope{Bundled same-origin?}
Scope -->|Stale build| Reject[Reject and request reload]
Scope -->|Match or exemption| Session[RPC-capable session]
Config[Configured root or dev/cross-origin] --> Scope
Before merge
Agent review detailsSecurityNone. PR surfaceSource +8. Total +8 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the concise invariant comment at the admission owner so future reviews retain the established product boundary without changing runtime behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: the branch changes only an explanatory comment and does not alter admission behavior. Is this the best way to solve the issue? Yes: recording the rationale beside the admission decision is the narrowest durable solution, and current source and tests support each stated exemption. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ac5c8be00196. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Addressed the configured-root wording finding in new head 1751bd7: the invariant now says configured roots serve an independently built artifact for which the Gateway owns no matching build identity. The imprecise “non-dist by definition” premise is removed. |
|
Acknowledged ClawSweeper’s remaining mechanical “Complete next step” item. The exact-head review has no actionable findings; proceeding with ordinary maintainer landing after green exact-head CI and the native review/prepare/merge gates. |
|
Merged via squash.
|
…claw#125108) * docs(gateway): record why Control UI admission exemptions exist * docs(gateway): state the configured-root exemption reason precisely
What Problem This Solves
Follow-up to #124971 closing its review loop. ClawSweeper twice proposed making the connect-time admission check reject the exempted pairings (dev builds, configured
gateway.controlUi.root, cross-origin connections), because nothing in the code recorded why those exemptions are deliberate. This chip evaluated enforcement properly; the decisive facts were owner-confirmed skips, but they lived only in PR comments — reviewer context that evaporates.Why This Change Was Made
The evaluation result, now recorded as an invariant comment at the admission owner:
devis theui:devsentinel — enforcement is impossible and the workflow is deliberate.buildIdembeds the build timestamp (version-commit-builtAt, seedist/build-info.json), so two version-identical, commit-identical source-built installs carry different ids. Cross-origin equality enforcement would hard-reject matched pairings — the common self-hosted source-built topology — and the rejection's "reload this page" guidance cannot remediate a client the Gateway did not serve.Exempted skew fails visibly at the first missing method instead (the behavior #124971 established), per the
ui/AGENTS.md"Gateway Coupling" rule.User Impact
None — comment-only. The change prevents recurring review churn proposing enforcement that the derivation facts rule out.
Evidence
Every pairing is already contract-tested: the unit table in
control-ui-build-admission.test.tscovers exact-match admitted, same-origin stale rejected (with normalized-host and explicit-port variants), differing-port/configured-root/separately-hosted/dev/absent-build admitted, non-Control-UI ignored;message-handler.control-ui-build-admission.test.tscovers admission over a real WebSocket connect. No test changes needed — the chip's "focused connect-session tests for each pairing" already ship. Production LOC +8/−0, all comment lines.