Connection account info: derive identity from the health-check probe#1111
Connection account info: derive identity from the health-check probe#1111RhysSullivan wants to merge 1 commit into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 1952ca8 | Jun 26 2026, 02:29 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 1952ca8 | Commit Preview URL Branch Preview URL |
Jun 26 2026, 02:29 AM |
Cloudflare preview
Sign-in is Cloudflare Access (one-time PIN to an allowed email). The preview has its own database and encryption key; it is destroyed when this PR closes. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
Greptile SummaryThis PR layers account identity on top of the existing health-check probe system so the same HTTP probe that answers "is this alive?" can also answer "whose account is this?" — enabling key-first connection naming and a live-preview field picker in the OpenAPI integration UI.
Confidence Score: 3/5Mostly safe but has a confirmed stale-closure race in the auto-fill guard that can silently overwrite a user-typed connection name. The BFS schema traversal, identity extraction, and live preview machinery are all well-bounded and well-tested. The e2e suite is thorough. The one confirmed P1 defect — stale
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant UI as React UI
participant Modal as AddAccountModal
participant API as Connections API
participant Backing as OpenAPI Backing
participant Probe as HTTP Probe
Note over UI,Probe: Key-First Connect Flow
UI->>Modal: paste API key
Modal->>API: validateConnection(key, healthCheckSpec)
API->>Backing: checkHealthOpenApi(spec, credential)
Backing->>Probe: HTTP request to probe endpoint
Probe-->>Backing: response body
Backing->>Backing: extractIdentity(body, identityField)
Backing->>Backing: extractResponseFields(body)
Backing-->>API: "HealthCheckResult { status, identity, responseSample }"
API-->>Modal: result
Modal->>Modal: "if healthy && identity: setLabel(identity), setNameAutofilled(true)"
Modal-->>UI: show identity + response sample
Note over UI,Probe: Live Preview (Edit Sheet)
UI->>UI: HealthCheckLivePreviewBlock renders
UI->>API: validateConnection(pastedKey, spec)
API->>Backing: checkHealthOpenApi(spec, credential)
Backing->>Probe: HTTP request
Probe-->>Backing: response body
Backing-->>API: "HealthCheckResult { responseSample }"
API-->>UI: show status + response sample table
Note over UI,Probe: Schema Field Discovery
UI->>UI: buildPreviewHealthCheckCandidates(spec)
UI->>UI: projectResponseFields(responseSchema)
UI->>UI: flattenSchemaShape(schema, defs)
UI-->>UI: responseFields[] for identity picker combobox
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant UI as React UI
participant Modal as AddAccountModal
participant API as Connections API
participant Backing as OpenAPI Backing
participant Probe as HTTP Probe
Note over UI,Probe: Key-First Connect Flow
UI->>Modal: paste API key
Modal->>API: validateConnection(key, healthCheckSpec)
API->>Backing: checkHealthOpenApi(spec, credential)
Backing->>Probe: HTTP request to probe endpoint
Probe-->>Backing: response body
Backing->>Backing: extractIdentity(body, identityField)
Backing->>Backing: extractResponseFields(body)
Backing-->>API: "HealthCheckResult { status, identity, responseSample }"
API-->>Modal: result
Modal->>Modal: "if healthy && identity: setLabel(identity), setNameAutofilled(true)"
Modal-->>UI: show identity + response sample
Note over UI,Probe: Live Preview (Edit Sheet)
UI->>UI: HealthCheckLivePreviewBlock renders
UI->>API: validateConnection(pastedKey, spec)
API->>Backing: checkHealthOpenApi(spec, credential)
Backing->>Probe: HTTP request
Probe-->>Backing: response body
Backing-->>API: "HealthCheckResult { responseSample }"
API-->>UI: show status + response sample table
Note over UI,Probe: Schema Field Discovery
UI->>UI: buildPreviewHealthCheckCandidates(spec)
UI->>UI: projectResponseFields(responseSchema)
UI->>UI: flattenSchemaShape(schema, defs)
UI-->>UI: responseFields[] for identity picker combobox
Reviews (4): Last reviewed commit: "feat: derive connection account info fro..." | Re-trigger Greptile |
59fd53f to
dc99124
Compare
d58fd6e to
b90461f
Compare
dc99124 to
d6b3eac
Compare
b90461f to
aa2f8f0
Compare
Layer account identity on top of the liveness probe. A health check can now name a response field whose value identifies the connected account, so the same probe that answers "is this alive?" also answers "whose account is this?". Core: HealthCheckSpec gains an optional identityField (a dot-path into the response body); HealthCheckResult carries the extracted identity plus a bounded responseSample of the actual returned fields; HealthCheckCandidate carries the operation's projected responseFields. New pure helpers: extractIdentity (resolve a dot-path, numeric segments index arrays), projectResponseFields (enumerate a response schema's scalar leaves breadth-first, merging every allOf/oneOf/anyOf branch so discriminated-union fields aren't dropped), and extractResponseFields (walk a real body for the live preview). OpenAPI backing extracts the identity on a healthy probe and projects each candidate's response fields. React: the editor gains a typed identity-field picker fed by those fields and a live preview (probe a pasted test key, see the real response plus what the identity resolves to); the account row labels itself with the probed identity; and the Add Connection "check the key works" flow gains the identity field (in the inline picker) and auto-fills the connection name from the probed identity. Covered by e2e: validating a key derives the identity; a saved connection's probe surfaces the account then drops it once expired; the identity picker surfaces a shallow scalar and a second-union-branch-only field across a discriminated union; the editor live preview and the Add Connection name-derivation drive the identity flow in the browser.
d6b3eac to
d1aa3ea
Compare
aa2f8f0 to
1952ca8
Compare
Stacked on #1108. Layers account identity on top of the liveness probe: a health check can name a response field whose value identifies the connected account, so the same probe answers "is this alive?" and "whose account is this?". Adds the typed identity-field picker, the live preview (probe a pasted key, see the real response), the account-row identity label, and the key-first connect modal (validate then auto-name). Also restores the OAuth-client deep-link prefill the key-first reorder had dropped.
Stack