Sync upstream Centaur with TipLink deployment compatibility - #59
Merged
Conversation
…paradigmxyz#617) Grant priority (direct > role) was only honored within a single secret type. The wire protocol applies the secrets array before the transforms array, so a role-granted gcp_auth always overwrote a direct static secret on the same header regardless of priority. Resolve conflicts at config-assembly time instead: each credential reports the (host-or-cidr, header-or-param) pairs it writes, and Principal#served_credentials withholds any credential that overlaps a pair a stronger grant already claimed. Only the winner is served, so proxy ordering no longer decides precedence.
Expose the company_context tool as a sandbox CLI so agents can discover and invoke it via centaur-tools.
fix(proxy): allow project access token header
* feat: label tool credential secrets * test: cover tool secret labels in reconciler * fix: preserve tool labels on duplicate secrets * refactor: narrow duplicate secret label merge * refactor: remove duplicate secret label coalescing * fix: silence centaur-perms clippy dead code * style: format iron proxy tests
Co-authored-by: Centaur AI <ai@centaur.local>
Log Slackbot v2 handoff, assistant status, and webhook wait phases so hangs before session creation leave measurable Datadog events. Add pending-operation warnings and coverage for the slow execute handoff path.
Add an API-owned session context endpoint that returns parsed Slack channel/thread metadata for Slack thread keys, plus SDK helpers for tools to fetch it. Keep the prompt guardrail, but direct agents to API-owned context first and Slack history/search only as fallback. Co-authored-by: Centaur AI <ai@centaur.local>
* test: add API integration test CI Run the Rust integration test client against the built api-rs image in PR builds. Publish a PR comment with pass/fail rows linked to the test code. * fix: use github-script for API test comments * fix: preserve registry digest for API image merge * test: use typed harness values in API integration test * test: include model and harness in mock API response * test: add workflows API integration coverage * test: run API integration checks from CI
Co-authored-by: Centaur AI <ai@centaur.local>
test: cover ETL context RLS policies
fix: terminally skip permanent slack backfill jobs
Correct the company_context pg_dsn database declaration so the proxy listener matches the centaur upstream database.
Rename the ETL context RLS migration to 0021 so it no longer collides with the readonly-role migration at 0020.
add slackbotv2 prometheus metrics
* ci: migrate workflows to depot * ci: use larger depot runners
* ci: add aggregate CI success check * ci: add rust and console success checks * ci: keep one aggregate check in CI workflow --------- Co-authored-by: zhygis <5236121+Zygimantass@users.noreply.github.com>
* ci: add rust and console success checks * ci: keep one aggregate check in CI workflow * ci: always publish aggregate checks * ci: allow skipped short-circuited jobs
* fix: keep publish image builds running * fix: preserve main image publish runs
Closes paradigmxyz#740 Closes paradigmxyz#792 Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Centaur AI <ai@centaur.local>
| secret = attrs[:client_secret] | ||
| return if secret.blank? | ||
|
|
||
| ref.client_secret = secret |
| credential.client_secret = secret if secret.present? | ||
| apply_refresh_token_seed(credential, credential_params[:refresh_token]) | ||
| if secret.present? | ||
| credential.client_secret = secret |
| test "cached proxy snapshot carries gcp_id_token and invalidates when it changes" do | ||
| admin = users(:acme_admin) | ||
| secret = gcp_id_token_secrets(:acme_cloud_run) | ||
| Grant.create!(principal: @proxy.principal, gcp_id_token_secret: secret, created_by: admin) |
Comment on lines
+16
to
+26
| BrokerCredential.create!({ | ||
| namespace: "acme", | ||
| foreign_id: "github-github-pending-abc123", | ||
| name: "GitHub – Pending GitHub account", | ||
| token_endpoint: Oauth::Providers::Github::TOKEN_ENDPOINT, | ||
| oauth_app: app, | ||
| provider_subject: "pending-abc123", | ||
| access_token: "gho-token", | ||
| refresh_token: nil, | ||
| scopes: %w[repo read:user] | ||
| }.merge(overrides)) |
Comment on lines
72
to
+84
| refute bc.valid? | ||
| assert bc.errors[:client_secret].any? | ||
| end | ||
|
|
||
| test "password grant is valid with username and password" do | ||
| bc = build_credential(grant: "password", username: "user", password: "pass", refresh_token: nil) |
| secret.build_source(source_type: "control_plane", secret: "direct-token") | ||
| secret.rules.build(host: host, position: 0) | ||
| secret.save! | ||
| Grant.create!(principal: principals(:globex_user), static_secret: secret, created_by: users(:globex_admin)) |
| created_by: users(:globex_admin)) | ||
| secret.rules.build(host: host, position: 0) | ||
| secret.save! | ||
| Grant.create!(role: roles(:globex_infra), gcp_auth_secret: secret, created_by: users(:globex_admin)) |
| created_by: users(:globex_admin)) | ||
| secret.rules.build(host: host, position: 0) | ||
| secret.save! | ||
| Grant.create!(principal: principals(:globex_user), gcp_auth_secret: secret, created_by: users(:globex_admin)) |
|
|
||
| def grantable_assoc(credential) | ||
| credential.class.model_name.singular.to_sym | ||
| Grant.create!(role: roles(:globex_infra), oauth_token_secret: secret, created_by: users(:globex_admin)) |
| close = getattr(client, "close", None) | ||
| if callable(close): | ||
| close() | ||
| print(json.dumps(payload, indent=2, ensure_ascii=False, default=str)) |
| def _read_context( | ||
| context: str | None, | ||
| context_file: str | None, | ||
| ) -> dict | None: | ||
| if context and context_file: | ||
| print(dump_json({"status": "error", "error": "Cannot specify both --context and --context-file"})) | ||
| print( |
| print(dump_json({"status": "error", "error": "Cannot specify both --context and --context-file"})) | ||
| print( | ||
| dump_json( | ||
| {"status": "error", "error": "Cannot specify both --context and --context-file"} |
| content_disp = response.headers.get('content-disposition', '') | ||
| if 'cloudfront.net' in response.url and 'attachment' in content_disp: | ||
| content_disp = response.headers.get("content-disposition", "") | ||
| if "cloudfront.net" in response.url and "attachment" in content_disp: |
| close = getattr(client, "close", None) | ||
| if callable(close): | ||
| close() | ||
| print(json.dumps(payload, indent=2, ensure_ascii=False, default=str)) |
| """Show which Preqin secret names resolve, without printing secret values.""" | ||
| data = get_client().credential_status() | ||
| if json_output: | ||
| print(json.dumps(data, indent=2)) |
| """Check Preqin Operational API auth.""" | ||
| data = get_client().auth_health() | ||
| if json_output: | ||
| print(json.dumps(data, indent=2)) |
| parsed = urllib.parse.urlsplit(value) | ||
| if parsed.scheme not in {"http", "https"}: | ||
| return value | ||
| if parsed.netloc.endswith("slack.com") or parsed.netloc.endswith("slack-edge.com"): |
| parsed = urllib.parse.urlsplit(value) | ||
| if parsed.scheme not in {"http", "https"}: | ||
| return value | ||
| if parsed.netloc.endswith("slack.com") or parsed.netloc.endswith("slack-edge.com"): |
| @@ -116,6 +138,7 @@ | |||
| fields: str = typer.Option(None, "--fields", "-f", help="Comma-separated field_ids"), | |||
| cards: str = typer.Option(None, "--cards", "-c", help="Comma-separated card_ids"), | |||
| json_output: bool = typer.Option(False, "--json", help="Output as JSON"), | |||
| # codeql[py/clear-text-logging-sensitive-data] Fineas excludes this upstream-only tool from runtime allowlists. | |||
fineas-bot
Bot
force-pushed
the
codex/upstream-sync-20260627
branch
from
June 28, 2026 00:33
34db4aa to
3a886f7
Compare
fineas-bot
Bot
force-pushed
the
codex/upstream-sync-20260627
branch
5 times, most recently
from
June 28, 2026 01:50
8b80fb5 to
7803151
Compare
fineas-bot
Bot
force-pushed
the
codex/upstream-sync-20260627
branch
from
June 28, 2026 01:54
7803151 to
2dfabef
Compare
added 2 commits
June 27, 2026 21:55
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.
Summary
Audit notes
cancel_inflight: false.Validation
PATH=/Users/fin-sa/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH cargo fmt --checkinservices/api-rsPATH=/Users/fin-sa/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH cargo checkinservices/api-rsPATH=/Users/fin-sa/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH cargo fmt --checkincrates/harness-serverPATH=/Users/fin-sa/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH cargo checkincrates/harness-serverpnpm install --frozen-lockfile --ignore-scriptspnpm --filter slackbotv2 testpnpm --filter @centaur/api-client testuv run python services/workflow-python/tests/test_workflow_host.pyhelm lint contrib/charthelm template centaur contrib/chart --set overlay.image.repository=ghcr.io/tiplink/fineas-centaur-overlay --set overlay.image.tag=sha-test --set repoCache.enabled=truepnpm --dir docs buildservices/console/app/jobs/oauth/enrich_github_credential_identity_job.rbservices/console/test/jobs/oauth/enrich_github_credential_identity_job_test.rbgit diff --check && git diff --cached --checkNot run
localhost:5432in this environment.