Skip to content

Sync upstream Centaur with TipLink deployment compatibility - #59

Merged
GoonMachine merged 154 commits into
mainfrom
codex/upstream-sync-20260627
Jun 28, 2026
Merged

Sync upstream Centaur with TipLink deployment compatibility#59
GoonMachine merged 154 commits into
mainfrom
codex/upstream-sync-20260627

Conversation

@fineas-bot

@fineas-bot fineas-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

Summary

  • Sync upstream Centaur into the TipLink fork.
  • Preserve required TipLink production behavior: proxy timeout support, Wilson's fork automation, TipLink image namespace/promotion paths, GitHub App token-broker bootstrap, and overlay image support.
  • Migrate carried patches onto the upstream api-rs shape instead of adding broad backwards-compatibility shims, including overlay sandbox mount paths, workflow sleep suspension handling, Slack thread-key stability, OAuth re-consent cleanup, and session release safety.

Audit notes

  • Sub-agent review covered deploy/chart behavior, api-rs/session/database surfaces, workflow migration risks, Slack identity/thread keys, console OAuth, docs, and final deployment sanity.
  • No major blockers remained after re-review.
  • Residual risk: the downstream sandbox cleanup script uses a broader session query than the old idle-candidate helper, but the staged infra change keeps dry-run as the default and calls release with cancel_inflight: false.

Validation

  • PATH=/Users/fin-sa/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH cargo fmt --check in services/api-rs
  • PATH=/Users/fin-sa/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH cargo check in services/api-rs
  • PATH=/Users/fin-sa/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH cargo fmt --check in crates/harness-server
  • PATH=/Users/fin-sa/.rustup/toolchains/stable-aarch64-apple-darwin/bin:$PATH cargo check in crates/harness-server
  • pnpm install --frozen-lockfile --ignore-scripts
  • pnpm --filter slackbotv2 test
  • pnpm --filter @centaur/api-client test
  • uv run python services/workflow-python/tests/test_workflow_host.py
  • helm lint contrib/chart
  • helm template centaur contrib/chart --set overlay.image.repository=ghcr.io/tiplink/fineas-centaur-overlay --set overlay.image.tag=sha-test --set repoCache.enabled=true
  • pnpm --dir docs build
  • Ruby syntax check for services/console/app/jobs/oauth/enrich_github_credential_identity_job.rb
  • Ruby syntax check for services/console/test/jobs/oauth/enrich_github_credential_identity_job_test.rb
  • git diff --check && git diff --cached --check

Not run

  • Focused Rails OAuth test reached the app but could not connect to local Postgres at localhost:5432 in this environment.

mslipper and others added 30 commits June 16, 2026 14:03
…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.
* 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
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"):
Comment thread tools/productivity/airtable/cli.py Fixed
Comment thread tools/research/crunchbase/cli.py Outdated
@@ -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.
Comment thread tools/research/preqin/centaur_tool_preqin/cli.py Fixed
Comment thread tools/research/preqin/centaur_tool_preqin/cli.py Fixed
@fineas-bot
fineas-bot Bot force-pushed the codex/upstream-sync-20260627 branch from 34db4aa to 3a886f7 Compare June 28, 2026 00:33
Comment thread tools/productivity/airtable/cli.py Fixed
Comment thread tools/productivity/opentable/cli.py Fixed
Comment thread tools/research/crunchbase/cli.py Fixed
Comment thread tools/research/preqin/centaur_tool_preqin/cli.py Fixed
@fineas-bot
fineas-bot Bot force-pushed the codex/upstream-sync-20260627 branch 5 times, most recently from 8b80fb5 to 7803151 Compare June 28, 2026 01:50
@fineas-bot
fineas-bot Bot force-pushed the codex/upstream-sync-20260627 branch from 7803151 to 2dfabef Compare June 28, 2026 01:54
@GoonMachine
GoonMachine merged commit 51877d9 into main Jun 28, 2026
10 of 30 checks passed
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.