Skip to content

feat(operators): add fail-closed Cloud Run tag policy - #777

Merged
Pigbibi merged 3 commits into
mainfrom
feat/cr-revision-tag-helper-r1
Nov 5, 2026
Merged

Pigbibi merged 3 commits into
mainfrom
feat/cr-revision-tag-helper-r1

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Add the pinned cloud-run-tags/v1 operator module for owner decision t1255s7222, Option B. Existing tag generators disagree on the 46-character tagged-URL budget, and a tag-impossible service cannot be claimed warmed through an untagged zero-percent candidate.

The helper measures exact names, reserves preferred or deterministic shortened tags with a private process-locked journal, refuses foreign/unknown occupancy and collisions, and returns explicit TAG_IMPOSSIBLE. Its default lifecycle is STOP. A 99/1 proposal requires exact project/region/service/action/run approval; no-traffic and image-only callers always refuse it. The helper performs no cloud mutations. The contract documents current-state checks, single-use execution ownership, tag preservation (including zero-percent entries), restoration and verified readback.

Decision inputs:

  • /workspace/codex-jobs/cr-service-name-inventory-r1/out/DECISION_MEMO.md
  • /workspace/codex-jobs/cr-service-name-inventory-r1/out/GENERATORS.md
  • /workspace/codex-jobs/cr-service-name-inventory-r1/out/LIVE_INVENTORY.md

IBKR, Firstrade, LongBridge and QRS adopters will pin/vendor this contract under separate caller-adoption work. No adopter or deployed behavior changes here. The four long-name IBKR service renames remain deferred.

Verification

  • Focused offline contract tests: 58 passed. The initial 53 tests failed before the new module existed; failure evidence is retained in the job's out/focused-before.txt. Five additional adverse tests cover replacement of the locked file, state version/integrity, disk failures and collisions.
  • Full suite: 3,984 passed, 3 skipped, 1,277 subtests passed. Local CI-equivalent <PROJECT_ID>_SHA was set from the real checkout revision. The first run without this CI variable had three benchmark-provenance failures; that historical failure is retained. No test or production gate was relaxed.
  • Ruff: passed. Documentation phase 2: zero blocking findings, one existing README advisory. Staged diff whitespace check: passed.
  • SG egress guard: passed. All command output uses the shared masker. Fixtures are fake-only.

Risk and limits

The module is opt-in and adds no dependency. Its Linux flock journal reserves tags only within the same private job state; it is not a cloud lease or mutation/replay authority. Callers still authenticate exact owner approval, acquire their existing execution claim, and read/conditionally update current cloud state. Missing restart state or unverifiable restoration requires reconciliation.

Draft only. No merge, labels, deployment, service rename, traffic, IAM, Secret or variable changes. Cloud/operational remote mutations: 0. Live, Kelly and stop-loss settings are untouched.

AI assistance

Implemented and verified with OpenAI Codex (GPT-6, host-selected configuration). Exact-head review is requested from the established Codex review bot; no second reviewer was dispatched.

Publication advisory

Central checker: publication-check/2.0-advisory; build 83d9d1130377; advisory mode. Tracked-tree preflight: 1170 matches across 1165 matching lines. This is a repository-wide advisory, not a changed-files credential finding. The final pre-push/pre-PR checks are retained in the job artifacts.

First 20 matches (masked by the shared checker):

  • .<PROJECT_ID>/CODEOWNERS:2: /.github/CODEOWNERS @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:3: /src/quant_platform_kit/risk/ @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:4: /src/quant_platform_kit/binance/ @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:5: /src/quant_platform_kit/ibkr/ @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:6: /src/quant_platform_kit/longbridge/ @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:7: /src/quant_platform_kit/schwab/ @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:8: /src/quant_platform_kit/common/models.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:9: /src/quant_platform_kit/common/port_adapters.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:10: /src/quant_platform_kit/common/execution_translation.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:11: /src/quant_platform_kit/position_sizing.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:16: /scripts/verify_fractional_dca_execution.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:17: /src/quant_platform_kit/binance/execution.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:18: /src/quant_platform_kit/common/account_risk_budget.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:19: /src/quant_platform_kit/common/execution_capabilities.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:20: /src/quant_platform_kit/common/execution_commands.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:21: /src/quant_platform_kit/common/execution_fills.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:22: /src/quant_platform_kit/common/execution_outcomes.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:23: /src/quant_platform_kit/common/execution_receipts.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:24: /src/quant_platform_kit/common/execution_state.py @<PROJECT_ID>
  • .<PROJECT_ID>/CODEOWNERS:25: /src/quant_platform_kit/common/paper_execution_admission.py @<PROJECT_ID>

@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-05T20:12:11.650479Z 18c81e9 New commits
ℹ️ 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. What shall we delve into next?

Reviewed commit: 6ab7beb0dc

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

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi marked this pull request as ready for review November 5, 2026 20:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5f42b068e4

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

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi Pigbibi added the agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation label Nov 5, 2026 — with ChatGPT Codex Connector
@Pigbibi
Pigbibi merged commit e2660b3 into main Nov 5, 2026
12 of 13 checks passed
@Pigbibi
Pigbibi deleted the feat/cr-revision-tag-helper-r1 branch November 5, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant