Skip to content

ci: Add private recovery evidence bootstrap - #983

Merged
Pigbibi merged 3 commits into
mainfrom
ci/recovery-evidence-bootstrap
Nov 6, 2026
Merged

Pigbibi merged 3 commits into
mainfrom
ci/recovery-evidence-bootstrap

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

AI assistance

Codex (gpt-6.1-sol) authored this change. Exact-head re-review is requested from the established review bot; independent acceptance is pending.

What changed

Add a manual, main-only protected Actions definition for private recovery evidence: one dedicated private regional Standard GCS bucket with UBLA, enforced PAP, seven-day lifecycle, disabled versioning/soft deletion, stable pre-warm v1/v2 snapshots and create-only card/receipt objects with exact readbacks. Keep the existing recovery concurrency group, reject reruns/existing buckets, and never invoke recovery or change Cloud Run.

Resolve the configured project through Resource Manager and verify its ID/number before accepting either v1 namespace representation. Recheck approval expiry after token acquisition immediately before every bucket/object POST. Document the required read-only project lookup permission; no grant is made by this change.

Why

The existing recovery operator consumes an already approved private card. This preparatory definition supplies the missing storage/evidence path under t1319s7712. The review repairs prevent rejection of valid numeric Cloud Run namespaces and writes submitted after approval expires during authentication.

How verified

  • Review regressions before repair: 9 failed / 26 passed, including rejection of the valid numeric namespace, ignored invalid project mappings and two expired-after-token HTTP writes.
  • Focused bootstrap and retained-warm recovery suite after repair: 93 passed.
  • Full offline suite: 6691 passed, 6 skipped, 368 subtests passed; 8 warnings; exit 0.
  • Repository Ruff, existing environment-workflow shell contract and diff checks passed. Documentation checker: zero blocking findings, one existing README advisory.
  • Existing concurrency/restart, create-only, unknown-outcome, snapshot drift, masking and redirect tests pass. No fixtures or protections were weakened.
  • The isolated research CI overlay, real provider execution/native IAM sufficiency, pricing and recovery are unexecuted/NOT_PROVEN. Remote CI and independent review completion are separate.

Risk

High: protected workflow/storage operator. Require native Environment protection and exact valid owner/revision authority before any later dispatch. Missing Environment binding blocks credential acquisition. Resource Manager lookup needs resourcemanager.projects.get; missing permissions fail closed. No IAM/Secret/Environment configuration is created here. Private configuration, credentials and snapshots stay private; diagnostics are fixed and redirects refused.

Bucket creation is the distributed single-use claim; unknown outcomes stop without retry, adoption, repair or deletion. Partial artifacts require private reconciliation. Approval is checked at request submission; this does not cancel an already in-flight request. Snapshot capture does not prove the US$1 incremental budget; receipts retain pricing NOT_PROVEN.

Keep OPEN Draft. No label, undraft, merge, bootstrap/recover dispatch, Cloud Run/Environment/Secret/IAM mutation or PAPER/Live/Kelly/stop-loss operation is included. Recover requires MERGED bootstrap and a separate job satisfying valid t1318s7695 bounds. Owner t1320s7734 extends the existing TTL to approximately 2026-11-07 01:49 Asia/Singapore; this engineering repair neither consumes nor extends it.

Central publication checker

publication-check/2.0-advisory build 83d9d1130377: advisory exit 0, 2456 matching lines / 2581 findings in the complete tracked candidate tree. Changed-file scan: 34 matching lines / 34 findings; script has zero matches. New test matches are fake bindings or ordinary code; existing repository matches remain outside this repair. No real credential was introduced.

First 20 masked matches:

File Line Masked text
.env.example 11 IB_GATEWAY_HOST=<PROJECT_ID>
.env.example 19 TELEGRAM_TOKEN=<>
.<PROJECT_ID>/CODEOWNERS 9 /.env.example @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 10 /.github/CODEOWNERS @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 11 /application/account_new_risk_gate_support.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 12 /application/execution_kernel_adapter.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 13 /application/execution_receipt_adapter.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 14 /application/execution_service.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 15 /application/ibkr_order_execution.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 16 /application/paper_execution_admission.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 17 /application/paper_execution_command_consumer.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 18 /application/portfolio_risk_diagnostics.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 19 /application/relative_risk_preview.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 20 /application/tqqq_offline_risk.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 21 /runtime_execution_policy.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 22 /scripts/deploy_notification_only.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 23 /scripts/deploy_pilot_no_traffic.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 24 /scripts/execution_report_heartbeat.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 25 /scripts/ibkr_deployment_audit.py @<PROJECT_ID>
.<PROJECT_ID>/CODEOWNERS 26 /scripts/summarize_execution_ledger_cloud.py @<PROJECT_ID>

@Pigbibi

Pigbibi commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact head f3d4145829cf23c2fb81514fbc37b2fcddd00c39 against base 097c16d9a5dc703f682658b189d5df80bef6670b and all four changed files. Focus on protected Environment authorization, private-data handling, create-only storage writes, single-use bucket ownership, expiry, fresh snapshot comparisons and unknown-outcome behavior. The PR remains Draft; no merge or protected execution is requested. Local evidence: 6681 tests passed, 6 skipped, 368 subtests passed; focused bootstrap/recovery 83 passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 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-06T17:33:44.527324Z d89b06d 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 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: f3d4145829

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

Comment thread scripts/recovery_evidence_bootstrap.py Resolved
Comment thread scripts/recovery_evidence_bootstrap.py Resolved
@Pigbibi

Pigbibi commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please re-review the exact current head d89b06d85cfb24fafcd4556af6e751f398b80a59 of Draft #983. This commit addresses both unresolved findings from f3d4145829cf23c2fb81514fbc37b2fcddd00c39: verified Resource Manager project ID/number binding for v1 namespaces, and approval-window rechecks after token acquisition immediately before every POST.

Fail-before: 9 failed / 26 passed; focused pass-after: 93 passed. Full offline: 6691 passed, 6 skipped, 368 subtests passed. Ruff, documentation (zero blocking, one existing advisory), workflow contract and diff checks passed.

Keep Draft OPEN. No merge, labels, bootstrap/recover dispatch, cloud/Environment/Secret/IAM or trading operations are included. Independent review and remote CI are not claimed complete.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: d89b06d85c

ℹ️ 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 agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation label Nov 6, 2026
@Pigbibi
Pigbibi marked this pull request as ready for review November 6, 2026 17:31
@Pigbibi
Pigbibi merged commit dae0fa9 into main Nov 6, 2026
16 of 20 checks passed
@Pigbibi
Pigbibi deleted the ci/recovery-evidence-bootstrap branch November 6, 2026 17:36
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