chore: adopt upstream v1.45.0 - #25
Open
marcorivm wants to merge 3 commits into
Open
Conversation
) - Replace the Get Started dialog with a project-level Install page (tool picker, setup status, last-seen agent activity) and add OpenClaw as a first-class install tool - Add per-connection "Resources" to grants (repo/folder scoping) with the org boundary ∩ project selection model; empty resource lists now deny instead of minting broad tokens - Light up the approvals bell with approve/deny UI - Remove the app-page Permissions section (the effective-permissions panel and the OAuth-scopes list); permissions are managed per agent on the agent page - Wire vitest for apps/web and expand api/gateway test coverage
Merges upstream v1.45.0 onto the open-edition + project-lifecycle stack, per the decisions in docs/upstream-sync/reviews/2026-08-05-v1.45.0.md. THE BLOCKER, fixed: upstream's new fail-closed check in connect.rs::resolve_access_token withholds a credential whenever a connection carries a session policy and neither a token scoper nor a request guard exists. try_refresh_credentials is a stub here, so ee_apps::has_request_guard returning false would have silently stopped EVERY resource-scoped GitHub and Dropbox connection from injecting anything — with cargo test still green, because scope.rs's tests never reach resolve_access_token. It now returns true for exactly the providers evaluate_scope dispatches on, and two new tests in ee_apps.rs guard both directions so a future edit cannot quietly undo it. Three files merged CLEANLY and wrongly. Two were predicted by the review: api/keys.ts ended up with two `projects:` keys in one object literal, and resource-scope.tsx carried a duplicate granularAccessConfigs import. The third was not: gateway/mitm.rs bound `provider` twice in one destructuring pattern (upstream added `provider: _`, the fork already had `provider: prov`, which feeds apply_resource_scope). That one is a hard compile error rather than a silent bug, but it carried no conflict markers either. Conflicts resolved as unions, taking upstream's signature wherever it is a superset of the fork's: - api/projects.ts, use-projects.ts, api/keys.ts — the fork's slice-1 list() work and upstream's arrived independently; upstream's carries an optional organizationId override for the account-route picker, so callers keep working and gain the header capability. - api/client.ts — the fork's ApiError plus upstream's widened apiGet(path, init?), which is what makes that override possible. - navigation.ts — the project cookie beside upstream's new DEFAULT_ORG_COOKIE, one definition each, exactly as docs/project-lifecycle.md anticipated. - gateway/hooks.rs — upstream's refuse_empty_scope beside the fork's budget gate; adjacent insertions, no semantic overlap. The module doc now says why refuse_empty_scope is inert here (this fork guards at the request layer). resource-scope.tsx keeps the fork's real editor and adopts upstream's widened prop contract for real rather than nominally: manage-permissions-dialog.tsx merged with no conflict passing readOnly and orgPolicy, so ignoring them would render org-granted grants as editable and keep edits live mid-save. readOnly is threaded into ScopeChecklist and ScopeTextList (which had no disabled support at all), and orgPolicy disables out-of-boundary items. Upstream's `|| readOnly` early return is deliberately NOT copied — the dialog passes save.isPending, so the Resources block would blink out mid-save. Accepted upstream's deletions without resurrecting anything: get-started-dialog (replaced by /install), app-permissions-reflection, permissions-list, agent-scope-select, withOrgPrefix. Verified zero dangling references. apps/web gains upstream's vitest harness — the fork's web slices had none.
marcorivm
force-pushed
the
chore/upstream-v1.45.0
branch
from
August 8, 2026 19:34
41fdc2a to
4c12ce1
Compare
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.
Adopts upstream v1.45.0 per the decisions in
docs/upstream-sync/reviews/2026-08-05-v1.45.0.md(#9). 83 files, but the review surface is the ~10 files listed below — the rest is upstream's own code arriving.Merged onto the project-lifecycle stack rather than bare v1.44.0, so the real conflict set was 7, not the 6 the original review measured —
navigation.tsjoined, because the project cookie now lives there.The blocker, fixed
Upstream's new fail-closed check in
connect.rs::resolve_access_tokenwithholds a credential whenever a connection carries a session policy and neither a token scoper nor a request guard exists.try_refresh_credentialsis a stub here, soee_apps::has_request_guardreturningfalsewould have silently stopped every resource-scoped GitHub and Dropbox connection from injecting anything — withcargo teststill green, becausescope.rs's tests never reachresolve_access_token.The list mirrors
evaluate_scope's dispatch exactly — anything else falls toIndeterminate → Blocked, so claiming a guard for it would assert enforcement that doesn't exist. Two new tests guard both directions, since nothing in CI caught this class of regression before.Three files merged cleanly and wrongly
Two were predicted by the review:
api/keys.ts— twoprojects:keys in one object literal (TS1117;queryKeys.projects.detailwould have becomeundefined)resource-scope.tsx— duplicategranularAccessConfigsimportOne was not predicted:
gateway/mitm.rsboundprovidertwice in a single destructuring pattern — upstream addedprovider: _, the fork already hadprovider: prov, which feedsapply_resource_scope. A hard compile error, but it carried no conflict markers either. Worth folding into the skill's gotchas.Conflicts resolved as unions
Wherever upstream's signature is a superset of the fork's, I took upstream's:
api/projects.ts,use-projects.ts,api/keys.tslist()and upstream's arrived independently. Upstream's carries an optionalorganizationIdoverride for the account-route picker, so existing callers keep working and gain the capability.api/client.tsApiError+ upstream's widenedapiGet(path, init?)— what makes that override possible. Not added to the other verbs; nothing calls them that way.navigation.tsDEFAULT_ORG_COOKIE, one definition each — exactly asdocs/project-lifecycle.mdanticipated.gateway/hooks.rsrefuse_empty_scopebeside the budget gate; adjacent insertions, no overlap. Module doc now records why it's inert here.resource-scope.tsx— the props are honoured, not just acceptedmanage-permissions-dialog.tsxmerged with no conflict passingreadOnlyandorgPolicy. Ignoring them would type-check and silently render org-granted grants as editable, with edits staying live during save. SoreadOnlyis threaded intoScopeChecklistandScopeTextList(neither had any disabled support), andorgPolicydisables out-of-boundary items with a stated ceiling.Upstream's
|| readOnlyearly return is deliberately not copied — the dialog passessave.isPending, so the whole Resources block would blink out mid-save.Deletions accepted
get-started-dialog(replaced by/install),app-permissions-reflection,permissions-list,agent-scope-select,withOrgPrefix. Verified zero dangling references.Verification
The review's own checklist: exactly one
projects:key ✓, onegranularAccessConfigsimport ✓, zero dangling refs ✓, zero conflict markers ✓.One fix needed on the way in: upstream gave
listAgentsarequestLog.groupByaggregate, which the fork'sapi-key.test.tsmock had to learn.Follow-up
docs/upstream-sync/state.jsonstill saysforkBase: v1.44.0with this adoption pending. That file lives on #9's branch, which is a sibling of this stack rather than an ancestor, so it can't be updated from here — it needs a follow-up once #9 merges. Theee_appsscaffolding decisions (compose_resource_scope,scope_reaches_nothing) remain open as the review recorded.