Repository navigation
feat(mobile): the fleet views on the gateway, API v7 (2.157.0) - #221
Merged
Merged
Conversation
C3 Desk reads Locks, Permissions, Rules, Built-in guards, Sessions and Now from the Hub on loopback, which a phone cannot reach. The gateway now serves the same read models (oracle/services/mobile_fleet.py), built by services/fleet_overview.py, which the Hub's five overview routes also call, so the two surfaces read the same rows. The phone may change less than Desk: built-in guards only tighten (a looser mode is a 403 for every token kind, leases are never minted), locks stay read-only, "inherit" asks for the typed word when it loosens, and the session catalog carries no transcript text unless mobile_sessions_transcripts is on. Claude-Session: https://claude.ai/code/session_01HoyUtV4U8rmvyMqDPQdhxT
|
Gro could not finish this review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
C3 Desk reads its Locks, Permissions, Rules, Built-in guards, Sessions and Now views from the Hub on loopback. A phone can't reach the Hub, so c3-mobile couldn't show any of them. This adds them to the Oracle's mobile gateway as API version 7.
Shared read models.
services/fleet_overview.pybuilds the cross-project payloads. The Hub's/api/hub/locks/overview,/access/overview,/enforcement/overview,/overrides/policy/overviewandGET /access/builtinnow call it (their responses are unchanged, and the 88 Hub route tests pass as before), so Desk and the phone read the same rows.New gateway routes (
oracle/services/mobile_fleet.py):GET /api/mobile/locks/overviewGET /api/mobile/access/overviewwritablenames the scopes this gateway editsGET /api/mobile/enforcement/overviewGET /api/mobile/overrides/policy/overviewPOST /api/mobile/enforcement/clearconfirm: "off"when it would inherit offPOST /api/mobile/overrides/policy/clearconfirm: "widen"when it loosensGET /api/mobile/access/builtinPOST /api/mobile/access/builtin/modeneeds_deskfor every token kindPOST /api/mobile/access/builtin/lease/revokeGET /api/mobile/sessions/overview,/sessions,/sessions/detail,POST /sessions/markmobile_sessions_transcriptsis on; no resume, theclaude.ai/codelink is passed throughGET /api/mobile/nowNew capabilities:
locks_overview,access_overview,enforcement_overview,enforcement_clear,override_policy_overview,override_policy_clear,builtin,builtin_tighten,sessions,sessions_write,now. New switches:mobile_builtin_enabled,mobile_builtin_tighten,mobile_sessions_enabled,mobile_sessions_write(on) andmobile_sessions_transcripts(off).Invariant 2 changes on purpose. It used to say no gateway route mentions
builtin. It now says no route can loosen or disable a built-in guard.test_mobile_security_api.pypins the exact three builtin routes, andmobile_fleetmay not referencemint.Tests.
tests/test_mobile_fleet.pyadds 31 tests: switches and capabilities, registered-project filtering, tighten-only builtins (Desk token included), typed words on clear, transcript withholding, heartbeat liveness, and newest-not-summed tokens. Full suite locally: 4,899 passed, 8 skipped. One failure,test_enforcement_flip::test_multiedit_is_blocked, was a 10 s hook-subprocess timeout under-n autoand passes on its own.https://claude.ai/code/session_01HoyUtV4U8rmvyMqDPQdhxT