Skip to content

ci: Bind session renewal workflows to protected environment - #522

Merged
Pigbibi merged 3 commits into
mainfrom
ci/ft-renew-env-binding
Nov 5, 2026
Merged

Pigbibi merged 3 commits into
mainfrom
ci/ft-renew-env-binding

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

AI assistance

Codex (host-configured model).

What changed

Bind the invocation and session-renew verification jobs to the Environment selected by the existing repository variable FIRSTRADE_STEP5_ENVIRONMENT, using ${{ vars.FIRSTRADE_STEP5_ENVIRONMENT }} instead of the literal PROJECT_ID. The variable was read back as firstrade-step5.

The existing branch contains a normal merge of the current origin/main. The PR diff remains limited to the two job-level Environment declarations.

How verified

  • Frozen test dependencies synchronized successfully.
  • Full offline pytest suite: 1813 passed, 118 subtests passed, one dependency deprecation warning. GCE_METADATA_DISABLED=true NO_GCE_CHECK=true disables cloud metadata credential discovery; an initial run was interrupted in credential-discovery backoff after 1095 passing tests.
  • Ruff passed. Dot review safety contracts: 11 passed. Documentation check: zero blocking findings and one existing README advisory.
  • Both workflows parse as YAML. Structural comparison proves each job changes only its Environment binding. The candidate diff against current main contains exactly the two requested workflow files. git diff --check passed.

Why

The literal placeholder selects the wrong Environment. Resolve the existing selector without hardcoding or changing repository configuration.

Risk

Protected workflow configuration; independent exact-head review and the existing risk gate still apply. No labels, Secret, IAM, Variable or Environment configuration changed. No workflow dispatch or deployment was performed. Protected Environment credentials and runtime recovery remain unproved.

Publication scan

Central checker publication-check/2.0-advisory, build 83d9d1130377; total matches 1153; matching lines 1148; advisory. Existing tracked-tree findings remain outside this two-line correction. First 20 masked matches:

  • .github/CODEOWNERS:4: /.env.example @<PROJECT_ID>
  • .github/CODEOWNERS:5: /.github/CODEOWNERS @<PROJECT_ID>
  • .github/CODEOWNERS:6: /.github/workflows/ @<PROJECT_ID>
  • .github/CODEOWNERS:7: /application/execution_receipt_adapter.py @<PROJECT_ID>
  • .github/CODEOWNERS:8: /application/execution_service.py @<PROJECT_ID>
  • .github/CODEOWNERS:9: /application/paper_execution_admission.py @<PROJECT_ID>
  • .github/CODEOWNERS:10: /application/paper_execution_command_consumer.py @<PROJECT_ID>
  • .github/CODEOWNERS:11: /runtime_execution_policy.py @<PROJECT_ID>
  • .github/CODEOWNERS:12: /scripts/execution_report_heartbeat.py @<PROJECT_ID>
  • .github/dot-review/review.cjs:106: const token = <REDACTED> core.getIDToken(audienceText); // Exact bytes; URL normalization may change an audience.
  • .github/dot-review/review.cjs:190: const <PROJECT_ID> = {...pr,head:{...pr.head,sha:pair.target},base:{...pr.base,sha:pair.base}};
  • .github/dot-review/review.cjs:191: const binding = {...b.binding({repository:trust.repo.full_name,pr:<PROJECT_ID>,policyCommit:trust.commit,files},trust.policySha),
  • .github/dot-review/test-review.cjs:81: const content='<PROJECT_ID> source\n', sourceSHA='d'.repeat(40);
  • .github/dot-review/test-review.cjs:82: const pr={number:7,changed_files:1,commits:1,title:'<PROJECT_ID> change',body:'<PROJECT_ID> body',
  • .github/dot-review/test-review.cjs:100: assert.equal(audience,'https://audience.example.test');return '<PROJECT_ID>-only';},summary};
  • .github/dot-review/test-review.cjs:111: task={id:'<PROJECT_ID>-task',owner:'example/repo',provider:'dot',revision:1,status:'running',request,output:null,artifacts:[]};
  • .github/workflows/diagnose-cached-stage-failure.yml:52: GCP_PROJECT_ID: <PROJECT_ID>
  • .github/workflows/diagnose-cached-stage-failure.yml:53: GCP_WORKLOAD_IDENTITY_PROVIDER: projects/<PROJECT_NUMBER>/locations/global/workloadIdentityPools/<PROJECT_ID>-actions/providers/<PROJECT_ID>-main
  • .github/workflows/diagnose-cached-stage-failure.yml:54: GCP_WORKLOAD_IDENTITY_SERVICE_ACCOUNT: firstrade-platform-deploy@<PROJECT_ID>.iam.gserviceaccount.com
  • .github/workflows/diagnose-cached-stage-failure.yml:69: id-token: <REDACTED>

@Pigbibi

Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T12:50:55.757251Z 5be66fb Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: cc5e7fd7da

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Pigbibi

Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 5be66fb345

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Pigbibi Pigbibi added the owner-approved Owner approval for high-risk PRs. AI agents must never apply this label. label Nov 5, 2026
@Pigbibi
Pigbibi marked this pull request as ready for review November 5, 2026 12:49
@Pigbibi
Pigbibi merged commit 58d40a9 into main Nov 5, 2026
10 of 13 checks passed
@Pigbibi
Pigbibi deleted the ci/ft-renew-env-binding branch November 5, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved Owner approval for high-risk PRs. AI agents must never apply this label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant