Skip to content

fix(web): preserve plugin resource action policies - #149

Open
imneov wants to merge 3 commits into
mainfrom
feat/plugin-proxy-credentials
Open

imneov wants to merge 3 commits into
mainfrom
feat/plugin-proxy-credentials

Conversation

@imneov

@imneov imneov commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • bug fix
  • documentation
  • CI / tooling (deterministic CRD generation)

What this PR does and why

Resource actions received an empty data context even when their plugin registered data extensions. The inference-detail SLO action also inherited the uninstall lock, blocking independently editable SLO policies.

  • Deliver each plugin's data-extension results to its own synchronous resource action callbacks for the current resource.
  • Keep SLO and uninstall policies independent; retain open SLO drafts read-only while policy data reloads, without allowing stale or failed results to enable writes.
  • Preserve the generic SDK boundary: no Canary-specific host hooks or backend exceptions.
  • Defer authProxySecretRef at the user's request. Remove the proposed type, generated schema field, route/release validation and Secret lookup/injection. Global does not implement this extension; it is not an existing cross-host contract.
  • Keep existing authProxy, session Bearer, IAM, verified identity forwarding and Cookie stripping unchanged. Add regressions for the existing contract and rejection of the unsupported field.
  • Retain a deterministic schema generator; the generated CRD and existing proxy runtime/types match the pre-extension baseline f4c50c9.

Which issue(s) this PR fixes

Fixes #151

Refs #148 (deferred proposal, not implemented by this PR).

Companion frontend/package PR: modelsphere/console-canary-plugin#11.

How it was tested

  • go test ./... and go vet ./... passed.
  • go test -race ./internal/iam ./internal/pluginregistry ./internal/server passed.
  • Contract regressions cover the existing schema, strict route decoding, Cookie/Bearer sessions, verified identity, Cookie stripping and no backend Secret reads.
  • pnpm --dir web typecheck passed after the removal; unchanged frontend source previously passed all 835 tests in 92 files and a production build.
  • Frontend regressions cover plugin data isolation, changed resource assignments, refresh failures, independent SLO/uninstall decisions and preservation of open drafts during revalidation.
  • helm lint --strict helm/console passed with Helm 3.17.4; formatting and git diff --check passed.
  • Standards/code and Spec/Go reviews of the removal have no actionable findings; earlier React/TypeScript reviews of the retained frontend fix also passed.
  • Latest-head CI and image/chart build passed for 9c659a3.

Checks

  • go test ./... and gofmt -l on modified packages is empty
  • Web typecheck; unchanged frontend source passed all 835 tests and production build
  • helm lint --strict helm/console
  • Docs updated
  • No credentials, permission grants or deployment-specific endpoints added

Notes for reviewers

Start with web/src/extensions/queries.ts, web/src/extensions/registry.ts and web/src/modules/inferences/InferenceDetail.tsx. The Secret proposal remains in docs/development/plugin-proxy-credentials.md with an explicit deferred/not-shipped status.

The earlier Secret-extension prototype is removed by 9c659a3; review the cumulative diff. #148 remains deferred, not completed.

The current generic proxy forwards a user session, not Canary's existing backend shared key. Backend authentication integration remains owned by the backend team and is not established by package validation. No new CRD field or Secret-read permission is required by this PR. No live deployment or merge was performed.

Release note

Plugin resource actions receive their own data-extension results, and SLO editing no longer inherits the uninstall lock. Existing proxy authentication remains unchanged; the shared-Secret extension is deferred.

Resolve release-scoped Secret references after session and IAM checks. Fail closed on unavailable credentials, observe rotation on each request, and preserve backend identity validation.

Fixes #148
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T02:59:26.841355Z 78e37ad PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@imneov

imneov commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Companion modelsphere/console-canary-plugin#11 has been reworked and its cloud build passed: https://github.com/modelsphere/console-canary-plugin/actions/runs/45316712596. The 0.4.2 cloud package passed checksum, pinned-host CLI validation and rendered Secret-reference checks; canaryd main.go/service.go now have no diff against that PR base. All Console CI/publish checks passed. No cluster modifications or merges performed; this PR is awaiting the required GitHub Approver.

Share plugin-local data queries with action callbacks and preserve independent SLO edit policy instead of inheriting the uninstall lock. Keep open SLO drafts mounted during policy refresh while writes remain disabled. Add isolation, changed-resource, stale-error and rendered-action regression tests.
Keep the existing authProxy session and identity contract. Remove the unshared Secret-reference schema, lookup and validation while retaining the proposal as deferred. Add regressions for existing routes and session forwarding without Secret reads.

Refs #148
@imneov imneov changed the title feat(server): inject shared credentials for plugin proxy routes fix(web): preserve plugin resource action policies Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shell: plugin resource actions receive no extension data

1 participant